Repository navigation
Conversation
Errors tell a refused write from one with an unknown outcome, and expired cursors from invalid ones. A cursor names its stream, so a provider can refuse one from another stream.
# Conflicts: # temporalio/contrib/streams/__init__.py # tests/contrib/streams/test_records_wire.py
A caller must tell a write the store refused from a store that failed, and the store's own exceptions must not leak, so both get a StreamError family that the specific errors join.
Skipping it with a log warning lost data the reader never heard of. The error carries the cursor, so a caller can resume past it on purpose.
Core reports every failed stream call as one failure kind, so each kind maps to the error a caller catches. Cursors are Core's tokens now, and lang keeps only the two a read starts from.
The two need different fixes, and parsing the message was the only way to tell them apart.
moetemp
marked this pull request as draft
October 12, 2026 06:58
Core now tells a call-input mistake apart from a store refusal. ValueError is the SDK's class for a bad argument, so a caller can catch the two apart. (cherry picked from commit d5acb48)
Owner
Author
|
Replaced by Brook #151. Brook was split in two: Brook now has streams with Activity and client publish and outside readers, and Ford has the Workflow Task publish path. The code is the same, re-cut into new branches. |
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 adds the stream error family and maps each of Core's failure kinds to it.
StreamRefusedErroris for a write the store refused, andStreamStorageErroris for a store that failed.StreamOutcomeUnknownErrorsits under the storage error.error_from_failuremaps eachStreamFailurekind to its class. A kind this release doesn't know is a storage error.StreamRecordErrorcarries the cursor of a record a reader can't decode.BEGINNINGandENDare the only cursors lang names. Core mints and checks every other one.Why?
Core reports one kind per failure, so every SDK raises the same error for the same failure (DD-21). A record skipped with a log line is data the reader never hears of.
How did you test it?
Link to a test plan if any -
tests/contrib/streams/test_errors_cursors.py. A new kind in Core fails the mapping test first.