Skip to content

Commit 4d643c6

Browse files
committed
refine design of TimeSkippingConfig
1 parent 37603e2 commit 4d643c6

3 files changed

Lines changed: 26 additions & 29 deletions

File tree

openapi/openapiv2.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17100,9 +17100,9 @@
1710017100
"type": "boolean",
1710117101
"description": "Enables or disables time skipping for this workflow execution."
1710217102
},
17103-
"disablePropagation": {
17103+
"disableChildWorkflowPropagation": {
1710417104
"type": "boolean",
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."
17105+
"description": "By default, the time skipping configuration (enabled and bound) is propagated to child workflows,\nusing the same values as the parent workflow.\nIf set, child workflows will be started with time skipping disabled.\nRegardless of this field, the start time of the child workflow uses the parent's virtual time."
1710617106
},
1710717107
"maxSkippedDuration": {
1710817108
"type": "string",

openapi/openapiv3.yaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15076,11 +15076,13 @@ components:
1507615076
enabled:
1507715077
type: boolean
1507815078
description: Enables or disables time skipping for this workflow execution.
15079-
disablePropagation:
15079+
disableChildWorkflowPropagation:
1508015080
type: boolean
1508115081
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.
15082+
By default, the time skipping configuration (enabled and bound) is propagated to child workflows,
15083+
using the same values as the parent workflow.
15084+
If set, child workflows will be started with time skipping disabled.
15085+
Regardless of this field, the start time of the child workflow uses the parent's virtual time.
1508415086
maxSkippedDuration:
1508515087
pattern: ^-?(?:0|[1-9][0-9]{0,11})(?:\.[0-9]{1,9})?s$
1508615088
type: string

temporal/api/workflow/v1/message.proto

Lines changed: 19 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -594,32 +594,27 @@ message TimeSkippingConfig {
594594
// Enables or disables time skipping for this workflow execution.
595595
bool enabled = 1;
596596

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.
599-
bool disable_propagation = 2;
600-
601-
// Optional bound that limits how long time skipping remains active.
602-
// Once the bound is reached, time skipping is automatically disabled.
603-
// It can later be re-enabled via UpdateWorkflowExecutionOptions.
604-
//
605-
// This is particularly useful in testing scenarios where workflows
606-
// are expected to receive signals, updates, or other events while
607-
// timers are in progress.
608-
//
609-
// The bound is propagated to transitively related workflows differently
610-
// depending on the type and semantics of the related workflow:
611-
// - Child workflows: the bound is propagated with the same value as the
612-
// parent workflow, and the child begins execution at the parent's virtual
613-
// time. If the bound is duration-based, each child calculates its skipped
614-
// duration independently from its own start.
597+
reserved 2;
598+
reserved "disable_propagation";
599+
600+
// By default, the time skipping configuration (enabled and bound) is propagated to child workflows,
601+
// using the same values as the parent workflow.
602+
// If set, child workflows will be started with time skipping disabled.
603+
// Regardless of this field, the start time of the child workflow uses the parent's virtual time.
604+
bool disable_child_workflow_propagation = 3;
605+
606+
// Optional bound that limits how far virtual time can advance while time skipping is active.
607+
// Once the bound is reached, time skipping is automatically disabled,
608+
// but can be re-enabled via UpdateWorkflowExecutionOptions.
615609
//
616-
// - Continue-as-new workflows: the bound is propagated with the same value
617-
// as the previous workflow. If the bound is duration-based, the
618-
// continue-as-new workflow shares the accumulated duration with the
619-
// previous workflow.
610+
// This is useful in testing scenarios where a workflow is expected to receive
611+
// signals, updates, or other external events while timers are in progress.
620612
//
621-
// - Reset workflows: the entire TimeSkippingConfig is restored to the value
622-
// it had at the event this workflow was reset to.
613+
// Bound scope:
614+
// - Each workflow execution manages its own bound independently.
615+
// When propagated to a child workflow, the child's bound applies only to that child execution.
616+
// - Continue-as-new is an exception: continued workflow executions are treated as extensions of the
617+
// original execution, so the bound is shared across all executions in the chain.
623618
oneof bound {
624619

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

0 commit comments

Comments
 (0)