Skip to content

Allow handover and redirection interceptors to cover additional service prefixes#10963

Open
jiechenz wants to merge 1 commit into
mainfrom
jiechenz/handover-interceptor-seam
Open

Allow handover and redirection interceptors to cover additional service prefixes#10963
jiechenz wants to merge 1 commit into
mainfrom
jiechenz/handover-interceptor-seam

Conversation

@jiechenz

@jiechenz jiechenz commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

What changed?

NamespaceHandoverInterceptor and Redirection short-circuit on the WorkflowService prefix,
so requests to other frontend gRPC services skip handover gating and cross-cell redirection. Add
two opt-in, default-no-op seams (WorkflowService behavior unchanged):

  • NamespaceHandoverInterceptor.WithAdditionalServicePrefixes(...) — gate additional service prefixes.
  • Redirection.WithRedirectResponses(...) — register methods as redirectable, keyed by full gRPC
    method; namespace resolved via the existing NamespaceIDGetter/NamespaceNameGetter path, fails closed.

Neither references any embedding service; callers inject the prefix/response map.

Why?

Workflow-scoped requests on other frontend services must observe the same handover wait and
active-cluster redirection as WorkflowService, or they can be served on a cell that no longer
owns the partition during/after a handover. The prefix short-circuit made the interceptors no-ops
for anything but WorkflowService.

How did you test it?

  • built
  • covered by existing tests
  • run locally and tested manually
  • added new unit test(s)
  • added new functional test(s)

Existing tests confirm the default (no-op) behavior is unchanged; the opt-in path is exercised by a downstream functional test.

…ce prefixes

NamespaceHandoverInterceptor and Redirection short-circuit on the
WorkflowService prefix, so requests to other gRPC services bypass the
handover gate and cross-cell redirection entirely. Add two opt-in seams
that default to no-ops (WorkflowService-only behavior is preserved) and do
not reference any embedding service:

- NamespaceHandoverInterceptor.WithAdditionalServicePrefixes: extend the
  handover gate to additional gRPC service prefixes.
- Redirection.WithRedirectResponses: register additional methods as
  globally-redirectable, keyed by full gRPC method (avoids bare-name
  collisions) with their response constructors. Namespace is resolved via
  the standard NamespaceIDGetter/NamespaceNameGetter path and fails closed.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@jiechenz jiechenz requested review from a team as code owners July 8, 2026 00:47
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