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

Option to enable forwarding all APIs #2367

Merged
merged 1 commit into from
Jan 12, 2022

Conversation

yiminc
Copy link
Member

@yiminc yiminc commented Jan 12, 2022

What changed?
Add option to enable forwarding for all APIs

Why?
So it is possible to forward all calls if needed during migration.

How did you test it?
unit test

Potential risks
No

Is hotfix candidate?
No

@yiminc yiminc requested a review from a team January 12, 2022 05:35
@@ -71,6 +74,7 @@ type (
currentClusterName string
config *Config
namespaceRegistry namespace.Registry
enableForAllAPIs bool
Copy link
Contributor

Choose a reason for hiding this comment

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

hacky solution?

@@ -51,6 +51,9 @@ const (
// 6. QueryWorkflow
// please also reference selectedAPIsForwardingRedirectionPolicyWhitelistedAPIs
DCRedirectionPolicySelectedAPIsForwarding = "selected-apis-forwarding"

// DCRedirectionPolicyAllAPIsForwarding means forwarding all APIs based on namespace active cluster
DCRedirectionPolicyAllAPIsForwarding = "all-apis-forwarding"
Copy link
Member

Choose a reason for hiding this comment

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

If we have a redirection policy for Selected API forwarding, why isn't "redirect all" just a special case where they are all Selected?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, it is a flag in the implementation struct and everything is the same except when detecting if the called API is in the selected set.

@yiminc yiminc merged commit f3780d0 into temporalio:master Jan 12, 2022
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.

3 participants