Skip to content

[Brook S1] Added the Stream service protos and their generated code. - #371

Open
moetemp wants to merge 1 commit into
moe/brook/review/g1-common-packagefrom
moe/brook/review/s1-stream-protos
Open

moetemp wants to merge 1 commit into
moe/brook/review/g1-common-packagefrom
moe/brook/review/s1-stream-protos

Conversation

@moetemp

@moetemp moetemp commented Oct 25, 2026 •

Copy link
Copy Markdown
Owner

What was changed

This PR vendors the Stream service and Stream runtime protos and adds their generated code. No hand-written code uses them yet.

  • The Stream protos are A1's three files at 482ec01, byte equal to the crate's copies. temporal.api.stream.v1 (the messages) and temporal.api.streamservice.v1 (requests and responses) get their own packages under temporalio.api. The enums in temporal.api.enums.v1 (StreamProducerKind, StreamCloseStatus, StreamReadStart, StreamStatus, StreamErrorReason) are generated into the Core-generated temporalio/api/enums/v1/, so its __init__.py exports them too. No Core enum has these names.
  • A read item is a oneof of data, superseded and close in StreamRecord, with no Topic. StreamErrorDetails.reason is the StreamErrorReason enum.
  • runtime.proto is the crate's wire contract at K10 7bb4e727, and redis.proto has the Redis runtime's config at R3 6e3ee499. Both are generated into temporalio/common/_streams/proto/. The memory runtime's config shares the field numbers of the Redis one.
  • A test in S3 checks all five files against the crates that the bridge links.

Depends on G1 (#367), A1 (temporalio/api#895), K10 (moetemp/sdk-rust#220) and R1 (temporal-community/sdk-streams#1). No changelog fragment, since S9 has the Streams entry.
Part of the Brook review series.

Why?

S2's bindings and S3 to S9 import these modules. They're generated, so they get their own PR, first in the stack.

Open question. The Stream packages are generated into the public temporalio.api namespace, from vendored copies until A1 is in temporalio/api and the Core submodule. The Core bump that brings A1 must delete the three vendored files, since protoc refuses two files with one import path. Should they go under temporalio.common._streams until then?

Checklist

  1. How was this tested:
    • poe gen-protos-docker leaves no diff, and poe lint and poe gen-docs pass.
    • Fork CI passes, except the arm jobs, since the fork has no arm runners.

@moetemp moetemp added the skip-changelog Changelog entry rides another PR label Oct 25, 2026
@moetemp
moetemp force-pushed the moe/brook/review/s1-stream-protos branch 2 times, most recently from 3b5246f to 92725de Compare October 27, 2026 09:07
The Stream service messages come from the API repo, and the runtime
messages from the `temporalio-streams` crate. `poe gen-protos-docker`
copies the Streams output too.
@moetemp
moetemp force-pushed the moe/brook/review/s1-stream-protos branch from 92725de to 7afb312 Compare October 28, 2026 01:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-changelog Changelog entry rides another PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant