-
Notifications
You must be signed in to change notification settings - Fork 890
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Follow ReusePolicy AllowDuplicateFailedOnly with TerminateExisting (#…
…7097) ## What changed? <!-- Describe what has changed in this PR --> Make WorkflowIdConflictPolicy TerminateExisting follow the WorkflowIdReusePolicy after an _unsuccessful_ termination. NOTE: The frontend change was made in #7099 ## Why? <!-- Tell your future self why have you made these changes --> When the termination from TerminateExisting fails, the user would expect the WorkflowIdReusePolicy to be applied as the Workflow is not running. ## How did you test it? <!-- How have you verified this change? Tested locally? Added a unit test? Checked in staging env? --> Well ... there's no way to test this well right now. There are no unit tests; and the functional test cannot be written without the use of [testhooks](#6938) since there is no other way to simulate the race condition here. I manually added a `sync.Once` into the code that terminates the workflow and can confirm the expected behavior. ## Potential risks <!-- Assuming the worst case, what can be broken when deploying this change to production? --> ## Documentation <!-- Have you made sure this change doesn't falsify anything currently stated in `docs/`? If significant new behavior is added, have you described that in `docs/`? --> ## Is hotfix candidate? <!-- Is this PR a hotfix candidate or does it require a notification to be sent to the broader community? (Yes/No) -->
- Loading branch information
Showing
3 changed files
with
27 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters