-
Notifications
You must be signed in to change notification settings - Fork 140
feat: Introduce FailoverDomain endpoint from cadence-idl #1461
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
base: master
Are you sure you want to change the base?
feat: Introduce FailoverDomain endpoint from cadence-idl #1461
Conversation
Signed-off-by: Gaziza Yestemirova <[email protected]>
Signed-off-by: Gaziza Yestemirova <[email protected]>
Codecov Report✅ All modified and coverable lines are covered by tests. ❌ Your project check has failed because the head coverage (83.13%) is below the target coverage (85.00%). You can increase the head coverage or adjust the target coverage.
... and 2 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
ExcludedFields: []string{ | ||
"NewTasksPerSecond", // [BUG] NewTasksPerSecond is not mapped | ||
"IsolationGroupMetrics", // [BUG] IsolationGroupMetrics is not mapped | ||
"Empty", // Empty field is not mapped |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd recommend adding the reason why it isn't mapped here, otherwise in future it won't be obvious to someone changing the code. e.g 'Empty is only used in matching<>matching communication, and doesn't need to be mapped'
func(attr *apiv1.WorkflowExecutionContinuedAsNewEventAttributes, c fuzz.Continue) { | ||
c.Fuzz(&attr.NewExecutionRunId) | ||
c.Fuzz(&attr.WorkflowType) | ||
c.Fuzz(&attr.TaskList) | ||
c.Fuzz(&attr.Input) | ||
c.Fuzz(&attr.ExecutionStartToCloseTimeout) | ||
c.Fuzz(&attr.TaskStartToCloseTimeout) | ||
c.Fuzz(&attr.DecisionTaskCompletedEventId) | ||
c.Fuzz(&attr.BackoffStartInterval) | ||
c.Fuzz(&attr.Initiator) | ||
c.Fuzz(&attr.Failure) | ||
c.Fuzz(&attr.LastCompletionResult) | ||
c.Fuzz(&attr.Header) | ||
c.Fuzz(&attr.Memo) | ||
c.Fuzz(&attr.SearchAttributes) | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it should be possible to just ignore the ActiveClusterSelectionPolicy field (or have a custom func for that) and then leave the rest as defaults. e.g
func(e apiv1.ActiveClusterSelectionPolicy, c fuzz.Continue) {
// do nothing/create a default field
},
What changed?
Introducing new FailoverDomain endpoint which will handle failover operations for domains.
Why?
Extracting failover operations for domain updates, as it is a separate logic from UpdateDomain. In addition, UpdateDomain endpoint requires admin permissions to perform the operation, while failing over the domain should be done by anyone who has write permissions over the domain.
How did you test it?
Tested locally and unit tests.
Potential risks
As it is a new endpoint, no potential risks