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
No nexgen release has the long-poll, client and client-only features, so the generator installs nexgen at a fork revision. `poe gen-protos` runs it, so `check-protos` checks the bindings for drift.
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
The writer has no WIT, so its client keeps the shape of nexgen's output by hand and raises the service's errors. The bindings need `StreamDefinition` and the Stream helpers of the support module, so this layer adds them. The Workflow sources fail until Workflow code can write. The Workflow Service bindings move to nexgen 0.2.11, whose dispatch gives an unknown System Nexus call to the generic hook.
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 vendors the Stream service WIT and generates its Python bindings with nexgen, into
temporalio/common/_streams/system/. It also adds the writer client inwriter_system/, written by hand.publish,read,closeanddescribe. A read item is theStreamItemunion ofStreamItemData,StreamItemSupersededandStreamItemClose.writer_system/keeps the shape of nexgen's client output by hand and raises the service's errors, so a later switch to generated code changes no caller. Only Activities and clients make writer calls. S4 implementscreate_nexus_clientfor both clients.read-recordshas@nexus.poll. The stream handle'siter_readtakes the next request fromnext_read_requestintemporalio.nexus.system._support. A read with no wait ends at an empty page that didn't move.@nexus.sourcelines fill request fields from where the call runs, such as the Stream id, the owner and the Producer. This PR adds those sources totemporalio.nexus.system._support. The Workflow sources raise until Workflow code can write in S7.client_producerraises, since a generated call doesn't say which client makes it.IntEnumclasses, as on nexgenmain(temporalio/nexgen#262), with A1's names. Five of them have@nexus.fallbackfor values they don't know.StreamHandle.owneris anExecutionmodel. The service errors are generated classes, which S3 exports with the public names.temporalio/nexgen#344.temporalio.common.StreamDefinition, so this PR adds the base class.poe gen-protosruns the generator, andcheck-protosinstalls the pinned nexgen, so drift fails CI.temporalio/sdk-python#2001. Its dispatch passes a System Nexus call that it didn't generate tostart_system_nexus_operationon the Workflow outbound interceptor. S7 serves the Stream calls of Workflow code through that hook.moetemp/nexgenatf9578ddb, the fork chain below on top oftemporalio/nexgen#344,#325and#345. Upstream installs a nexgen release by--versiononce the chain merges.Depends on S1 (#371), A1 (
temporalio/api#895),temporalio/nexgen#344,#325and#345, and moetemp/nexgen#101, moetemp/nexgen#102, moetemp/nexgen#78, moetemp/nexgen#80, moetemp/nexgen#82, moetemp/nexgen#84, moetemp/nexgen#85, moetemp/nexgen#87, moetemp/nexgen#89, moetemp/nexgen#92, moetemp/nexgen#94, moetemp/nexgen#95, moetemp/nexgen#103 and moetemp/nexgen#99. No changelog fragment, since S9 has the Streams entry.Part of the Brook review series.
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.
Checklist
gen_stream_service.py --install-nexgenandpoe gen-protos-dockerleave no diff.poe lint,poe gen-docsand the binding tests pass.check-protosincluded, except the arm jobs, since the fork has no arm runners.