Skip to content

[Brook] Mapped a Store's missing capability to StreamUnsupportedError. - #340

Closed
moetemp wants to merge 1 commit into
moe/brook/v3/p17-regen-n7from
moe/brook/v3/p18-store-capabilities
Closed

moetemp wants to merge 1 commit into
moe/brook/v3/p17-regen-n7from
moe/brook/v3/p18-store-capabilities

Conversation

@moetemp

@moetemp moetemp commented Oct 21, 2026

Copy link
Copy Markdown
Owner

What changed?

This PR maps the crate's stream_unsupported reason to a new StreamUnsupportedError, which is non-retryable and exported with the other Stream errors. The crate pin moves to s9 3984189f, where each Store declares its capabilities and a call that needs a missing one fails with that reason, code UNIMPLEMENTED, and the capability's name at the end of the message. MemoryStreamPlugin takes durable_writes, so a test can ask the memory Store for replicas it doesn't have.

Please note that a Workflow flush runs in Core's before_complete, so on the Workflow path a missing capability fails the Workflow Task with the capability's name, and Workflow code sees no exception. Activities and clients get StreamUnsupportedError.

Why?

A Store other than Redis may lack a feature, and the caller must learn which one by name.

How did you test it?

pytest tests/contrib/streams. The mapping test checks the error class, code and name. A live test runs MemoryStreamPlugin(durable_writes=1) and checks that the Workflow Task fails with replica_wait. test_vectors still matches the crate's protos and vectors. Full poe lint and the full suite pass at this layer, except test_envconfig, which reads a config file on this host.

  • Unit Tests
  • Staging
  • End to End Tests

The crate's Stores now declare capabilities, and a call that needs a missing one fails with the stream_unsupported reason and the capability's name. The crate pin moves to s9, and MemoryStreamPlugin takes durable_writes to test it.
@moetemp

moetemp commented Oct 25, 2026

Copy link
Copy Markdown
Owner Author

Closing as stale. This layer is folded into the v5 tip, #365, and the upstream review uses a fresh series instead. Plan: https://www.notion.so/4048fc567738814990b7c796ac28fe3f

@moetemp moetemp closed this Oct 25, 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