Skip to content

Commit 7583ee8

Browse files
committed
rm the flexibility of disable propagation for simplicity
and add propagated_skipped_duration to propagate virtual time
1 parent 84b0a5f commit 7583ee8

4 files changed

Lines changed: 37 additions & 23 deletions

File tree

openapi/openapiv2.json

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17961,6 +17961,10 @@
1796117961
"priority": {
1796217962
"$ref": "#/definitions/v1Priority",
1796317963
"title": "Priority metadata"
17964+
},
17965+
"timeSkippingConfig": {
17966+
"$ref": "#/definitions/v1TimeSkippingConfig",
17967+
"description": "The propagated time-skipping config for the child workflow."
1796417968
}
1796517969
}
1796617970
},
@@ -18349,11 +18353,11 @@
1834918353
"properties": {
1835018354
"enabled": {
1835118355
"type": "boolean",
18352-
"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."
18356+
"description": "Enables or disables time skipping for this workflow execution."
1835318357
},
18354-
"disablePropagation": {
18355-
"type": "boolean",
18356-
"description": "If set, the enabled field is not propagated to transitively related workflows."
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."
1835718361
},
1835818362
"maxSkippedDuration": {
1835918363
"type": "string",

openapi/openapiv3.yaml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15553,6 +15553,10 @@ components:
1555315553
allOf:
1555415554
- $ref: '#/components/schemas/Priority'
1555515555
description: Priority metadata
15556+
timeSkippingConfig:
15557+
allOf:
15558+
- $ref: '#/components/schemas/TimeSkippingConfig'
15559+
description: The propagated time-skipping config for the child workflow.
1555615560
StartNexusOperationExecutionRequest:
1555715561
type: object
1555815562
properties:
@@ -16239,10 +16243,13 @@ components:
1623916243
properties:
1624016244
enabled:
1624116245
type: boolean
16242-
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."
16243-
disablePropagation:
16244-
type: boolean
16245-
description: If set, the enabled field is not propagated to transitively related workflows.
16246+
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.
1624616253
maxSkippedDuration:
1624716254
pattern: ^-?(?:0|[1-9][0-9]{0,11})(?:\.[0-9]{1,9})?s$
1624816255
type: string

temporal/api/history/v1/message.proto

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -770,6 +770,9 @@ message StartChildWorkflowExecutionInitiatedEventAttributes {
770770
bool inherit_build_id = 19 [deprecated = true];
771771
// Priority metadata
772772
temporal.api.common.v1.Priority priority = 20;
773+
774+
// The propagated time-skipping config for the child workflow.
775+
temporal.api.workflow.v1.TimeSkippingConfig time_skipping_config = 21;
773776
}
774777

775778
message StartChildWorkflowExecutionFailedEventAttributes {

temporal/api/workflow/v1/message.proto

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -592,28 +592,28 @@ message WorkflowExecutionOptions {
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.
594594
message TimeSkippingConfig {
595+
reserved 2;
596+
reserved "disable_propagation";
595597

596598
// 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.
600599
bool enabled = 1;
601600

602-
// If set, the enabled field is not propagated to transitively related workflows.
603-
bool disable_propagation = 2;
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;
604604

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.
605+
// Optional bound that limits how far virtual time can advance while time skipping is active.
606+
// Once the bound is reached, time skipping is automatically disabled,
607+
// but can be re-enabled via UpdateWorkflowExecutionOptions.
608608
//
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.
609+
// This is useful in testing scenarios where a workflow is expected to receive
610+
// signals, updates, or other external events while timers are in progress.
612611
//
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.
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.
617617
oneof bound {
618618

619619
// Maximum total virtual time that can be skipped.

0 commit comments

Comments
 (0)