Skip to content

[Brook S6] Added the Redis and in-memory Stream backends. - #376

Open
moetemp wants to merge 1 commit into
moe/brook/review/s5-client-readsfrom
moe/brook/review/s6-redis-memory
Open

moetemp wants to merge 1 commit into
moe/brook/review/s5-client-readsfrom
moe/brook/review/s6-redis-memory

Conversation

@moetemp

@moetemp moetemp commented Oct 25, 2026 •

Copy link
Copy Markdown
Owner

What was changed

This PR adds the Redis Stream backend (temporalio.contrib.stream.RedisStreamBackend) and the in-memory backend for tests (temporalio.contrib.stream.testing.MemoryStreamBackend).

  • A client creates a Stream on either with Client.create_stream, which takes backend= for a backend that isn't the default. The package has no create of its own.
  • Both call the temporalio-streams runtime that B1 links. The memory backend has Redis's rules, so tests can swap the Store with no other change.
  • The clients of one temporalio.runtime.Runtime share one Redis runtime object and its connections. So a service that makes a client for each tenant opens no more connections.
  • CI installs redis-server on Linux and macOS, where the Redis lane fails instead of skipping. Redis has no official Windows build, so the lane skips there.
  • The live tests run on both backends. They start their own redis-server, or use TEMPORAL_STREAMS_REDIS_URL.
  • The Activity part of _extension.py and the Worker and Replayer config are in S7, with their first users.

Depends on S5 (#375), and on G3 (#369) and B1 (#370) through feature-streams. No changelog fragment, since S9 has the Streams entry.
Part of the Brook review series.

Why?

These are the first backends that run. From here on, the tests run live on both Stores.

Open question. ExtensionStreamBackend is a public class in a private module, as the base of both backends. Is that OK?

Checklist

  1. How was this tested:
    • poe lint, poe gen-docs and pytest tests/contrib/streams on both backends, with Redis required.
    • Fork CI passes, except the arm jobs, since the fork has no arm runners.

@moetemp moetemp added the skip-changelog Changelog entry rides another PR label Oct 25, 2026
@moetemp
moetemp force-pushed the moe/brook/review/s5-client-reads branch from 252b606 to b70af4e Compare October 26, 2026 00:14
@moetemp
moetemp force-pushed the moe/brook/review/s6-redis-memory branch 2 times, most recently from 326073b to d018d29 Compare October 26, 2026 02:08
@moetemp
moetemp force-pushed the moe/brook/review/s5-client-reads branch from b70af4e to 50134b6 Compare October 26, 2026 02:08
@moetemp
moetemp force-pushed the moe/brook/review/s6-redis-memory branch from d018d29 to b5bb616 Compare October 26, 2026 08:44
@moetemp
moetemp force-pushed the moe/brook/review/s5-client-reads branch from 50134b6 to 6636d64 Compare October 26, 2026 08:44
@moetemp
moetemp force-pushed the moe/brook/review/s6-redis-memory branch from b5bb616 to f5a8d77 Compare October 27, 2026 09:07
@moetemp
moetemp force-pushed the moe/brook/review/s5-client-reads branch 2 times, most recently from 86ae5d2 to c774176 Compare October 27, 2026 09:17
@moetemp
moetemp force-pushed the moe/brook/review/s6-redis-memory branch from f5a8d77 to 6d49da8 Compare October 27, 2026 09:17
@moetemp
moetemp force-pushed the moe/brook/review/s5-client-reads branch from c774176 to fe0790c Compare October 28, 2026 01:33
@moetemp
moetemp force-pushed the moe/brook/review/s6-redis-memory branch from 6d49da8 to 026e0a3 Compare October 28, 2026 01:33
@moetemp
moetemp force-pushed the moe/brook/review/s5-client-reads branch from fe0790c to 62769cb Compare October 28, 2026 07:54
@moetemp
moetemp force-pushed the moe/brook/review/s6-redis-memory branch from 026e0a3 to 11cd676 Compare October 28, 2026 07:54
Both call the `temporalio-streams` runtime that the bridge links. CI
installs `redis-server` on Linux and macOS, so the Redis lane runs
there.
@moetemp
moetemp force-pushed the moe/brook/review/s6-redis-memory branch from 11cd676 to c68482a Compare October 28, 2026 08:05
@moetemp
moetemp force-pushed the moe/brook/review/s5-client-reads branch from 62769cb to 7265a04 Compare October 28, 2026 08:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-changelog Changelog entry rides another PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant