Skip to content
Open
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
12 changes: 8 additions & 4 deletions openapi/openapiv2.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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."
}
}
},
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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."
Expand Down Expand Up @@ -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 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."
}
}
},
Expand Down
19 changes: 13 additions & 6 deletions openapi/openapiv3.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 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, the task is made available for dispatch immediately.
ActivityPropertiesModifiedExternallyEventAttributes:
type: object
properties:
Expand Down Expand Up @@ -16364,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:
Expand Down Expand Up @@ -16583,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:
Expand Down Expand Up @@ -16972,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
Expand Down
7 changes: 6 additions & 1 deletion temporal/api/activity/v1/message.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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 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, the task is made available for dispatch immediately.
google.protobuf.Duration start_delay = 8;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

How about we word this as

Time to wait before making the first activity task available for dispatch

Internally, there are two dispatch times: (1) the time that History dispatches a task to Matching and (2) the time that Matching dispatches a task to a user worker. Only (2) is directly relevant to users, and (1) != (2) because of the possibility of non-sync match (as well as workers being offline).

If you agree with this suggestion, it should also be applied to the StartWorkflow, SignalWithStartWorkflow, StartActivity doc comments.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Makes sense. Applied comment where applicable.

}

// Information about a standalone activity.
Expand Down Expand Up @@ -179,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;
}

Expand Down
10 changes: 5 additions & 5 deletions temporal/api/workflowservice/v1/request_response.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}

Expand Down
Loading