Skip to content

Commit da63feb

Browse files
committed
change the default ts-bound propagation bebahvior
1 parent 0460021 commit da63feb

4 files changed

Lines changed: 32 additions & 12 deletions

File tree

openapi/openapiv2.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16756,6 +16756,10 @@
1675616756
"priority": {
1675716757
"$ref": "#/definitions/v1Priority",
1675816758
"title": "Priority metadata"
16759+
},
16760+
"timeSkippingConfig": {
16761+
"$ref": "#/definitions/v1TimeSkippingConfig",
16762+
"description": "Initial time-skipping configuration for the child workflow execution.\nThis field cannot be set explicitly; it is propagated from the parent workflow."
1675916763
}
1676016764
}
1676116765
},
@@ -17128,11 +17132,11 @@
1712817132
"properties": {
1712917133
"enabled": {
1713017134
"type": "boolean",
17131-
"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."
17135+
"description": "Enables or disables time skipping for this workflow execution."
1713217136
},
1713317137
"disablePropagation": {
1713417138
"type": "boolean",
17135-
"description": "If set, the enabled field is not propagated to transitively related workflows."
17139+
"description": "By default, the time skipping configuration is propagated to transitively related workflows.\nIf set, transitively related workflows will be started with time skipping disabled."
1713617140
},
1713717141
"maxSkippedDuration": {
1713817142
"type": "string",

openapi/openapiv3.yaml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14549,6 +14549,12 @@ components:
1454914549
allOf:
1455014550
- $ref: '#/components/schemas/Priority'
1455114551
description: Priority metadata
14552+
timeSkippingConfig:
14553+
allOf:
14554+
- $ref: '#/components/schemas/TimeSkippingConfig'
14555+
description: |-
14556+
Initial time-skipping configuration for the child workflow execution.
14557+
This field cannot be set explicitly; it is propagated from the parent workflow.
1455214558
StartWorkflowExecutionRequest:
1455314559
type: object
1455414560
properties:
@@ -15103,10 +15109,12 @@ components:
1510315109
properties:
1510415110
enabled:
1510515111
type: boolean
15106-
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."
15112+
description: Enables or disables time skipping for this workflow execution.
1510715113
disablePropagation:
1510815114
type: boolean
15109-
description: If set, the enabled field is not propagated to transitively related workflows.
15115+
description: |-
15116+
By default, the time skipping configuration is propagated to transitively related workflows.
15117+
If set, transitively related workflows will be started with time skipping disabled.
1511015118
maxSkippedDuration:
1511115119
pattern: ^-?(?:0|[1-9][0-9]{0,11})(?:\.[0-9]{1,9})?s$
1511215120
type: string

temporal/api/history/v1/message.proto

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -770,6 +770,10 @@ message StartChildWorkflowExecutionInitiatedEventAttributes {
770770
bool inherit_build_id = 19 [deprecated = true];
771771
// Priority metadata
772772
temporal.api.common.v1.Priority priority = 20;
773+
774+
// Initial time-skipping configuration for the child workflow execution.
775+
// This field cannot be set explicitly; it is propagated from the parent workflow.
776+
temporal.api.workflow.v1.TimeSkippingConfig time_skipping_config = 21;
773777
}
774778

775779
message StartChildWorkflowExecutionFailedEventAttributes {

temporal/api/workflow/v1/message.proto

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -592,12 +592,10 @@ message WorkflowExecutionOptions {
592592
message TimeSkippingConfig {
593593

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

600-
// If set, the enabled field is not propagated to transitively related workflows.
597+
// By default, the time skipping configuration is propagated to transitively related workflows.
598+
// If set, transitively related workflows will be started with time skipping disabled.
601599
bool disable_propagation = 2;
602600

603601
// Optional bound that limits how long time skipping remains active.
@@ -608,10 +606,16 @@ message TimeSkippingConfig {
608606
// are expected to receive signals, updates, or other events while
609607
// timers are in progress.
610608
//
611-
// This bound is not propagated to transitively related workflows.
612-
// When bound is also needed for transitively related workflows,
613-
// it is recommended to set disable_propagation to true
614-
// and configure TimeSkippingConfig explicitly for transitively related workflows.
609+
// The bound is propagated to transitively related workflows differently
610+
// depending on the type and semantics of the related workflow:
611+
// - For child workflows, the bound is propagated with the same value as the parent workflow.
612+
// If duration-based bound is used, the child workflow will have the full duration as the bound.
613+
// If target-time based bound is used, the child workflow will have the same target time as the parent workflow.
614+
// - For continue-as-new workflows, if a duration-based bound is used, the remaining
615+
// duration is propagated, so the continue-as-new workflow shares the initial bound
616+
// with the parent workflow.
617+
// - For reset workflows, the entire TimeSkippingConfig is restored to the value it
618+
// had at the event this workflow is reset to.
615619
oneof bound {
616620

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

0 commit comments

Comments
 (0)