Skip to content

Commit 825908a

Browse files
authored
Merge branch 'master' into kannan/worker-commands-capability
2 parents 3cf517f + 01e1cde commit 825908a

6 files changed

Lines changed: 97 additions & 54 deletions

File tree

openapi/openapiv2.json

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11210,6 +11210,10 @@
1121011210
"onConflictOptions": {
1121111211
"$ref": "#/definitions/apiCommonV1OnConflictOptions",
1121211212
"description": "Options for handling conflicts when using ACTIVITY_ID_CONFLICT_POLICY_USE_EXISTING."
11213+
},
11214+
"startDelay": {
11215+
"type": "string",
11216+
"description": "Time to wait before dispatching the first activity task. This delay is not applied to retry attempts."
1121311217
}
1121411218
}
1121511219
},
@@ -17965,6 +17969,14 @@
1796517969
"priority": {
1796617970
"$ref": "#/definitions/v1Priority",
1796717971
"title": "Priority metadata"
17972+
},
17973+
"timeSkippingConfig": {
17974+
"$ref": "#/definitions/v1TimeSkippingConfig",
17975+
"description": "The propagated time-skipping configuration for the child workflow."
17976+
},
17977+
"initialSkippedDuration": {
17978+
"type": "string",
17979+
"description": "Propagate the duration skipped to the child workflow."
1796817980
}
1796917981
}
1797017982
},
@@ -18353,11 +18365,7 @@
1835318365
"properties": {
1835418366
"enabled": {
1835518367
"type": "boolean",
18356-
"description": "Enables or disables time skipping for this workflow execution.\nBy default, this field is propagated to transitively related workflows (child workflows/start-as-new/reset) \nat the time they are started.\nChanges made after a transitively related workflow has started are not propagated."
18357-
},
18358-
"disablePropagation": {
18359-
"type": "boolean",
18360-
"description": "If set, the enabled field is not propagated to transitively related workflows."
18368+
"description": "Enables or disables time skipping for this workflow execution."
1836118369
},
1836218370
"maxSkippedDuration": {
1836318371
"type": "string",
@@ -18366,14 +18374,9 @@
1836618374
"maxElapsedDuration": {
1836718375
"type": "string",
1836818376
"description": "Maximum elapsed time since time skipping was enabled.\nThis includes both skipped time and real time elapsing."
18369-
},
18370-
"maxTargetTime": {
18371-
"type": "string",
18372-
"format": "date-time",
18373-
"description": "Absolute virtual timestamp at which time skipping is disabled.\nTime skipping will not advance beyond this point."
1837418377
}
1837518378
},
18376-
"description": "Configuration for time skipping during a workflow execution.\nWhen enabled, virtual time advances automatically whenever there is no in-flight work.\nIn-flight work includes activities, child workflows, Nexus operations, signal/cancel external workflow operations,\nand possibly other features added in the future.\nUser timers are not classified as in-flight work and will be skipped over.\nWhen time advances, it skips to the earlier of the next user timer or the configured bound, if either exists."
18379+
"description": "Configuration for time skipping during a workflow execution.\nWhen enabled, virtual time advances automatically whenever there is no in-flight work.\nIn-flight work includes activities, child workflows, Nexus operations, signal/cancel external workflow operations,\nand possibly other features added in the future.\nUser timers are not classified as in-flight work and will be skipped over.\nWhen time advances, it skips to the earlier of the next user timer or the configured bound, if either exists.\n\nPropagation behavior of time skipping:\nThe enabled flag, bound fields, and accumulated skipped duration are propagated to related executions as follows:\n(1) Child workflows and continue-as-new: both the configuration and the accumulated skipped duration are\n inherited from the current execution. The configured bound is shared between the inherited skipped\n duration and any additional duration skipped by the new run.\n(2) Retry and cron: the configuration and accumulated skipped duration are inherited as recorded when the\n current workflow started; the accumulated skipped duration of the current run is not propagated.\n(3) Reset: the new run retains the time-skipping configuration of the current execution. Because reset replays\n all events up to the reset point and re-applies any UpdateWorkflowExecutionOptions changes made after that\n point, the resulting run ends up with the same final time-skipping configuration as the previous run."
1837718380
},
1837818381
"v1TimeoutFailureInfo": {
1837918382
"type": "object",
@@ -19657,7 +19660,7 @@
1965719660
},
1965819661
"timeSkippingConfig": {
1965919662
"$ref": "#/definitions/v1TimeSkippingConfig",
19660-
"description": "Time-skipping configuration for this workflow execution.\nIf not set, the time-skipping conf will not get updated upon request, \ni.e. the existing time-skipping conf will be preserved."
19663+
"description": "Time-skipping configuration for this workflow execution.\nIf not set, the time-skipping configuration is not updated by this request;\nthe existing configuration is preserved."
1966119664
}
1966219665
}
1966319666
},
@@ -19927,6 +19930,10 @@
1992719930
"timeSkippingConfig": {
1992819931
"$ref": "#/definitions/v1TimeSkippingConfig",
1992919932
"description": "Initial time-skipping configuration for this workflow execution, recorded at start time.\nThis may have been set explicitly via the start workflow request, or propagated from a\nparent/previous execution.\n\nThe configuration may be updated after start via UpdateWorkflowExecutionOptions, which\nwill be reflected in the WorkflowExecutionOptionsUpdatedEvent."
19933+
},
19934+
"initialSkippedDuration": {
19935+
"type": "string",
19936+
"description": "The time skipped by the previous execution that started this workflow.\nIt can happen in cases of child workflows and continue-as-new workflows."
1993019937
}
1993119938
},
1993219939
"title": "Always the first event in workflow history"

openapi/openapiv3.yaml

Lines changed: 24 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -15382,6 +15382,10 @@ components:
1538215382
allOf:
1538315383
- $ref: '#/components/schemas/OnConflictOptions'
1538415384
description: Options for handling conflicts when using ACTIVITY_ID_CONFLICT_POLICY_USE_EXISTING.
15385+
startDelay:
15386+
pattern: ^-?(?:0|[1-9][0-9]{0,11})(?:\.[0-9]{1,9})?s$
15387+
type: string
15388+
description: Time to wait before dispatching the first activity task. This delay is not applied to retry attempts.
1538515389
StartActivityExecutionResponse:
1538615390
type: object
1538715391
properties:
@@ -15556,6 +15560,14 @@ components:
1555615560
allOf:
1555715561
- $ref: '#/components/schemas/Priority'
1555815562
description: Priority metadata
15563+
timeSkippingConfig:
15564+
allOf:
15565+
- $ref: '#/components/schemas/TimeSkippingConfig'
15566+
description: The propagated time-skipping configuration for the child workflow.
15567+
initialSkippedDuration:
15568+
pattern: ^-?(?:0|[1-9][0-9]{0,11})(?:\.[0-9]{1,9})?s$
15569+
type: string
15570+
description: Propagate the duration skipped to the child workflow.
1555915571
StartNexusOperationExecutionRequest:
1556015572
type: object
1556115573
properties:
@@ -16242,10 +16254,7 @@ components:
1624216254
properties:
1624316255
enabled:
1624416256
type: boolean
16245-
description: "Enables or disables time skipping for this workflow execution.\n By default, this field is propagated to transitively related workflows (child workflows/start-as-new/reset) \n at the time they are started.\n Changes made after a transitively related workflow has started are not propagated."
16246-
disablePropagation:
16247-
type: boolean
16248-
description: If set, the enabled field is not propagated to transitively related workflows.
16257+
description: Enables or disables time skipping for this workflow execution.
1624916258
maxSkippedDuration:
1625016259
pattern: ^-?(?:0|[1-9][0-9]{0,11})(?:\.[0-9]{1,9})?s$
1625116260
type: string
@@ -16256,19 +16265,7 @@ components:
1625616265
description: |-
1625716266
Maximum elapsed time since time skipping was enabled.
1625816267
This includes both skipped time and real time elapsing.
16259-
maxTargetTime:
16260-
type: string
16261-
description: |-
16262-
Absolute virtual timestamp at which time skipping is disabled.
16263-
Time skipping will not advance beyond this point.
16264-
format: date-time
16265-
description: |-
16266-
Configuration for time skipping during a workflow execution.
16267-
When enabled, virtual time advances automatically whenever there is no in-flight work.
16268-
In-flight work includes activities, child workflows, Nexus operations, signal/cancel external workflow operations,
16269-
and possibly other features added in the future.
16270-
User timers are not classified as in-flight work and will be skipped over.
16271-
When time advances, it skips to the earlier of the next user timer or the configured bound, if either exists.
16268+
description: "Configuration for time skipping during a workflow execution.\n When enabled, virtual time advances automatically whenever there is no in-flight work.\n In-flight work includes activities, child workflows, Nexus operations, signal/cancel external workflow operations,\n and possibly other features added in the future.\n User timers are not classified as in-flight work and will be skipped over.\n When time advances, it skips to the earlier of the next user timer or the configured bound, if either exists.\n \n Propagation behavior of time skipping:\n The enabled flag, bound fields, and accumulated skipped duration are propagated to related executions as follows:\n (1) Child workflows and continue-as-new: both the configuration and the accumulated skipped duration are\n inherited from the current execution. The configured bound is shared between the inherited skipped\n duration and any additional duration skipped by the new run.\n (2) Retry and cron: the configuration and accumulated skipped duration are inherited as recorded when the\n current workflow started; the accumulated skipped duration of the current run is not propagated.\n (3) Reset: the new run retains the time-skipping configuration of the current execution. Because reset replays\n all events up to the reset point and re-applies any UpdateWorkflowExecutionOptions changes made after that\n point, the resulting run ends up with the same final time-skipping configuration as the previous run."
1627216269
TimeoutFailureInfo:
1627316270
type: object
1627416271
properties:
@@ -18218,7 +18215,10 @@ components:
1821818215
timeSkippingConfig:
1821918216
allOf:
1822018217
- $ref: '#/components/schemas/TimeSkippingConfig'
18221-
description: "Time-skipping configuration for this workflow execution.\n If not set, the time-skipping conf will not get updated upon request, \n i.e. the existing time-skipping conf will be preserved."
18218+
description: |-
18219+
Time-skipping configuration for this workflow execution.
18220+
If not set, the time-skipping configuration is not updated by this request;
18221+
the existing configuration is preserved.
1822218222
WorkflowExecutionOptionsUpdatedEventAttributes:
1822318223
type: object
1822418224
properties:
@@ -18562,6 +18562,12 @@ components:
1856218562

1856318563
The configuration may be updated after start via UpdateWorkflowExecutionOptions, which
1856418564
will be reflected in the WorkflowExecutionOptionsUpdatedEvent.
18565+
initialSkippedDuration:
18566+
pattern: ^-?(?:0|[1-9][0-9]{0,11})(?:\.[0-9]{1,9})?s$
18567+
type: string
18568+
description: |-
18569+
The time skipped by the previous execution that started this workflow.
18570+
It can happen in cases of child workflows and continue-as-new workflows.
1856518571
description: Always the first event in workflow history
1856618572
WorkflowExecutionTerminatedEventAttributes:
1856718573
type: object

temporal/api/history/v1/message.proto

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,10 @@ message WorkflowExecutionStartedEventAttributes {
204204
// The configuration may be updated after start via UpdateWorkflowExecutionOptions, which
205205
// will be reflected in the WorkflowExecutionOptionsUpdatedEvent.
206206
temporal.api.workflow.v1.TimeSkippingConfig time_skipping_config = 41;
207+
208+
// The time skipped by the previous execution that started this workflow.
209+
// It can happen in cases of child workflows and continue-as-new workflows.
210+
google.protobuf.Duration initial_skipped_duration = 42;
207211
}
208212

209213
// Wrapper for a target deployment version that the SDK declined to upgrade to.
@@ -770,6 +774,12 @@ message StartChildWorkflowExecutionInitiatedEventAttributes {
770774
bool inherit_build_id = 19 [deprecated = true];
771775
// Priority metadata
772776
temporal.api.common.v1.Priority priority = 20;
777+
778+
// The propagated time-skipping configuration for the child workflow.
779+
temporal.api.workflow.v1.TimeSkippingConfig time_skipping_config = 21;
780+
781+
// Propagate the duration skipped to the child workflow.
782+
google.protobuf.Duration initial_skipped_duration = 30;
773783
}
774784

775785
message StartChildWorkflowExecutionFailedEventAttributes {
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
syntax = "proto3";
2+
3+
package temporal.api.sdk.v1;
4+
5+
option go_package = "go.temporal.io/api/sdk/v1;sdk";
6+
option java_package = "io.temporal.api.sdk.v1";
7+
option java_multiple_files = true;
8+
option java_outer_classname = "ExternalStorageProto";
9+
option ruby_package = "Temporalio::Api::Sdk::V1";
10+
option csharp_namespace = "Temporalio.Api.Sdk.V1";
11+
12+
// ExternalStorageReference identifies a payload stored in an external storage system.
13+
// It is used as a claim-check token, allowing the actual payload data to be retrieved
14+
// from the named driver using the provided claim data.
15+
message ExternalStorageReference {
16+
// The name of the storage driver responsible for retrieving the payload.
17+
string driver_name = 1;
18+
// Driver-specific key-value pairs that identify and provide access to the stored payload.
19+
map<string, string> claim_data = 2;
20+
}

temporal/api/workflow/v1/message.proto

Lines changed: 21 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -580,8 +580,8 @@ message WorkflowExecutionOptions {
580580
temporal.api.common.v1.Priority priority = 2;
581581

582582
// Time-skipping configuration for this workflow execution.
583-
// If not set, the time-skipping conf will not get updated upon request,
584-
// i.e. the existing time-skipping conf will be preserved.
583+
// If not set, the time-skipping configuration is not updated by this request;
584+
// the existing configuration is preserved.
585585
TimeSkippingConfig time_skipping_config = 3;
586586
}
587587

@@ -591,42 +591,39 @@ message WorkflowExecutionOptions {
591591
// and possibly other features added in the future.
592592
// User timers are not classified as in-flight work and will be skipped over.
593593
// When time advances, it skips to the earlier of the next user timer or the configured bound, if either exists.
594+
//
595+
// Propagation behavior of time skipping:
596+
// The enabled flag, bound fields, and accumulated skipped duration are propagated to related executions as follows:
597+
// (1) Child workflows and continue-as-new: both the configuration and the accumulated skipped duration are
598+
// inherited from the current execution. The configured bound is shared between the inherited skipped
599+
// duration and any additional duration skipped by the new run.
600+
// (2) Retry and cron: the configuration and accumulated skipped duration are inherited as recorded when the
601+
// current workflow started; the accumulated skipped duration of the current run is not propagated.
602+
// (3) Reset: the new run retains the time-skipping configuration of the current execution. Because reset replays
603+
// all events up to the reset point and re-applies any UpdateWorkflowExecutionOptions changes made after that
604+
// point, the resulting run ends up with the same final time-skipping configuration as the previous run.
594605
message TimeSkippingConfig {
606+
reserved 2, 6;
607+
reserved "disable_propagation", "max_target_time";
595608

596609
// Enables or disables time skipping for this workflow execution.
597-
// By default, this field is propagated to transitively related workflows (child workflows/start-as-new/reset)
598-
// at the time they are started.
599-
// Changes made after a transitively related workflow has started are not propagated.
600610
bool enabled = 1;
601611

602-
// If set, the enabled field is not propagated to transitively related workflows.
603-
bool disable_propagation = 2;
604-
605-
// Optional bound that limits how long time skipping remains active.
606-
// Once the bound is reached, time skipping is automatically disabled.
607-
// It can later be re-enabled via UpdateWorkflowExecutionOptions.
608-
//
609-
// This is particularly useful in testing scenarios where workflows
610-
// are expected to receive signals, updates, or other events while
611-
// timers are in progress.
612+
// Optional bound that limits the gap between the virtual time of this execution and wall-clock time.
613+
// Once the bound is reached, time skipping is automatically disabled,
614+
// but can be re-enabled by setting `enabled` to true via UpdateWorkflowExecutionOptions.
615+
// This bound cannot be set to a value smaller than the execution's currently skipped duration.
612616
//
613-
// This bound is not propagated to transitively related workflows.
614-
// When bound is also needed for transitively related workflows,
615-
// it is recommended to set disable_propagation to true
616-
// and configure TimeSkippingConfig explicitly for transitively related workflows.
617+
// This is useful in testing scenarios where a workflow is expected to receive
618+
// signals, updates, or other external events while timers are in progress.
617619
oneof bound {
618-
619620
// Maximum total virtual time that can be skipped.
620621
google.protobuf.Duration max_skipped_duration = 4;
621622

622623
// Maximum elapsed time since time skipping was enabled.
623624
// This includes both skipped time and real time elapsing.
624625
// (-- api-linter: core::0142::time-field-names=disabled --)
625626
google.protobuf.Duration max_elapsed_duration = 5;
626-
627-
// Absolute virtual timestamp at which time skipping is disabled.
628-
// Time skipping will not advance beyond this point.
629-
google.protobuf.Timestamp max_target_time = 6;
630627
}
631628
}
632629

temporal/api/workflowservice/v1/request_response.proto

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,7 @@ message StartWorkflowExecutionRequest {
199199
temporal.api.common.v1.Priority priority = 27;
200200
// Deployment Options of the worker who will process the eager task. Passed when `request_eager_execution=true`.
201201
temporal.api.deployment.v1.WorkerDeploymentOptions eager_worker_deployment_options = 28;
202+
202203
// Time-skipping configuration. If not set, time skipping is disabled.
203204
temporal.api.workflow.v1.TimeSkippingConfig time_skipping_config = 29;
204205
}
@@ -3001,6 +3002,8 @@ message StartActivityExecutionRequest {
30013002
repeated temporal.api.common.v1.Link links = 20;
30023003
// Options for handling conflicts when using ACTIVITY_ID_CONFLICT_POLICY_USE_EXISTING.
30033004
temporal.api.common.v1.OnConflictOptions on_conflict_options = 21;
3005+
// Time to wait before dispatching the first activity task. This delay is not applied to retry attempts.
3006+
google.protobuf.Duration start_delay = 22;
30043007
}
30053008

30063009
message StartActivityExecutionResponse {

0 commit comments

Comments
 (0)