From 9a4dde29880b63f175b7287285567a20aefdc066 Mon Sep 17 00:00:00 2001 From: Lina Jodoin Date: Wed, 7 Aug 2024 14:55:06 -0700 Subject: [PATCH 1/2] add workflow_start_delay to StartChildWorkflowExecutionCommand --- openapi/openapiv2.json | 8 ++++++++ openapi/openapiv3.yaml | 8 ++++++++ temporal/api/command/v1/message.proto | 5 +++++ temporal/api/history/v1/message.proto | 5 +++++ 4 files changed, 26 insertions(+) diff --git a/openapi/openapiv2.json b/openapi/openapiv2.json index fc1799d0..c4ab59b3 100644 --- a/openapi/openapiv2.json +++ b/openapi/openapiv2.json @@ -10208,6 +10208,10 @@ "inheritBuildId": { "type": "boolean", "description": "If this is set, the child workflow inherits the Build ID of the parent. Otherwise, the assignment\nrules of the child's Task Queue will be used to independently assign a Build ID to it." + }, + "workflowStartDelay": { + "type": "string", + "description": "Time to wait before dispatching the child workflow's first task. Cannot\nbe used with `cron_schedule`. If the workflow gets a signal before the\ndelay, a workflow task will be dispatched and the rest of the delay will\nbe ignored." } } }, @@ -10325,6 +10329,10 @@ "inheritBuildId": { "type": "boolean", "description": "If this is set, the child workflow inherits the Build ID of the parent. Otherwise, the assignment\nrules of the child's Task Queue will be used to independently assign a Build ID to it." + }, + "workflowStartDelay": { + "type": "string", + "description": "Time to wait before dispatching the child workflow's first task. Cannot\nbe used with `cron_schedule`. If the workflow gets a signal before the\ndelay, a workflow task will be dispatched and the rest of the delay will\nbe ignored." } } }, diff --git a/openapi/openapiv3.yaml b/openapi/openapiv3.yaml index 97a02043..7f884a03 100644 --- a/openapi/openapiv3.yaml +++ b/openapi/openapiv3.yaml @@ -7925,6 +7925,14 @@ components: description: |- If this is set, the child workflow inherits the Build ID of the parent. Otherwise, the assignment rules of the child's Task Queue will be used to independently assign a Build ID to it. + workflowStartDelay: + pattern: ^-?(?:0|[1-9][0-9]{0,11})(?:\.[0-9]{1,9})?s$ + type: string + description: |- + Time to wait before dispatching the child workflow's first task. Cannot + be used with `cron_schedule`. If the workflow gets a signal before the + delay, a workflow task will be dispatched and the rest of the delay will + be ignored. StartWorkflowExecutionRequest: type: object properties: diff --git a/temporal/api/command/v1/message.proto b/temporal/api/command/v1/message.proto index 3b8c9d9f..66e98d0f 100644 --- a/temporal/api/command/v1/message.proto +++ b/temporal/api/command/v1/message.proto @@ -226,6 +226,11 @@ message StartChildWorkflowExecutionCommandAttributes { // If this is set, the child workflow inherits the Build ID of the parent. Otherwise, the assignment // rules of the child's Task Queue will be used to independently assign a Build ID to it. bool inherit_build_id = 17; + // Time to wait before dispatching the child workflow's first task. Cannot + // be used with `cron_schedule`. If the workflow gets a signal before the + // delay, a workflow task will be dispatched and the rest of the delay will + // be ignored. + google.protobuf.Duration workflow_start_delay = 18; } message ProtocolMessageCommandAttributes { diff --git a/temporal/api/history/v1/message.proto b/temporal/api/history/v1/message.proto index 174d0869..054bd30f 100644 --- a/temporal/api/history/v1/message.proto +++ b/temporal/api/history/v1/message.proto @@ -623,6 +623,11 @@ message StartChildWorkflowExecutionInitiatedEventAttributes { // If this is set, the child workflow inherits the Build ID of the parent. Otherwise, the assignment // rules of the child's Task Queue will be used to independently assign a Build ID to it. bool inherit_build_id = 19; + // Time to wait before dispatching the child workflow's first task. Cannot + // be used with `cron_schedule`. If the workflow gets a signal before the + // delay, a workflow task will be dispatched and the rest of the delay will + // be ignored. + google.protobuf.Duration workflow_start_delay = 20; } message StartChildWorkflowExecutionFailedEventAttributes { From 839ebbe4cbc52c302d6abb9cafd719c0990bf6a1 Mon Sep 17 00:00:00 2001 From: Lina Jodoin Date: Wed, 14 Aug 2024 15:35:19 -0700 Subject: [PATCH 2/2] Remove incorrect docs about signaling workflows with start delay --- openapi/openapiv2.json | 8 ++++---- openapi/openapiv3.yaml | 9 ++------- temporal/api/command/v1/message.proto | 4 +--- temporal/api/history/v1/message.proto | 4 +--- temporal/api/workflowservice/v1/request_response.proto | 2 -- 5 files changed, 8 insertions(+), 19 deletions(-) diff --git a/openapi/openapiv2.json b/openapi/openapiv2.json index c4ab59b3..c636d7a0 100644 --- a/openapi/openapiv2.json +++ b/openapi/openapiv2.json @@ -5455,7 +5455,7 @@ }, "workflowStartDelay": { "type": "string", - "description": "Time to wait before dispatching the first workflow task. Cannot be used with `cron_schedule`.\nIf the workflow gets a signal before the delay, a workflow task will be dispatched and the rest\nof the delay will be ignored." + "description": "Time to wait before dispatching the first workflow task. Cannot be used with `cron_schedule`." }, "completionCallbacks": { "type": "array", @@ -10211,7 +10211,7 @@ }, "workflowStartDelay": { "type": "string", - "description": "Time to wait before dispatching the child workflow's first task. Cannot\nbe used with `cron_schedule`. If the workflow gets a signal before the\ndelay, a workflow task will be dispatched and the rest of the delay will\nbe ignored." + "description": "Time to wait before dispatching the child workflow's first task. Cannot\nbe used with `cron_schedule`." } } }, @@ -10332,7 +10332,7 @@ }, "workflowStartDelay": { "type": "string", - "description": "Time to wait before dispatching the child workflow's first task. Cannot\nbe used with `cron_schedule`. If the workflow gets a signal before the\ndelay, a workflow task will be dispatched and the rest of the delay will\nbe ignored." + "description": "Time to wait before dispatching the child workflow's first task. Cannot\nbe used with `cron_schedule`." } } }, @@ -10488,7 +10488,7 @@ }, "workflowStartDelay": { "type": "string", - "description": "Time to wait before dispatching the first workflow task. Cannot be used with `cron_schedule`.\nIf the workflow gets a signal before the delay, a workflow task will be dispatched and the rest\nof the delay will be ignored." + "description": "Time to wait before dispatching the first workflow task. Cannot be used with `cron_schedule`." }, "completionCallbacks": { "type": "array", diff --git a/openapi/openapiv3.yaml b/openapi/openapiv3.yaml index 7f884a03..0a7c2799 100644 --- a/openapi/openapiv3.yaml +++ b/openapi/openapiv3.yaml @@ -7930,9 +7930,7 @@ components: type: string description: |- Time to wait before dispatching the child workflow's first task. Cannot - be used with `cron_schedule`. If the workflow gets a signal before the - delay, a workflow task will be dispatched and the rest of the delay will - be ignored. + be used with `cron_schedule`. StartWorkflowExecutionRequest: type: object properties: @@ -8026,10 +8024,7 @@ components: workflowStartDelay: pattern: ^-?(?:0|[1-9][0-9]{0,11})(?:\.[0-9]{1,9})?s$ type: string - description: |- - Time to wait before dispatching the first workflow task. Cannot be used with `cron_schedule`. - If the workflow gets a signal before the delay, a workflow task will be dispatched and the rest - of the delay will be ignored. + description: Time to wait before dispatching the first workflow task. Cannot be used with `cron_schedule`. completionCallbacks: type: array items: diff --git a/temporal/api/command/v1/message.proto b/temporal/api/command/v1/message.proto index 66e98d0f..b0703809 100644 --- a/temporal/api/command/v1/message.proto +++ b/temporal/api/command/v1/message.proto @@ -227,9 +227,7 @@ message StartChildWorkflowExecutionCommandAttributes { // rules of the child's Task Queue will be used to independently assign a Build ID to it. bool inherit_build_id = 17; // Time to wait before dispatching the child workflow's first task. Cannot - // be used with `cron_schedule`. If the workflow gets a signal before the - // delay, a workflow task will be dispatched and the rest of the delay will - // be ignored. + // be used with `cron_schedule`. google.protobuf.Duration workflow_start_delay = 18; } diff --git a/temporal/api/history/v1/message.proto b/temporal/api/history/v1/message.proto index 054bd30f..af98d925 100644 --- a/temporal/api/history/v1/message.proto +++ b/temporal/api/history/v1/message.proto @@ -624,9 +624,7 @@ message StartChildWorkflowExecutionInitiatedEventAttributes { // rules of the child's Task Queue will be used to independently assign a Build ID to it. bool inherit_build_id = 19; // Time to wait before dispatching the child workflow's first task. Cannot - // be used with `cron_schedule`. If the workflow gets a signal before the - // delay, a workflow task will be dispatched and the rest of the delay will - // be ignored. + // be used with `cron_schedule`. google.protobuf.Duration workflow_start_delay = 20; } diff --git a/temporal/api/workflowservice/v1/request_response.proto b/temporal/api/workflowservice/v1/request_response.proto index f25e44f0..f55d8e59 100644 --- a/temporal/api/workflowservice/v1/request_response.proto +++ b/temporal/api/workflowservice/v1/request_response.proto @@ -186,8 +186,6 @@ message StartWorkflowExecutionRequest { temporal.api.failure.v1.Failure continued_failure = 18; temporal.api.common.v1.Payloads last_completion_result = 19; // Time to wait before dispatching the first workflow task. Cannot be used with `cron_schedule`. - // If the workflow gets a signal before the delay, a workflow task will be dispatched and the rest - // of the delay will be ignored. google.protobuf.Duration workflow_start_delay = 20; // Callbacks to be called by the server when this workflow reaches a terminal state. // If the workflow continues-as-new, these callbacks will be carried over to the new execution.