Skip to content

fix(active-active): Fix start workflow with terminate if running policy for active-active domains#7361

Merged
Shaddoll merged 3 commits intocadence-workflow:masterfrom
Shaddoll:aa
Oct 22, 2025
Merged

fix(active-active): Fix start workflow with terminate if running policy for active-active domains#7361
Shaddoll merged 3 commits intocadence-workflow:masterfrom
Shaddoll:aa

Conversation

@Shaddoll
Copy link
Member

What changed?
Update StartWorkflow and SignalWithStartWorkflow API to return a bad request error, if the current workflow is active in a different cluster with a different active cluster policy and the workflowID reuse policy is terminate if running.

Why?
We don't support cross-region transactions, so we're unable to terminate a workflow that's active in another cluster and start a new workflow in the current cluster.

How did you test it?
simulation tests

Potential risks

Release notes

Documentation Changes

}
// TODO(active-active): This is a short-term fix to handle this special case, because we don't have a way to terminate the existing workflow in a different cluster and start a new workflow in the current cluster
// atomically in one transaction. We'll review this when we have time to implement a better solution.
return nil, &types.BadRequestError{Message: "Cannot terminate the existing workflow and start a new workflow because it is active in a different cluster with a different active cluster selection policy."}
Copy link
Contributor

Choose a reason for hiding this comment

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

Are we able to add unit tests for this as well?

Copy link
Member

@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.

discussed offline

@Shaddoll Shaddoll merged commit 1a97019 into cadence-workflow:master Oct 22, 2025
42 checks passed
@Shaddoll Shaddoll deleted the aa branch October 22, 2025 00:16
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