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

Add missing fields to WorkflowExecutionStartedEventAttributes #647

Merged

Conversation

samarabbas
Copy link
Contributor

WorkflowExecutionStartedEventAttributes now also has support for parent
execution info, child policy and continued execution run id.

fixes #425

@coveralls
Copy link

coveralls commented Apr 1, 2018

Coverage Status

Coverage increased (+0.03%) to 65.412% when pulling 8ddea82 on samarabbas:parent-execution-info into e97e4c0 on uber:master.

20: optional TaskList taskList
30: optional binary input
40: optional i32 executionStartToCloseTimeoutSeconds
50: optional i32 taskStartToCloseTimeoutSeconds
52: optional ChildPolicy childPolicy
Copy link
Contributor

Choose a reason for hiding this comment

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

if the "child policy" represents what this workflow's parent want this workflow to do, then we should use a better name

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@@ -812,6 +817,7 @@ struct StartWorkflowExecutionRequest {
80: optional string identity
90: optional string requestId
100: optional WorkflowIdReusePolicy workflowIdReusePolicy
110: optional ChildPolicy childPolicy
Copy link
Contributor

Choose a reason for hiding this comment

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

same here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

same as above.

historyEvent := b.msBuilder.createNewHistoryEvent(workflow.EventTypeWorkflowExecutionStarted)
attributes := &workflow.WorkflowExecutionStartedEventAttributes{}
attributes.WorkflowType = request.WorkflowType
attributes.TaskList = request.TaskList
attributes.Input = request.Input
attributes.ExecutionStartToCloseTimeoutSeconds = common.Int32Ptr(*request.ExecutionStartToCloseTimeoutSeconds)
attributes.TaskStartToCloseTimeoutSeconds = common.Int32Ptr(*request.TaskStartToCloseTimeoutSeconds)
attributes.ChildPolicy = request.ChildPolicy
attributes.ContinuedExecutionRunId = previousRunID
Copy link
Contributor

Choose a reason for hiding this comment

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

previous run ID is better than ContinuedExecutionRunId, i assume

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Same as above.

@@ -875,7 +875,7 @@ func (e *mutableStateBuilder) AddWorkflowExecutionStartedEventForContinueAsNew(d

createRequest := &workflow.StartWorkflowExecutionRequest{
RequestId: common.StringPtr(uuid.New()),
Domain: common.StringPtr(previousExecutionState.executionInfo.DomainID),
Domain: common.StringPtr(domainName),
Copy link
Contributor

Choose a reason for hiding this comment

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

this is a bug fix?

@samarabbas samarabbas force-pushed the parent-execution-info branch from 442d519 to 060d307 Compare April 2, 2018 19:52
WorkflowExecutionStartedEventAttributes now also has support for parent
execution info, child policy and continued execution run id.

fixes cadence-workflow#425
@samarabbas samarabbas force-pushed the parent-execution-info branch from 060d307 to 3087dea Compare April 2, 2018 20:27
@samarabbas samarabbas merged commit 28489fe into cadence-workflow:master Apr 2, 2018
@samarabbas samarabbas deleted the parent-execution-info branch April 2, 2018 21:14
@johndpope
Copy link

this is a complete rip off of aws swf, right?

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.

Add missing fields to WorkflowExecutionStartedEventAttributes
4 participants