Repository navigation
Conversation
moetemp
force-pushed
the
moe/brook/review/s2-stream-bindings
branch
3 times, most recently
from
October 26, 2026 08:44
3925df2 to
f2a5ec4
Compare
moetemp
force-pushed
the
moe/brook/review/s1-stream-protos
branch
from
October 26, 2026 08:44
235fde0 to
3b5246f
Compare
moetemp
force-pushed
the
moe/brook/review/s2-stream-bindings
branch
from
October 27, 2026 09:07
f2a5ec4 to
ba649e0
Compare
moetemp
force-pushed
the
moe/brook/review/s1-stream-protos
branch
from
October 27, 2026 09:07
3b5246f to
92725de
Compare
moetemp
force-pushed
the
moe/brook/review/s2-stream-bindings
branch
from
October 27, 2026 09:17
ba649e0 to
e1864c4
Compare
moetemp
force-pushed
the
moe/brook/review/s1-stream-protos
branch
from
October 28, 2026 01:33
92725de to
7afb312
Compare
moetemp
force-pushed
the
moe/brook/review/s2-stream-bindings
branch
from
October 28, 2026 01:33
e1864c4 to
50537f7
Compare
moetemp
force-pushed
the
moe/brook/review/s1-stream-protos
branch
from
November 5, 2026 17:19
3499fa7 to
8767e51
Compare
moetemp
force-pushed
the
moe/brook/review/s2-stream-bindings
branch
from
November 5, 2026 17:19
499bbee to
36fef14
Compare
This was referenced Nov 5, 2026
moetemp
force-pushed
the
moe/brook/review/s2-stream-bindings
branch
from
November 5, 2026 23:10
36fef14 to
7647af5
Compare
moetemp
force-pushed
the
moe/brook/review/s1-stream-protos
branch
from
November 5, 2026 23:10
8767e51 to
67d9bbf
Compare
moetemp
force-pushed
the
moe/brook/review/s2-stream-bindings
branch
from
November 6, 2026 09:06
7647af5 to
d535338
Compare
The WIT copy keeps the TypeScript and .NET poll as a TODO comment, as nexgen's sample does, until nexgen supports them.
moetemp
force-pushed
the
moe/brook/review/s2-stream-bindings
branch
from
November 6, 2026 09:22
d535338 to
9885bad
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 vendors the Stream service WIT and generates its Python bindings with nexgen, into
temporalio/streams/system/. It also adds the writer client intemporalio/streams/writer_system/, written by hand.6bdefacc, except that the copy keeps the TypeScript and .NET poll as a TODO comment, as nexgen's sample does, until nexgen supports them. nexgen reads the Stream service protos from the Core submodule, and generates the client target and the Workflow target. The Stream resource hasappend,read,closeanddescribe, and a read item is theStreamItemunion ofStreamItemDataandStreamItemSuperseded.create_stream[Turn](...),get_stream[Turn](...)andread_records[Turn](...).StreamRef(id,ownerandbackend) and an id conflict policy, and the factoryget_streamtakes the same fields. A call that returns the Stream returns aResourceCall, soasync withcloses it.Stream.append(*records)returns the last offset through the newlast_offset()support helper, and client calls takerpc_metadataandrpc_timeout. Its request id comes from the newrequest_id()source intemporalio.nexus.system._support, which isworkflow.uuid4()in a Workflow, so a replay and a task retry send the same id, and a random UUID elsewhere. In Workflow code, [Brook S7] Added Workflow Streams, which write through Local Activities. #377 sends an id that's the same in each run of the chain instead, and the source returns an empty id there.workflow_writer()andclient_writer()sources fill thewriterof an append and a close from where the call runs. The Workflow sources raise until Workflow code can write in [Brook S7] Added Workflow Streams, which write through Local Activities. #377.client_writerraises, since a generated call doesn't say which client makes it.temporalio.streams. #373 turns it into a Stream error.writer_system/keeps the shape of nexgen's client output by hand, with the generatedStreamRef,Producer,StreamWriterand epoch models and thecoresdk.streamsmessages of [Brook B1] Added thestreamsbridge feature that links thetemporalio-streamscrate. #370. Like the generated calls, it maps no error. So a later switch to generated code changes no caller.read-recordshas@nexus.poll.iter_readyields pages, anditer_read_itemsyields items with the request to resume from. After a Superseded item, that request starts at the item's own offset, since the first Record of its batch has that offset. A read ends when the Stream is closed and the read gave its last item.poe gen-protosruns the generator, andcheck-protosinstalls the pinned nexgen, so drift fails CI.start_system_nexus_operationon the Workflow outbound interceptor. [Brook S7] Added Workflow Streams, which write through Local Activities. #377 serves the Stream calls of Workflow code through that hook.moetemp/nexgenata3842089, which combines feat: make a resource generic in the type parameters it uses temporalio/nexgen#358, [Brook G3] Addedactivity.Info.workflow_taskfor Local Activities. #369, [Brook S2] Generated the Stream service bindings with nexgen, and added the writer client. #372, [Brook S3] Added Stream refs, Records and errors intemporalio.streams. #373, [Jetty] Merged Brook #365 and made native the default Stream backend. #366, [Brook G2] Converted transfer types nested in JSON values. #368, [Brook S1] Added the Redis Store's config proto and its generated code. #371 and [Brook] Added StreamClient. #345 with the stream sample sync of chore(samples): sync the stream sample with the latest temporalio/api#895 temporalio/nexgen#374. Upstream installs a nexgen release by--versiononce they merge.Why?
The Streams API calls the Stream service through generated bindings, as the SDK calls the Workflow Service System Nexus operations. They're generated, so they get their own PR, before the hand-written Stream code. The writer client is here too, since it has the same shape.
Part of the Streams review series.
Checklist
scripts/gen_stream_service.pyand the pinned nexgen leaves no diff.poe lint,poe gen-docsand the binding tests pass.