Repository navigation
Conversation
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.
Owner
Author
|
Replaced by temporalio#374. |
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 changed?
This PR syncs the stream sample with the
StreamWriterchange in temporalio/api#895.stream-writerrecord holds the Producer and the withdrawal fields of a write. The append and the close send onewriterfield in place ofproducer,previous-completed-task,failed-tasksandwithdraw-run, and a Superseded item holds awritertoo.writerfield takes a source for each target. The sample support gainsworkflow_writer()andclient_writer()in Python,workflowWriter()in TypeScript andStreamWorkflowContext.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.withdraw_runstays for the create.streams.bin, the Python and .NET bindings andstreams.d.tsfollow the new protos.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 -
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
writerfield, on the model and on the wire.