From fd9bd215b5f9a42f52b19d807f0af520b85c6752 Mon Sep 17 00:00:00 2001 From: Fred Tzeng Date: Mon, 15 Jun 2026 14:01:29 -0700 Subject: [PATCH 1/3] Add start_delay to ActivityOptions for update support --- openapi/openapiv2.json | 4 ++++ openapi/openapiv3.yaml | 7 +++++++ temporal/api/activity/v1/message.proto | 5 +++++ 3 files changed, 16 insertions(+) diff --git a/openapi/openapiv2.json b/openapi/openapiv2.json index 97d10fb8e..b0f1c4e1e 100644 --- a/openapi/openapiv2.json +++ b/openapi/openapiv2.json @@ -13661,6 +13661,10 @@ "priority": { "$ref": "#/definitions/v1Priority", "description": "Priority metadata. If this message is not present, or any fields are not\npresent, they inherit the values from the workflow." + }, + "startDelay": { + "type": "string", + "description": "Time to wait before dispatching the first activity task. This delay is not applied to retry attempts.\nWhen updated, anchored to the original `schedule_time`. If the resulting time is in the past, dispatches\nimmediately." } } }, diff --git a/openapi/openapiv3.yaml b/openapi/openapiv3.yaml index 8f209c6ff..92f67a8ed 100644 --- a/openapi/openapiv3.yaml +++ b/openapi/openapiv3.yaml @@ -9997,6 +9997,13 @@ components: description: |- Priority metadata. If this message is not present, or any fields are not present, they inherit the values from the workflow. + startDelay: + pattern: ^-?(?:0|[1-9][0-9]{0,11})(?:\.[0-9]{1,9})?s$ + type: string + description: |- + Time to wait before dispatching the first activity task. This delay is not applied to retry attempts. + When updated, anchored to the original `schedule_time`. If the resulting time is in the past, dispatches + immediately. ActivityPropertiesModifiedExternallyEventAttributes: type: object properties: diff --git a/temporal/api/activity/v1/message.proto b/temporal/api/activity/v1/message.proto index 01f058576..6d77c7f12 100644 --- a/temporal/api/activity/v1/message.proto +++ b/temporal/api/activity/v1/message.proto @@ -63,6 +63,11 @@ message ActivityOptions { // Priority metadata. If this message is not present, or any fields are not // present, they inherit the values from the workflow. temporal.api.common.v1.Priority priority = 7; + + // Time to wait before dispatching the first activity task. This delay is not applied to retry attempts. + // When updated, anchored to the original `schedule_time`. If the resulting time is in the past, dispatches + // immediately. + google.protobuf.Duration start_delay = 8; } // Information about a standalone activity. From 81a31ea2f3e5481c7795c76349f4c03afb61013d Mon Sep 17 00:00:00 2001 From: Fred Tzeng Date: Tue, 30 Jun 2026 14:43:12 -0700 Subject: [PATCH 2/3] address PR comments --- openapi/openapiv2.json | 10 +++++----- openapi/openapiv3.yaml | 18 +++++++++--------- temporal/api/activity/v1/message.proto | 8 ++++---- .../workflowservice/v1/request_response.proto | 10 +++++----- 4 files changed, 23 insertions(+), 23 deletions(-) diff --git a/openapi/openapiv2.json b/openapi/openapiv2.json index b0f1c4e1e..922e657c1 100644 --- a/openapi/openapiv2.json +++ b/openapi/openapiv2.json @@ -12178,7 +12178,7 @@ }, "workflowStartDelay": { "type": "string", - "description": "Time to wait before dispatching the first workflow task. Cannot be used with `cron_schedule`.\nNote that the signal will be delivered with the first workflow task. If the workflow gets\nanother SignalWithStartWorkflow before the delay a workflow task will be dispatched immediately\nand the rest of the delay period will be ignored, even if that request also had a delay.\nSignal via SignalWorkflowExecution will not unblock the workflow." + "description": "Time to wait before making the first workflow task available for dispatch. Cannot be used with `cron_schedule`.\nNote that the signal will be delivered with the first workflow task. If the workflow gets\nanother SignalWithStartWorkflow before the delay a workflow task will be made available for dispatch immediately\nand the rest of the delay period will be ignored, even if that request also had a delay.\nSignal via SignalWorkflowExecution will not unblock the workflow." }, "userMetadata": { "$ref": "#/definitions/v1UserMetadata", @@ -12338,7 +12338,7 @@ }, "startDelay": { "type": "string", - "description": "Time to wait before dispatching the first activity task. This delay is not applied to retry attempts." + "description": "Time to wait before making the first activity task available for dispatch. This delay is not applied to retry attempts." } } }, @@ -12530,7 +12530,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 making the first workflow task available for dispatch. Cannot be used with `cron_schedule`.\nIf the workflow gets a signal before the delay, a workflow task will be made available for dispatch and the rest\nof the delay will be ignored." }, "completionCallbacks": { "type": "array", @@ -13499,7 +13499,7 @@ }, "startDelay": { "type": "string", - "description": "Time to wait before dispatching the first activity task. This delay is not applied to retry attempts." + "description": "Time to wait before making the first activity task available for dispatch. This delay is not applied to retry attempts." } }, "description": "Information about a standalone activity." @@ -13664,7 +13664,7 @@ }, "startDelay": { "type": "string", - "description": "Time to wait before dispatching the first activity task. This delay is not applied to retry attempts.\nWhen updated, anchored to the original `schedule_time`. If the resulting time is in the past, dispatches\nimmediately." + "title": "Time to wait before making the first activity task available for dispatch. This delay is not applied to retry attempts.\nWhen updated, the time is added to the original `schedule_time`, not to the current time.\nIf the resulting time is in the past, dispatches immediately" } } }, diff --git a/openapi/openapiv3.yaml b/openapi/openapiv3.yaml index 92f67a8ed..54f8c9caa 100644 --- a/openapi/openapiv3.yaml +++ b/openapi/openapiv3.yaml @@ -9851,7 +9851,7 @@ components: startDelay: pattern: ^-?(?:0|[1-9][0-9]{0,11})(?:\.[0-9]{1,9})?s$ type: string - description: Time to wait before dispatching the first activity task. This delay is not applied to retry attempts. + description: Time to wait before making the first activity task available for dispatch. This delay is not applied to retry attempts. description: Information about a standalone activity. ActivityExecutionListInfo: type: object @@ -10001,9 +10001,9 @@ components: pattern: ^-?(?:0|[1-9][0-9]{0,11})(?:\.[0-9]{1,9})?s$ type: string description: |- - Time to wait before dispatching the first activity task. This delay is not applied to retry attempts. - When updated, anchored to the original `schedule_time`. If the resulting time is in the past, dispatches - immediately. + Time to wait before making the first activity task available for dispatch. This delay is not applied to retry attempts. + When updated, the time is added to the original `schedule_time`, not to the current time. + If the resulting time is in the past, dispatches immediately ActivityPropertiesModifiedExternallyEventAttributes: type: object properties: @@ -16371,9 +16371,9 @@ components: 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`. + Time to wait before making the first workflow task available for dispatch. Cannot be used with `cron_schedule`. Note that the signal will be delivered with the first workflow task. If the workflow gets - another SignalWithStartWorkflow before the delay a workflow task will be dispatched immediately + another SignalWithStartWorkflow before the delay a workflow task will be made available for dispatch immediately and the rest of the delay period will be ignored, even if that request also had a delay. Signal via SignalWorkflowExecution will not unblock the workflow. userMetadata: @@ -16590,7 +16590,7 @@ components: startDelay: pattern: ^-?(?:0|[1-9][0-9]{0,11})(?:\.[0-9]{1,9})?s$ type: string - description: Time to wait before dispatching the first activity task. This delay is not applied to retry attempts. + description: Time to wait before making the first activity task available for dispatch. This delay is not applied to retry attempts. StartActivityExecutionResponse: type: object properties: @@ -16979,8 +16979,8 @@ components: 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 + Time to wait before making the first workflow task available for dispatch. Cannot be used with `cron_schedule`. + If the workflow gets a signal before the delay, a workflow task will be made available for dispatch and the rest of the delay will be ignored. completionCallbacks: type: array diff --git a/temporal/api/activity/v1/message.proto b/temporal/api/activity/v1/message.proto index 6d77c7f12..5d5224662 100644 --- a/temporal/api/activity/v1/message.proto +++ b/temporal/api/activity/v1/message.proto @@ -64,9 +64,9 @@ message ActivityOptions { // present, they inherit the values from the workflow. temporal.api.common.v1.Priority priority = 7; - // Time to wait before dispatching the first activity task. This delay is not applied to retry attempts. - // When updated, anchored to the original `schedule_time`. If the resulting time is in the past, dispatches - // immediately. + // Time to wait before making the first activity task available for dispatch. This delay is not applied to retry attempts. + // When updated, the time is added to the original `schedule_time`, not to the current time. + // If the resulting time is in the past, dispatches immediately google.protobuf.Duration start_delay = 8; } @@ -184,7 +184,7 @@ message ActivityExecutionInfo { // Overwritten on each new attempt. Empty if unknown. string sdk_version = 36; - // Time to wait before dispatching the first activity task. This delay is not applied to retry attempts. + // Time to wait before making the first activity task available for dispatch. This delay is not applied to retry attempts. google.protobuf.Duration start_delay = 37; } diff --git a/temporal/api/workflowservice/v1/request_response.proto b/temporal/api/workflowservice/v1/request_response.proto index 263c3c8a0..6f835859a 100644 --- a/temporal/api/workflowservice/v1/request_response.proto +++ b/temporal/api/workflowservice/v1/request_response.proto @@ -182,8 +182,8 @@ message StartWorkflowExecutionRequest { // StartWorkflowExecution. 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 + // Time to wait before making the first workflow task available for dispatch. Cannot be used with `cron_schedule`. + // If the workflow gets a signal before the delay, a workflow task will be made available for dispatch 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. @@ -879,9 +879,9 @@ message SignalWithStartWorkflowExecutionRequest { temporal.api.common.v1.Memo memo = 17; temporal.api.common.v1.SearchAttributes search_attributes = 18; temporal.api.common.v1.Header header = 19; - // Time to wait before dispatching the first workflow task. Cannot be used with `cron_schedule`. + // Time to wait before making the first workflow task available for dispatch. Cannot be used with `cron_schedule`. // Note that the signal will be delivered with the first workflow task. If the workflow gets - // another SignalWithStartWorkflow before the delay a workflow task will be dispatched immediately + // another SignalWithStartWorkflow before the delay a workflow task will be made available for dispatch immediately // and the rest of the delay period will be ignored, even if that request also had a delay. // Signal via SignalWorkflowExecution will not unblock the workflow. google.protobuf.Duration workflow_start_delay = 20; @@ -3186,7 +3186,7 @@ message StartActivityExecutionRequest { repeated temporal.api.common.v1.Link links = 20; // Options for handling conflicts when using ACTIVITY_ID_CONFLICT_POLICY_USE_EXISTING. temporal.api.common.v1.OnConflictOptions on_conflict_options = 21; - // Time to wait before dispatching the first activity task. This delay is not applied to retry attempts. + // Time to wait before making the first activity task available for dispatch. This delay is not applied to retry attempts. google.protobuf.Duration start_delay = 22; } From 7c8d050daa7042fb3d064297ec057fe6a922dbf7 Mon Sep 17 00:00:00 2001 From: Fred Tzeng Date: Tue, 30 Jun 2026 14:45:43 -0700 Subject: [PATCH 3/3] fix comment --- openapi/openapiv2.json | 2 +- openapi/openapiv3.yaml | 2 +- temporal/api/activity/v1/message.proto | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/openapi/openapiv2.json b/openapi/openapiv2.json index 922e657c1..b10dd36bb 100644 --- a/openapi/openapiv2.json +++ b/openapi/openapiv2.json @@ -13664,7 +13664,7 @@ }, "startDelay": { "type": "string", - "title": "Time to wait before making the first activity task available for dispatch. This delay is not applied to retry attempts.\nWhen updated, the time is added to the original `schedule_time`, not to the current time.\nIf the resulting time is in the past, dispatches immediately" + "description": "Time to wait before making the first activity task available for dispatch. This delay is not applied to retry attempts.\nWhen updated, the time is added to the original `schedule_time`, not to the current time.\nIf the resulting time is in the past, the task is made available for dispatch immediately." } } }, diff --git a/openapi/openapiv3.yaml b/openapi/openapiv3.yaml index 54f8c9caa..15e3d9f8e 100644 --- a/openapi/openapiv3.yaml +++ b/openapi/openapiv3.yaml @@ -10003,7 +10003,7 @@ components: description: |- Time to wait before making the first activity task available for dispatch. This delay is not applied to retry attempts. When updated, the time is added to the original `schedule_time`, not to the current time. - If the resulting time is in the past, dispatches immediately + If the resulting time is in the past, the task is made available for dispatch immediately. ActivityPropertiesModifiedExternallyEventAttributes: type: object properties: diff --git a/temporal/api/activity/v1/message.proto b/temporal/api/activity/v1/message.proto index 5d5224662..6aa787203 100644 --- a/temporal/api/activity/v1/message.proto +++ b/temporal/api/activity/v1/message.proto @@ -66,7 +66,7 @@ message ActivityOptions { // Time to wait before making the first activity task available for dispatch. This delay is not applied to retry attempts. // When updated, the time is added to the original `schedule_time`, not to the current time. - // If the resulting time is in the past, dispatches immediately + // If the resulting time is in the past, the task is made available for dispatch immediately. google.protobuf.Duration start_delay = 8; }