Repository navigation
Conversation
moetemp
force-pushed
the
moe/brook/review/feature-streams
branch
from
October 26, 2026 00:14
9e54468 to
4c0260b
Compare
moetemp
force-pushed
the
moe/brook/review/s3-data-model
branch
2 times, most recently
from
October 26, 2026 02:08
347fb8d to
9e969ce
Compare
moetemp
force-pushed
the
moe/brook/review/feature-streams
branch
2 times, most recently
from
October 26, 2026 08:44
c4ce9d7 to
c22d918
Compare
moetemp
force-pushed
the
moe/brook/review/s3-data-model
branch
2 times, most recently
from
October 27, 2026 09:07
9b54b39 to
fda6c46
Compare
moetemp
force-pushed
the
moe/brook/review/feature-streams
branch
from
October 27, 2026 09:17
479a894 to
63423ea
Compare
moetemp
force-pushed
the
moe/brook/review/s3-data-model
branch
2 times, most recently
from
October 28, 2026 01:33
5a0f9bf to
7a7e940
Compare
moetemp
force-pushed
the
moe/brook/review/feature-streams
branch
from
October 28, 2026 01:33
63423ea to
6a7f134
Compare
moetemp
force-pushed
the
moe/brook/review/s3-data-model
branch
from
October 28, 2026 07:54
7a7e940 to
cbec633
Compare
moetemp
force-pushed
the
moe/brook/review/feature-streams
branch
from
October 28, 2026 07:54
6a7f134 to
021a3b7
Compare
moetemp
force-pushed
the
moe/brook/review/s3-data-model
branch
from
November 5, 2026 17:19
7cba3a9 to
a6e385a
Compare
moetemp
force-pushed
the
moe/brook/review/feature-streams
branch
from
November 5, 2026 17:19
171c473 to
86e492b
Compare
This was referenced Nov 5, 2026
temporalio.common.temporalio.streams.
moetemp
force-pushed
the
moe/brook/review/feature-streams
branch
from
November 5, 2026 23:10
86e492b to
8ce8db1
Compare
moetemp
force-pushed
the
moe/brook/review/s3-data-model
branch
2 times, most recently
from
November 6, 2026 09:06
247c20f to
8185c1c
Compare
moetemp
force-pushed
the
moe/brook/review/feature-streams
branch
from
November 6, 2026 09:06
8ce8db1 to
411c3e9
Compare
moetemp
force-pushed
the
moe/brook/review/s3-data-model
branch
from
November 6, 2026 09:22
8185c1c to
60b56d3
Compare
moetemp
force-pushed
the
moe/brook/review/feature-streams
branch
from
November 6, 2026 09:22
411c3e9 to
5e64942
Compare
Owner
Author
|
Closed in favor of #381, the combined branch, which has this change. |
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.
This PR adds the data model of the Streams API in the new
temporalio.streamsmodule. That's theStreamRef[T]data, the read items, the errors and the generated wire models that they carry.temporalio.commongets no Stream name.StreamRef[T]is data only. It has the fields of thetemporal.api.stream.v1.StreamRefwire model (id,ownerandbackend) and no calls. [Brook S5] Added the clientStream, its typed creates and Stream reads. #375 addstemporalio.client.Streamand [Brook S7] Added Workflow Streams, which write through Local Activities. #377temporalio.workflow.WorkflowStream, which make the calls.StreamRefthrough nexgen's generated converter, also as a field of a dataclass or a pydantic model, through the nested conversion of [Brook G2] Converted transfer types nested in JSON values. #368. The type argument, such asStreamRef[Turn], is for type checks only. A ref keeps an owner of any type, and only a close checks it.Record[T]or aSupersededitem. Each has akindwith aLiteraltype ofItemKind, so a match onr.kindnarrows the item's type. There's no close item.Superseded.withdrawn_offsetslists only the Records of this read.Superseded.withdraws()answers for any earlier Record, or for just its Producer, with the crate's withdrawal rule on theoneofepoch.Supersededitems carry, such asProducer,ProducerEpochwith its cases,WorkflowTaskEpoch,StreamSupersededandStreamWriter.StreamAlreadyExistsError,StreamOffsetTooHighErrorandStreamStorageUnavailableError. Theirreasonis the protoStreamErrorReason, which the module exports. One helper reads theStreamErrorDetailsof a failed call, from a Core error or from the details of an application error, such as a Local Activity or Nexus failure. OnlyStreamStorageUnavailableErroris retryable, and a reason with no class, such asSTORAGE_CORRUPT, raises the baseStreamError.StreamConfigErrorisn't aStreamError, since it isn't a Store reason.Why?
Every later Streams PR builds on these types, and they need no backend or server. Stream handles and big-payload handles discusses the ref's wire form, and why the ref is data with no calls.
Part of the Streams review series.
Checklist
tests/contrib/streams/test_refs.py, andtest_vectors.py, which checks the vendored Redis proto against the Redis crate, and the Producer ids, the epoch order and the withdrawal rule against thetemporalio-streamscrate.