Skip to content

Commit 8866718

Browse files
committed
mv initial_skipped_time from config to start request, start attr, and start child attr
1 parent 8c1f458 commit 8866718

5 files changed

Lines changed: 43 additions & 16 deletions

File tree

openapi/openapiv2.json

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11442,6 +11442,10 @@
1144211442
"timeSkippingConfig": {
1144311443
"$ref": "#/definitions/v1TimeSkippingConfig",
1144411444
"description": "Time-skipping configuration. If not set, time skipping is disabled."
11445+
},
11446+
"initialSkippedDuration": {
11447+
"type": "string",
11448+
"description": "If this execution was started by a previous execution that had already skipped some time,\nit inherits the accumulated skipped duration from that execution through this field.\nThis field is set internally by the server and cannot be configured by the user."
1144511449
}
1144611450
}
1144711451
},
@@ -17965,6 +17969,10 @@
1796517969
"timeSkippingConfig": {
1796617970
"$ref": "#/definitions/v1TimeSkippingConfig",
1796717971
"description": "The propagated time-skipping configuration for the child workflow."
17972+
},
17973+
"initialSkippedDuration": {
17974+
"type": "string",
17975+
"description": "Propagate the duration skipped to the child workflow."
1796817976
}
1796917977
}
1797017978
},
@@ -18362,10 +18370,6 @@
1836218370
"maxElapsedDuration": {
1836318371
"type": "string",
1836418372
"description": "Maximum elapsed time since time skipping was enabled.\nThis includes both skipped time and real time elapsing."
18365-
},
18366-
"initialSkippedDuration": {
18367-
"type": "string",
18368-
"description": "If this execution was started by a previous execution that had already skipped some time,\nit inherits the accumulated skipped duration from that execution through this field.\nThis field is set internally by the server and cannot be configured by the user."
1836918373
}
1837018374
},
1837118375
"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."
@@ -19922,6 +19926,10 @@
1992219926
"timeSkippingConfig": {
1992319927
"$ref": "#/definitions/v1TimeSkippingConfig",
1992419928
"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."
19929+
},
19930+
"initialSkippedDuration": {
19931+
"type": "string",
19932+
"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."
1992519933
}
1992619934
},
1992719935
"title": "Always the first event in workflow history"

openapi/openapiv3.yaml

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15557,6 +15557,10 @@ components:
1555715557
allOf:
1555815558
- $ref: '#/components/schemas/TimeSkippingConfig'
1555915559
description: The propagated time-skipping configuration for the child workflow.
15560+
initialSkippedDuration:
15561+
pattern: ^-?(?:0|[1-9][0-9]{0,11})(?:\.[0-9]{1,9})?s$
15562+
type: string
15563+
description: Propagate the duration skipped to the child workflow.
1556015564
StartNexusOperationExecutionRequest:
1556115565
type: object
1556215566
properties:
@@ -15810,6 +15814,13 @@ components:
1581015814
allOf:
1581115815
- $ref: '#/components/schemas/TimeSkippingConfig'
1581215816
description: Time-skipping configuration. If not set, time skipping is disabled.
15817+
initialSkippedDuration:
15818+
pattern: ^-?(?:0|[1-9][0-9]{0,11})(?:\.[0-9]{1,9})?s$
15819+
type: string
15820+
description: |-
15821+
If this execution was started by a previous execution that had already skipped some time,
15822+
it inherits the accumulated skipped duration from that execution through this field.
15823+
This field is set internally by the server and cannot be configured by the user.
1581315824
StartWorkflowExecutionResponse:
1581415825
type: object
1581515826
properties:
@@ -16254,13 +16265,6 @@ components:
1625416265
description: |-
1625516266
Maximum elapsed time since time skipping was enabled.
1625616267
This includes both skipped time and real time elapsing.
16257-
initialSkippedDuration:
16258-
pattern: ^-?(?:0|[1-9][0-9]{0,11})(?:\.[0-9]{1,9})?s$
16259-
type: string
16260-
description: |-
16261-
If this execution was started by a previous execution that had already skipped some time,
16262-
it inherits the accumulated skipped duration from that execution through this field.
16263-
This field is set internally by the server and cannot be configured by the user.
1626416268
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."
1626516269
TimeoutFailureInfo:
1626616270
type: object
@@ -18558,6 +18562,12 @@ components:
1855818562

1855918563
The configuration may be updated after start via UpdateWorkflowExecutionOptions, which
1856018564
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.
1856118571
description: Always the first event in workflow history
1856218572
WorkflowExecutionTerminatedEventAttributes:
1856318573
type: object

temporal/api/history/v1/message.proto

Lines changed: 7 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.
@@ -773,6 +777,9 @@ message StartChildWorkflowExecutionInitiatedEventAttributes {
773777

774778
// The propagated time-skipping configuration for the child workflow.
775779
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;
776783
}
777784

778785
message StartChildWorkflowExecutionFailedEventAttributes {

temporal/api/workflow/v1/message.proto

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -625,11 +625,6 @@ message TimeSkippingConfig {
625625
// (-- api-linter: core::0142::time-field-names=disabled --)
626626
google.protobuf.Duration max_elapsed_duration = 5;
627627
}
628-
629-
// If this execution was started by a previous execution that had already skipped some time,
630-
// it inherits the accumulated skipped duration from that execution through this field.
631-
// This field is set internally by the server and cannot be configured by the user.
632-
google.protobuf.Duration initial_skipped_duration = 3;
633628
}
634629

635630
// Used to override the versioning behavior (and pinned deployment version, if applicable) of a

temporal/api/workflowservice/v1/request_response.proto

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,8 +199,15 @@ 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;
205+
206+
// If this execution was started by a previous execution that had already skipped some time,
207+
// it inherits the accumulated skipped duration from that execution through this field.
208+
// This field is set internally by the server and cannot be configured by the user.
209+
google.protobuf.Duration initial_skipped_duration = 30;
210+
204211
}
205212

206213
message StartWorkflowExecutionResponse {

0 commit comments

Comments
 (0)