Repository navigation
Conversation
Owner
Author
|
Closing as stale. This layer is folded into the v5 tip, #41, and the upstream review uses a fresh series instead. Plan: https://www.notion.so/4048fc567738814990b7c796ac28fe3f |
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 adds the crate's writer extension calls to the IDL as an internal WIT interface,
crates/streams/nexus/stream-writer.wit.stream-writermaps by@nexus.prototo theextension.protomessages ofOpenWriter,WriteRecords,CloseWriterandCloseWriters.open-writerreturnsown<writer>, a resource whose only constructor field iswriter-id, withwrite-records(the answer has the first and the last offset) andclose. The epoch and the sequence stay in the crate.The interface is marked
@nexus.client-onlyand has no endpoint. Its doc lines say it isn't a Temporal API and that no server serves it. So nexgen generates only a caller and aWriterclass for Activities and clients, over an extension-call transport, and nothing on the Workflow or System Nexus path.It is a second file in its own package,
temporal:streams, which uses the Stream service types. In sdk-python, the Stream bindings are imported whiletemporalio.contrib.streamsinitializes. The writer models referencetemporalio.contrib.streams.proto.v1.extension_pb2, which can't be reached at that point. A separate file gives the writer its own generated package, which the facade imports once the package is loaded.tests/wit.rschecks the 100-column rule for both files, the client-only marker and the four operation names.Why?
Decision S87: the Activity and client handles wrap two generated resources,
StreamandWriter, so the writer surface comes from the IDL too. Open for Tim: nexgen describing an in-process call surface, not only Nexus operations.How did you test it?
cargo test --test witincrates/streams, andcargo fmt --all --check. With moetemp/nexgen#45, the generated sdk-python writer package passespyrightwith 0 errors. Over an extension-style transport, it opened a writer, wrote one Record and closed it against a fake extension.Stacked on #32 (
moe/brook/v4/s16-stream-resource).