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

Apply parentClosePolicy to child workflow only #2390

Merged
merged 1 commit into from
Jan 20, 2022

Conversation

yycptt
Copy link
Member

@yycptt yycptt commented Jan 19, 2022

What changed?

  • Add externalExecution and ChildWorkflowExecutionOnly field to history terminateWorkflowExecution api (similar to existing history RequestCancelWorkflowExecution)
  • Use those two fields when applying parent close policy (in both transfer task executor and system workflow)

Why?

  • If child workflow is in Init state when a workflow is closed, then we don't have runID for that child and we only use the workflowID to apply the parent close policy, which might be applied to an unrelated workflow.

How did you test it?

  • Added unit test

Potential risks

Is hotfix candidate?
yes.

@yycptt yycptt requested a review from a team January 19, 2022 17:36
@yycptt yycptt merged commit 07cda1b into temporalio:master Jan 20, 2022
@yycptt yycptt deleted the child-only-parent-close-policy branch January 20, 2022 18:50
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.

2 participants