Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow context disable frontend redirection #4547

Merged
merged 1 commit into from
Jul 6, 2023
Merged

Allow context disable frontend redirection #4547

merged 1 commit into from
Jul 6, 2023

Conversation

wxing1292
Copy link
Contributor

What changed?

  • Add RPC header xdc-redirection, allowing disable DC redirection, default to redirect

Why?
Useful if caller does not want to be redirected

How did you test it?
UT

Potential risks
N/A

Is hotfix candidate?
N/A

@wxing1292 wxing1292 requested a review from a team as a code owner June 26, 2023 22:00
@@ -42,9 +44,13 @@ import (
"go.temporal.io/server/common/rpc/interceptor"
)

var (
const (
dcRedirectionContextHeaderName = "xdc-redirection"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Define this in common/headers.go

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this header will only be used by the redirection interceptor (not a common header)
do you still prefer to move this header definition to common/headers.go?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok. I was thinking define all headers in one place. I am fine with either way.

@wxing1292 wxing1292 merged commit 15f2017 into temporalio:master Jul 6, 2023
@wxing1292 wxing1292 deleted the ctx-no-redirection branch July 6, 2023 17:27
wxing1292 added a commit that referenced this pull request Jul 13, 2023
* Add RPC header xdc-redirection, allowing disable DC redirection, default to redirect
wxing1292 added a commit that referenced this pull request Jul 14, 2023
* Add RPC header xdc-redirection, allowing disable DC redirection, default to redirect
dnr pushed a commit that referenced this pull request Jul 21, 2023
* Add RPC header xdc-redirection, allowing disable DC redirection, default to redirect
dnr pushed a commit that referenced this pull request Jul 21, 2023
* Add RPC header xdc-redirection, allowing disable DC redirection, default to redirect
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants