Honor s2s-request-translation=false header in Unary TranslationInterceptor#230
Merged
Conversation
- interceptor/translation_interceptor.go: short-circuit Intercept to the raw handler when IsRequestTranslationDisabled(ctx), matching the existing InterceptStream behavior. Refactor the prefix check into a guard clause and fix latent precedence around the Workflow/Admin prefix OR. - proxy/workflowservice.go: copyContext now also forwards common.RequestTranslationHeaderName, so the disable signal survives the proxy hop alongside xdc-redirection. - .vscode/launch.json: add debug entries for the cluster-a mux client and cluster-b mux server configs. - develop/config/cluster-a-mux-client-proxy.yaml: add a sample namespaceTranslation mapping so the opt-out path can be exercised against a local mux pair. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- interceptor/translation_interceptor_test.go: new table-driven TestTranslationInterceptor backed by a spyTranslator. Verifies that an incoming s2s-request-translation=false header short-circuits translator invocation in the unary path, and that an absent header drives MatchMethod/TranslateRequest/TranslateResponse as expected. - proxy/workflowservice.go: extract PreservedHeaders (xdc-redirection and s2s-request-translation) and use it from copyContext, so the list of forwarded headers lives in one place. - proxy/workflowservice_test.go: rename TestPreserveRedirectionHeader to TestPreservedHeaders and iterate over PreservedHeaders so adding a header to the list automatically extends test coverage. - interceptor/translation_interceptor.go: drop the IsRequestTranslationDisabled check from InterceptStream; only intra-proxy streams skip translation. The header gate stays on the unary path only. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
temporal-nick
approved these changes
May 14, 2026
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 was changed
Use
s2s-request-translation=falsein the grpc header to disable Translator in WorkflowService. This is so we can check original data such as original namespace without any translation.without header
with header
Why?
Checklist
Closes
How was this tested: