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

stop redirection for deprecated domains #5863

Conversation

3vilhamster
Copy link
Contributor

@3vilhamster 3vilhamster commented Apr 4, 2024

Handle deprecated and deleted domains on frontend redirection and add context to panics inside redirection.

What changed?
If a domain is deleted or deprecated, redirecting to the other cluster is pointless. So, it should be safe to return an error.
Also, redirection can panic if the domain has an active cluster that is not currently connected to the cluster. I've added domain information to the panic message so it will be easier to track offending callers.

Why?
In Uber, we have a lot of clusters, and domains are migrated across them. If a customer is calling to the wrong environment, it causes panic during redirection. We want to:
a. Improve visibility of these failures to identify problematic domains.
b. Deprecate domains that were migrated out to stop it altogether.

How did you test it?
I added a unit test for a deprecated domain case.

Potential risks
The outgoing error for deprecated domain calls can change because the error will now be returned on the frontend without propagating the request to underlying layers.

Release notes
cadence-frontend no longer redirects calls to deprecated domains.

Documentation Changes

Copy link

codecov bot commented Apr 4, 2024

Codecov Report

Merging #5863 (a3cdbf3) into master (7a7f629) will increase coverage by 0.00%.
Report is 1 commits behind head on master.
The diff coverage is 66.66%.

❗ Current head a3cdbf3 differs from pull request most recent head b47ea75. Consider uploading reports for the commit b47ea75 to get more accurate results

Additional details and impacted files
Files Coverage Δ
...ice/frontend/wrappers/clusterredirection/policy.go 72.36% <100.00%> (+7.09%) ⬆️
common/taskTokenSerializerInterfaces.go 0.00% <0.00%> (ø)
...ontend/wrappers/clusterredirection/callwrappers.go 75.00% <75.00%> (ø)

... and 5 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1f120fd...b47ea75. Read the comment docs.

@3vilhamster 3vilhamster enabled auto-merge (squash) April 4, 2024 21:47
@3vilhamster 3vilhamster merged commit 64cc6d8 into cadence-workflow:master Apr 4, 2024
18 checks passed
@coveralls
Copy link

coveralls commented Apr 5, 2024

Pull Request Test Coverage Report for Build 018eab14-e55a-4997-9f1f-55c06ea59496

Details

  • 31 of 34 (91.18%) changed or added relevant lines in 3 files are covered.
  • 53 unchanged lines in 7 files lost coverage.
  • Overall coverage increased (+0.01%) to 66.307%

Changes Missing Coverage Covered Lines Changed/Added Lines %
service/frontend/wrappers/clusterredirection/callwrappers.go 19 22 86.36%
Files with Coverage Reduction New Missed Lines %
common/task/weighted_round_robin_task_scheduler.go 1 89.05%
service/matching/taskReader.go 2 84.88%
common/util.go 2 91.78%
service/history/task/transfer_standby_task_executor.go 6 86.6%
common/persistence/nosql/nosqlplugin/cassandra/workflow_parsing_utils.go 6 91.74%
service/history/execution/mutable_state_task_refresher.go 16 66.46%
service/history/task/task_util.go 20 70.57%
Totals Coverage Status
Change from base Build 018eab10-7962-45ca-bba9-68d4848ba87c: 0.01%
Covered Lines: 97040
Relevant Lines: 146349

💛 - Coveralls

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.

4 participants