Repository navigation
Conversation
The crate's Stores now declare capabilities, and a call that needs a missing one fails with the stream_unsupported reason and the capability's name. The crate pin moves to s9, and MemoryStreamPlugin takes durable_writes to test it.
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 maps the crate's
stream_unsupportedreason to a newStreamUnsupportedError, which is non-retryable and exported with the other Stream errors. The crate pin moves to s93984189f, where each Store declares its capabilities and a call that needs a missing one fails with that reason, codeUNIMPLEMENTED, and the capability's name at the end of the message.MemoryStreamPlugintakesdurable_writes, so a test can ask the memory Store for replicas it doesn't have.Please note that a Workflow flush runs in Core's
before_complete, so on the Workflow path a missing capability fails the Workflow Task with the capability's name, and Workflow code sees no exception. Activities and clients getStreamUnsupportedError.Why?
A Store other than Redis may lack a feature, and the caller must learn which one by name.
How did you test it?
pytest tests/contrib/streams. The mapping test checks the error class, code and name. A live test runsMemoryStreamPlugin(durable_writes=1)and checks that the Workflow Task fails withreplica_wait.test_vectorsstill matches the crate's protos and vectors. Fullpoe lintand the full suite pass at this layer, excepttest_envconfig, which reads a config file on this host.