Repository navigation
Conversation
moetemp
force-pushed
the
moe/brook/review/s4-backends
branch
from
October 26, 2026 00:14
b146c64 to
ce8bd6d
Compare
moetemp
force-pushed
the
moe/brook/review/s5-client-reads
branch
from
October 26, 2026 00:14
252b606 to
b70af4e
Compare
moetemp
force-pushed
the
moe/brook/review/s4-backends
branch
from
October 26, 2026 02:08
ce8bd6d to
e453c8e
Compare
moetemp
force-pushed
the
moe/brook/review/s5-client-reads
branch
2 times, most recently
from
October 26, 2026 08:44
50134b6 to
6636d64
Compare
moetemp
force-pushed
the
moe/brook/review/s4-backends
branch
2 times, most recently
from
October 27, 2026 09:07
0d0ab14 to
9f62387
Compare
moetemp
force-pushed
the
moe/brook/review/s5-client-reads
branch
2 times, most recently
from
October 27, 2026 09:17
86ae5d2 to
c774176
Compare
moetemp
force-pushed
the
moe/brook/review/s4-backends
branch
from
October 27, 2026 09:17
9f62387 to
9afffa1
Compare
moetemp
force-pushed
the
moe/brook/review/s5-client-reads
branch
2 times, most recently
from
October 28, 2026 07:54
fe0790c to
62769cb
Compare
moetemp
force-pushed
the
moe/brook/review/s4-backends
branch
from
October 28, 2026 07:54
36ed7f5 to
c0c0a86
Compare
moetemp
force-pushed
the
moe/brook/review/s5-client-reads
branch
from
October 28, 2026 08:05
62769cb to
7265a04
Compare
Stream and Stream reads.
moetemp
force-pushed
the
moe/brook/review/s4-backends
branch
from
November 5, 2026 17:19
e8cc77e to
9cfb80a
Compare
moetemp
force-pushed
the
moe/brook/review/s5-client-reads
branch
from
November 5, 2026 17:19
96dfdd2 to
7104162
Compare
Stream and Stream reads.Stream, its typed creates and Stream reads.
moetemp
force-pushed
the
moe/brook/review/s4-backends
branch
from
November 5, 2026 23:10
9cfb80a to
98724fe
Compare
moetemp
force-pushed
the
moe/brook/review/s5-client-reads
branch
from
November 5, 2026 23:10
7104162 to
4b9c1eb
Compare
moetemp
force-pushed
the
moe/brook/review/s4-backends
branch
from
November 6, 2026 09:06
98724fe to
b7b7ff1
Compare
moetemp
force-pushed
the
moe/brook/review/s5-client-reads
branch
from
November 6, 2026 09:06
4b9c1eb to
1d4d038
Compare
moetemp
force-pushed
the
moe/brook/review/s4-backends
branch
from
November 6, 2026 09:22
b7b7ff1 to
6668d55
Compare
moetemp
force-pushed
the
moe/brook/review/s5-client-reads
branch
from
November 6, 2026 09:22
1d4d038 to
26c6741
Compare
Owner
Author
|
Closed in favor of #381, the combined branch, which has this change. |
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.
This PR adds
temporalio.client.Stream, which makes the Stream calls outside Workflow code, withClient.create_stream,Client.create_or_get_stream,Client.get_stream,Client.to_streamand Stream reads (streams.Subscription).client.get_stream[Turn]("chat-42"), and the id is positional. Python has no type arguments on a call, so the three calls are properties whose objects take the type as a subscript and keep it for type checkers. With no subscript, the type isAnyand a read gives JSON values.create_streamfails withStreamAlreadyExistsErrorif the id exists.create_or_get_streamsendsUSE_EXISTINGand gets it, and ignores its options there. Both fail on a closed or expired Stream, and each create sends a new request id.get_streamandto_stream(ref, *, payload_type=None)make no call.stream.refis the data to pass on, andstream.proto_refis theStreamRefwire message for a field of a proto message.publishstarts the write at the call and returns a future. The writes of oneStreamkeep the order of the calls. A write error that no caller got raises at the next call of theStream, andclosecloses first, then raises it.async withcloses at the block end on any exception, as the generated resources do. A close that the Store refuses counts as not done, so the block end tries it again. A close of a Stream bound to a Workflow raisesStreamNotOwnerErrorwith no call, and so doesasync withat__aenter__.rpc_timeoutis the deadline of each call on every backend. The Redis and memory backends make no RPC, so they ignorerpc_metadata.Supersededitems. It long-polls and starts at an offset, atENDor at the newestlastRecords, 1 to 1000. It ends when the Stream is closed and the read gave its last item. A read withcreate_waitpauses between the reads that find no Stream.clientepoch and a key for its process. A forked child makes its own key, so two children of one parent never write as one Producer.Supersededitem can withdraw, as runs of consecutive offsets. A client's Records are never withdrawn, so a read keeps nothing for them.Why?
This is the client half of the API, which the next PR runs on Redis and in memory.
Part of the Streams review series.
Checklist
poe lint,poe gen-docsandpytest tests/contrib/streams.