Skip to content

add create_request_id to child initiated event #598

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

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions openapi/openapiv2.json
Original file line number Diff line number Diff line change
Expand Up @@ -13835,6 +13835,10 @@
"priority": {
"$ref": "#/definitions/v1Priority",
"title": "Priority metadata"
},
"createRequestId": {
"type": "string",
"description": "A unique identifier for the request to start this child workflow execution. This is used to\ndeduplicate requests to start a child workflow execution with the same workflow ID."
}
}
},
Expand Down
5 changes: 5 additions & 0 deletions openapi/openapiv3.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11086,6 +11086,11 @@ components:
allOf:
- $ref: '#/components/schemas/Priority'
description: Priority metadata
createRequestId:
type: string
description: |-
A unique identifier for the request to start this child workflow execution. This is used to
deduplicate requests to start a child workflow execution with the same workflow ID.
StartWorkflowExecutionRequest:
type: object
properties:
Expand Down
3 changes: 3 additions & 0 deletions temporal/api/history/v1/message.proto
Original file line number Diff line number Diff line change
Expand Up @@ -665,6 +665,9 @@ message StartChildWorkflowExecutionInitiatedEventAttributes {
bool inherit_build_id = 19;
// Priority metadata
temporal.api.common.v1.Priority priority = 20;
// A unique identifier for the request to start this child workflow execution. This is used to
// deduplicate requests to start a child workflow execution with the same workflow ID.
string create_request_id = 21;
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
string create_request_id = 21;
string request_id = 21;

May not need the create_ prefix, but not a big deal

Copy link
Member

Choose a reason for hiding this comment

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

Will this event be in the map at WorkflowExecutionExtendedInfo.request_id_infos when describing a workflow?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No. Child workflow's executionState.RequestIds[StartRequest.GetRequestId()] stores startEvent of the child workflow. (code)

Copy link
Member

Choose a reason for hiding this comment

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

This is used to deduplicate requests to start a child workflow execution with the same workflow ID.

I assume the tuple of workflow run ID + event ID is not enough?

}

message StartChildWorkflowExecutionFailedEventAttributes {
Expand Down
Loading