Skip to content

chore(samples): sync the stream sample with StreamWriter - #106

Closed
moetemp wants to merge 1 commit into
moe/up/upstream-combinedfrom
moe/up/stream-writer-sync
Closed

moetemp wants to merge 1 commit into
moe/up/upstream-combinedfrom
moe/up/stream-writer-sync

Conversation

@moetemp

@moetemp moetemp commented Nov 5, 2026

Copy link
Copy Markdown
Owner

What changed?

This PR syncs the stream sample with the StreamWriter change in temporalio/api#895.

  • A new stream-writer record holds the Producer and the withdrawal fields of a write. The append and the close send one writer field in place of producer, previous-completed-task, failed-tasks and withdraw-run, and a Superseded item holds a writer too.
  • The writer field takes a source for each target. The sample support gains workflow_writer() and client_writer() in Python, workflowWriter() in TypeScript and StreamWorkflowContext.Writer() in .NET. Each writer gives together what the per-field sources gave before. TypeScript and .NET have no client target yet, so they need no client writer.
  • The producer helpers are gone, since no source uses them now. withdraw_run stays for the create.
  • The protos, streams.bin, the Python and .NET bindings and streams.d.ts follow the new protos.
  • A directive that nexgen doesn't support yet stays a TODO comment, as before.

Why?

The sample WIT is a copy of the Stream service WIT in temporalio/api#895. The append and the close carried the same four fields, so the API moved them into one message.

How did you test it?

Link to a test plan if any -

  • Unit Tests
  • Staging
  • End to End Tests

The sample protos and bindings are rebuilt with protoc 33.1 and mypy-protobuf 5.1.0. The sample tests build and check the writer in place of the old fields. A new Python test checks that a client append in an Activity sends the Activity's Producer in the request's writer field, on the model and on the wire.

The stream sample's WIT and protos are those of temporalio/api#895, where an append and a close
send one `writer` field. The sample support gives the writer of each context, with what the
per-field sources gave before. The producer helpers go, since no source uses them now.
@moetemp

moetemp commented Nov 6, 2026

Copy link
Copy Markdown
Owner Author

Replaced by temporalio#374.

@moetemp moetemp closed this Nov 6, 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