Skip to content

Commit 856281e

Browse files
committed
change the default ts-bound propagation bebahvior
1 parent 9109a85 commit 856281e

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
@@ -16722,6 +16722,10 @@
1672216722
"priority": {
1672316723
"$ref": "#/definitions/v1Priority",
1672416724
"title": "Priority metadata"
16725+
},
16726+
"timeSkippingConfig": {
16727+
"$ref": "#/definitions/v1TimeSkippingConfig",
16728+
"description": "Initial time-skipping configuration for the child workflow execution.\nThis field cannot be set explicitly; it is propagated from the parent workflow."
1672516729
}
1672616730
}
1672716731
},
@@ -17094,11 +17098,11 @@
1709417098
"properties": {
1709517099
"enabled": {
1709617100
"type": "boolean",
17097-
"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."
17101+
"description": "Enables or disables time skipping for this workflow execution."
1709817102
},
1709917103
"disablePropagation": {
1710017104
"type": "boolean",
17101-
"description": "If set, the enabled field is not propagated to transitively related workflows."
17105+
"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."
1710217106
},
1710317107
"maxSkippedDuration": {
1710417108
"type": "string",

openapi/openapiv3.yaml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14515,6 +14515,12 @@ components:
1451514515
allOf:
1451614516
- $ref: '#/components/schemas/Priority'
1451714517
description: Priority metadata
14518+
timeSkippingConfig:
14519+
allOf:
14520+
- $ref: '#/components/schemas/TimeSkippingConfig'
14521+
description: |-
14522+
Initial time-skipping configuration for the child workflow execution.
14523+
This field cannot be set explicitly; it is propagated from the parent workflow.
1451814524
StartWorkflowExecutionRequest:
1451914525
type: object
1452014526
properties:
@@ -15069,10 +15075,12 @@ components:
1506915075
properties:
1507015076
enabled:
1507115077
type: boolean
15072-
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."
15078+
description: Enables or disables time skipping for this workflow execution.
1507315079
disablePropagation:
1507415080
type: boolean
15075-
description: If set, the enabled field is not propagated to transitively related workflows.
15081+
description: |-
15082+
By default, the time skipping configuration is propagated to transitively related workflows.
15083+
If set, transitively related workflows will be started with time skipping disabled.
1507615084
maxSkippedDuration:
1507715085
pattern: ^-?(?:0|[1-9][0-9]{0,11})(?:\.[0-9]{1,9})?s$
1507815086
type: string

temporal/api/history/v1/message.proto

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -765,6 +765,10 @@ message StartChildWorkflowExecutionInitiatedEventAttributes {
765765
bool inherit_build_id = 19 [deprecated = true];
766766
// Priority metadata
767767
temporal.api.common.v1.Priority priority = 20;
768+
769+
// Initial time-skipping configuration for the child workflow execution.
770+
// This field cannot be set explicitly; it is propagated from the parent workflow.
771+
temporal.api.workflow.v1.TimeSkippingConfig time_skipping_config = 21;
768772
}
769773

770774
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)