Skip to content

[Brook K1] Added the temporalio-streams crate with the Stream protos. - #212

Closed
moetemp wants to merge 4 commits into
moe/brook/review/c1-workflow-taskfrom
moe/brook/review/streams-k1-protos
Closed

moetemp wants to merge 4 commits into
moe/brook/review/c1-workflow-taskfrom
moe/brook/review/streams-k1-protos

Conversation

@moetemp

@moetemp moetemp commented Oct 27, 2026 •

Copy link
Copy Markdown
Owner

What changed?

This PR adds crates/streams, the experimental crate temporalio-streams, with the Stream protos.

  • The three Stream protos are byte for byte A1's files (temporalio/api#895). They import this repo's API protos, which the build script reads from the descriptor set of temporalio-protos. So the crate vendors no other proto, and cargo package -p temporalio-streams passes.
  • runtime.proto has the runtime's own messages. The Redis config moved to the Redis crate.
  • A failed call carries A1's StreamErrorDetails in its details. Reason::proto gives each reason's StreamErrorReason case. Reason::Offset is OUT_OF_RANGE, since a read from that offset works again once the Stream has Records up to it.
  • crates/sdk-core/CHANGELOG.md notes the crate. Core itself gets no Stream code.

It sits on C1 (temporalio/sdk-rust#1703), but no layer of this stack needs C1 to build. Review lane is the Core team, and the proto reviewers for the protos.
Part of the Brook review series.

Why?

The SDK team asked for the Stream runtime in its own crate, with the shared part in this repo. This stack moves the shared part of moetemp/sdk-streams#43 to #52 here, in the same order and with the same K numbers. The Redis Store is in temporal-community/sdk-streams#1 to #3 (R1 to R3).

The protos are the contract with every SDK, so they're first and alone.

How did you test it?

cargo fmt, cargo clippy -- -D warnings (with and without features), cargo test -p temporalio-streams --all-features, cargo doc and cargo package -p temporalio-streams pass at this commit.

@moetemp
moetemp force-pushed the moe/brook/review/streams-k1-protos branch from adac538 to 4078d83 Compare October 27, 2026 07:35
@moetemp
moetemp force-pushed the moe/brook/review/c1-workflow-task branch from 9030f04 to 5dbc91c Compare October 27, 2026 08:17
@moetemp
moetemp force-pushed the moe/brook/review/streams-k1-protos branch 4 times, most recently from 6b5105d to b906e6f Compare October 28, 2026 08:55
@moetemp
moetemp force-pushed the moe/brook/review/c1-workflow-task branch from 5dbc91c to 6eace0b Compare October 28, 2026 08:55
The crate is the Stream runtime that the SDKs link. It is experimental. The
Stream protos are a copy of the API proposal, and they import this repo's API
protos.
@moetemp
moetemp force-pushed the moe/brook/review/streams-k1-protos branch from b906e6f to 088e221 Compare October 29, 2026 04:06
The CHANGELOG repeated part of c1's entry. Lang reads the reason from the error details, not from the token. OpenWriterRequest reserves the numbers of its removed fields.
The failure gives the close status. A zero sequence now takes the next batch number of the epoch.
@moetemp

moetemp commented Oct 30, 2026

Copy link
Copy Markdown
Owner Author

Upstreamed as temporalio#1733, on main.

@moetemp moetemp closed this Oct 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant