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

Feature/cdnc 2263 Add toggle which can block domain failovers #4786

Merged
merged 7 commits into from
Apr 1, 2022

Conversation

allenchen2244
Copy link
Contributor

@allenchen2244 allenchen2244 commented Mar 31, 2022

What Changed?
Added support for locking down a cluster when we don't want to allow domains to be failed over to it if the cluster is already at capacity

Why?
In certain cases where clusters are already running at capacity failing over additional traffic can have harmful effects.

How did you test it?
Unit tests for both a successful failover when cluster isn't in lockdown and unit tests for failed when cluster is in lockdown.
Was also able to spin up 2 clusters using docker ui voodoo to verify end to end on local machine.

Potential Risks
Nothing should happen initially since default value is false and the blocking code will never be reached.

Release notes

Documentation Changes

@CLAassistant
Copy link

CLAassistant commented Mar 31, 2022

CLA assistant check
All committers have signed the CLA.

@coveralls
Copy link

coveralls commented Mar 31, 2022

Pull Request Test Coverage Report for Build 5c62b2ca-7e1f-4087-bf82-5a41dc3967d4

  • 7 of 11 (63.64%) changed or added relevant lines in 2 files are covered.
  • 14 unchanged lines in 4 files lost coverage.
  • Overall coverage increased (+0.08%) to 57.048%

Changes Missing Coverage Covered Lines Changed/Added Lines %
service/frontend/workflowHandler.go 6 10 60.0%
Files with Coverage Reduction New Missed Lines %
service/matching/matcher.go 1 91.06%
service/history/queue/transfer_queue_processor.go 2 56.86%
service/history/task/transfer_active_task_executor.go 2 71.93%
common/persistence/nosql/nosqlExecutionStore.go 9 61.43%
Totals Coverage Status
Change from base Build 15722c91-c5ad-4680-a132-ce880204eae9: 0.08%
Covered Lines: 83780
Relevant Lines: 146860

💛 - Coveralls

@@ -133,6 +133,7 @@ var (
errClusterNameNotSet = &types.BadRequestError{Message: "Cluster name is not set."}
errEmptyReplicationInfo = &types.BadRequestError{Message: "Replication task info is not set."}
errEmptyQueueType = &types.BadRequestError{Message: "Queue type is not set."}
errDomainInLockdown = &types.BadRequestError{Message: "Domain is not accepting fail overs at this time."}
Copy link
Contributor

Choose a reason for hiding this comment

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

"Domain is not accepting fail overs due to lockdown." I think it's better to tell users there is a lockdown.

@allenchen2244 allenchen2244 changed the title Feature/cdnc 2263 Feature/cdnc 2263 Add toggle which can block domain failovers Apr 1, 2022
@allenchen2244 allenchen2244 enabled auto-merge (squash) April 1, 2022 19:08
@allenchen2244 allenchen2244 merged commit 147172c into uber:master Apr 1, 2022
@allenchen2244 allenchen2244 deleted the feature/CDNC-2263 branch April 1, 2022 19:38
Copy link
Contributor

@davidporter-id-au davidporter-id-au left a comment

Choose a reason for hiding this comment

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

Nice!

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.

5 participants