Repository navigation
Conversation
…emove-old-api # Conflicts: # temporalio/contrib/streams/__init__.py # temporalio/contrib/streams/_access.py # temporalio/contrib/streams/_outside.py # temporalio/contrib/streams/_reader.py # temporalio/contrib/streams/_stream.py # temporalio/contrib/streams/_workflow.py # tests/contrib/streams/test_activity_handles.py # tests/contrib/streams/test_facade.py # tests/contrib/streams/test_redis.py # tests/contrib/streams/test_workflow_module.py
…emove-old-api # Conflicts: # temporalio/contrib/streams/_activity.py # tests/contrib/streams/test_activity_handles.py
Owner
Author
|
Closing as stale. This layer is folded into the v5 tip, #365, and the upstream review uses a fresh series instead. Plan: https://www.notion.so/4048fc567738814990b7c796ac28fe3f |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed?
This PR removes the old Stream API and moves the tests to the new one.
Gone are the default Stream, the Stream header on Activities,
workflow_stream,create_workflow_stream,activity_stream,for_handle,for_ref, the modulecreate_stream,StreamRef,OutsideStream,TopicandIdle. The writer has no buffered publish path any more, since each awaited publish is oneWriteRecordscall andBufferedPublisherbatches in Python. The package docstring describes the backend names: each plugin registers one withname=(redis,memory), a handle carries it,default=Truepicks a client's default, and for now a Worker takes one Stream plugin, so it serves one backend.backend_of_clientgoes, since nothing uses it.The live tests that used the old API now run on the new one: one Stream for a Workflow and its Activity, a failed Workflow Task, the last run that closes a Stream it did not write, a cancelled block, sandbox passthrough, a Local Activity's epoch, a retry run, the payload codec, replay on a new Worker, Worker and plugin shutdown, eviction, the owner on Workflow calls, a final failure under a retry policy, and a missing capability. A reader that wants to stop after a quiet time now sets its own timer.
Why?
S62 and S74: no default Stream, no Stream header on Activities, and one entry point per context.
How did you test it?
pytest tests/contrib/streamson the memory Store and on a scratchredis-server, against the stock dev server.test_vectorsskips the crate's cases with no Stream name.pyright,mypy,basedpyright,pydocstyle,ruff.