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
from
October 27, 2026 09:17
fda6c46 to
5a0f9bf
Compare
They are the data model of the Streams API in `temporalio.common`. A handle is data, so a Workflow can pass it to an Activity, a child or the next run.
moetemp
force-pushed
the
moe/brook/review/s3-data-model
branch
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
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 was changed
This PR adds Stream definitions, handles, Records and the Stream errors to
temporalio.common, as the data model of the Streams API.StreamDefinition[T]and has@common.defn. It gives a Stream its name and its one payload type, and each handle class is generic in that type, such asActivityStream[Turn]. There are no Topics, so separate channels are separate Streams.StreamHandleconverts to theStreamRefproto JSON through G2's nested conversion, so a Workflow can pass it to an Activity, a child or the next run. A Workflow's Stream hasowner, anExecutionwith typeEXECUTION_TYPE_WORKFLOW, the Workflow ID asbusinessIdand the first run id asrunId. A client's Stream has no owner. The handle keeps itsworkflow_idandfirst_execution_run_idproperties.Record.producer.kindandSuperseded.supersession.producer_kindare the generatedStreamProducerKindenum, A1's name. The prototype's class wasProducerKind, with the same int values.StreamErrorReason, andStreamError.reasonis that enum. A reason with no class of its own, such asSEQUENCE, givesStreamError.StreamOptionshas what a create sets, Retention for now.temporalio.commonimports the Stream names on first use, since the Stream modules importtemporalio.clientandtemporalio.workflow. Soimport temporalio.commonloads no Stream module.Depends on S2 (#372) and G2 (#368). The base is
moe/brook/review/feature-streams(G1, G2, G3, S1, S2 and B1), the fork's copy of upstreamfeature/streams. No changelog fragment, since S9 has the Streams entry.Part of the Brook review series.
Why?
Every later Streams PR builds on these types. They need no backend and no server.
Open question.
temporalio.commongets its first__all__, which changesfrom temporalio.common import *. Is that OK?Checklist
poe lint,poe gen-docsandpytest tests/contrib/streamson a build with thestreamsfeature.