Skip to content

Commit 332d275

Browse files
committed
delete max target time, add comments to ts propagation
1 parent 7583ee8 commit 332d275

3 files changed

Lines changed: 31 additions & 44 deletions

File tree

openapi/openapiv2.json

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18355,10 +18355,6 @@
1835518355
"type": "boolean",
1835618356
"description": "Enables or disables time skipping for this workflow execution."
1835718357
},
18358-
"propagatedSkippedDuration": {
18359-
"type": "string",
18360-
"description": "If this execution was started by a previous execution that already skipped some time,\nit inherits the virtual time through the propagated skipped duration."
18361-
},
1836218358
"maxSkippedDuration": {
1836318359
"type": "string",
1836418360
"description": "Maximum total virtual time that can be skipped."
@@ -18367,13 +18363,12 @@
1836718363
"type": "string",
1836818364
"description": "Maximum elapsed time since time skipping was enabled.\nThis includes both skipped time and real time elapsing."
1836918365
},
18370-
"maxTargetTime": {
18366+
"initialSkippedDuration": {
1837118367
"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."
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."
1837418369
}
1837518370
},
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."
18371+
"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 accumulated skipped duration are inherited\n from the current execution. The configured bound is shared across both the inherited skipped duration\n and any additional duration skipped by the new run.\n(2) Retry and cron: both the configuration and accumulated skipped duration are inherited as recorded in the\n StartWorkflowExecutionEvent of the current workflow and the accummulated skipped duration \n of the current run won't be passed.\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."
1837718372
},
1837818373
"v1TimeoutFailureInfo": {
1837918374
"type": "object",

openapi/openapiv3.yaml

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -16244,12 +16244,6 @@ components:
1624416244
enabled:
1624516245
type: boolean
1624616246
description: Enables or disables time skipping for this workflow execution.
16247-
propagatedSkippedDuration:
16248-
pattern: ^-?(?:0|[1-9][0-9]{0,11})(?:\.[0-9]{1,9})?s$
16249-
type: string
16250-
description: |-
16251-
If this execution was started by a previous execution that already skipped some time,
16252-
it inherits the virtual time through the propagated skipped duration.
1625316247
maxSkippedDuration:
1625416248
pattern: ^-?(?:0|[1-9][0-9]{0,11})(?:\.[0-9]{1,9})?s$
1625516249
type: string
@@ -16260,19 +16254,14 @@ components:
1626016254
description: |-
1626116255
Maximum elapsed time since time skipping was enabled.
1626216256
This includes both skipped time and real time elapsing.
16263-
maxTargetTime:
16257+
initialSkippedDuration:
16258+
pattern: ^-?(?:0|[1-9][0-9]{0,11})(?:\.[0-9]{1,9})?s$
1626416259
type: string
1626516260
description: |-
16266-
Absolute virtual timestamp at which time skipping is disabled.
16267-
Time skipping will not advance beyond this point.
16268-
format: date-time
16269-
description: |-
16270-
Configuration for time skipping during a workflow execution.
16271-
When enabled, virtual time advances automatically whenever there is no in-flight work.
16272-
In-flight work includes activities, child workflows, Nexus operations, signal/cancel external workflow operations,
16273-
and possibly other features added in the future.
16274-
User timers are not classified as in-flight work and will be skipped over.
16275-
When time advances, it skips to the earlier of the next user timer or the configured bound, if either exists.
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.
16264+
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 accumulated skipped duration are inherited\n from the current execution. The configured bound is shared across both the inherited skipped duration\n and any additional duration skipped by the new run.\n (2) Retry and cron: both the configuration and accumulated skipped duration are inherited as recorded in the\n StartWorkflowExecutionEvent of the current workflow and the accummulated skipped duration \n of the current run won't be passed.\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."
1627616265
TimeoutFailureInfo:
1627716266
type: object
1627816267
properties:

temporal/api/workflow/v1/message.proto

Lines changed: 22 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -591,43 +591,46 @@ 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 accumulated skipped duration are inherited
598+
// from the current execution. The configured bound is shared across both the inherited skipped duration
599+
// and any additional duration skipped by the new run.
600+
// (2) Retry and cron: both the configuration and accumulated skipped duration are inherited as recorded in the
601+
// StartWorkflowExecutionEvent of the current workflow and the accummulated skipped duration
602+
// of the current run won't be passed.
603+
// (3) Reset: the new run retains the time-skipping configuration of the current execution. Because reset replays
604+
// all events up to the reset point and re-applies any UpdateWorkflowExecutionOptions changes made after that
605+
// point, the resulting run ends up with the same final time-skipping configuration as the previous run.
594606
message TimeSkippingConfig {
595-
reserved 2;
596-
reserved "disable_propagation";
607+
reserved 2, 6;
608+
reserved "disable_propagation", "max_target_time";
597609

598610
// Enables or disables time skipping for this workflow execution.
599611
bool enabled = 1;
600612

601-
// If this execution was started by a previous execution that already skipped some time,
602-
// it inherits the virtual time through the propagated skipped duration.
603-
google.protobuf.Duration propagated_skipped_duration = 3;
604-
605-
// Optional bound that limits how far virtual time can advance while time skipping is active.
613+
// Optional bound that limits the gap between the virtual time of this execution and wall-clock time.
606614
// Once the bound is reached, time skipping is automatically disabled,
607-
// but can be re-enabled via UpdateWorkflowExecutionOptions.
615+
// but can be re-enabled by setting `enabled` to true via UpdateWorkflowExecutionOptions.
616+
// This bound cannot be set to a value smaller than the current skipped duration of the current execution.
608617
//
609618
// This is useful in testing scenarios where a workflow is expected to receive
610619
// signals, updates, or other external events while timers are in progress.
611-
//
612-
// Bound scope:
613-
// - Each bound is independent for each workflow execution.
614-
// When a bound is propagated to a child workflow, the child's bound is only applied to that child execution.
615-
// - Continue-as-new is an exception: continued workflow executions are treated as extensions of the
616-
// original execution, so the bound is shared across all executions in the chain.
617620
oneof bound {
618-
619621
// Maximum total virtual time that can be skipped.
620622
google.protobuf.Duration max_skipped_duration = 4;
621623

622624
// Maximum elapsed time since time skipping was enabled.
623625
// This includes both skipped time and real time elapsing.
624626
// (-- api-linter: core::0142::time-field-names=disabled --)
625627
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;
630628
}
629+
630+
// If this execution was started by a previous execution that had already skipped some time,
631+
// it inherits the accumulated skipped duration from that execution through this field.
632+
// This field is set internally by the server and cannot be configured by the user.
633+
google.protobuf.Duration initial_skipped_duration = 3;
631634
}
632635

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

0 commit comments

Comments
 (0)