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

Set ParentClosePolicy default value #481

Merged

Conversation

alexshtin
Copy link
Member

@alexshtin alexshtin commented Jun 27, 2020

What changed?
ParentClosePolicy on request is set to Terminate if case if not specified.
WorkflowIdReusePolicy is also set to default value in handleDecisionStartChildWorkflow.

Why?
taskProcessor returns error if ParentClosePolicy or WorkflowIdReusePolicy is not specified on request and there is no validation logic for it.

How did you test it?
Run all tests (including Go SDK integration tests).

Potential risks
No risks.

@alexshtin alexshtin requested a review from mfateev June 27, 2020 05:57

func SetDefaultParentClosePolicy(f *enumspb.ParentClosePolicy) {
if *f == enumspb.PARENT_CLOSE_POLICY_UNSPECIFIED {
*f = enumspb.PARENT_CLOSE_POLICY_ABANDON
Copy link
Member

Choose a reason for hiding this comment

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

The default should be TERMINATE.
How do I determine default looking at the proto definition?

@alexshtin alexshtin merged commit 88b3049 into temporalio:master Jun 28, 2020
@alexshtin alexshtin deleted the fix/parent-close-policy-default branch June 28, 2020 00:05
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.

None yet

2 participants