Allow handover and redirection interceptors to cover additional service prefixes#10963
Open
jiechenz wants to merge 1 commit into
Open
Allow handover and redirection interceptors to cover additional service prefixes#10963jiechenz wants to merge 1 commit into
jiechenz wants to merge 1 commit into
Conversation
…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>
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?
NamespaceHandoverInterceptorandRedirectionshort-circuit on theWorkflowServiceprefix,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 gRPCmethod; namespace resolved via the existing
NamespaceIDGetter/NamespaceNameGetterpath, 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 longerowns the partition during/after a handover. The prefix short-circuit made the interceptors no-ops
for anything but
WorkflowService.How did you test it?
Existing tests confirm the default (no-op) behavior is unchanged; the opt-in path is exercised by a downstream functional test.