diff --git a/openapi/openapiv2.json b/openapi/openapiv2.json index 02e2d1436..df7498fc2 100644 --- a/openapi/openapiv2.json +++ b/openapi/openapiv2.json @@ -16722,6 +16722,10 @@ "priority": { "$ref": "#/definitions/v1Priority", "title": "Priority metadata" + }, + "timeSkippingConfig": { + "$ref": "#/definitions/v1TimeSkippingConfig", + "description": "Initial time-skipping configuration for the child workflow execution.\nThis field cannot be set explicitly; it is propagated from the parent workflow." } } }, @@ -17094,11 +17098,11 @@ "properties": { "enabled": { "type": "boolean", - "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." + "description": "Enables or disables time skipping for this workflow execution." }, - "disablePropagation": { + "disableChildWorkflowPropagation": { "type": "boolean", - "description": "If set, the enabled field is not propagated to transitively related workflows." + "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." }, "maxSkippedDuration": { "type": "string", diff --git a/openapi/openapiv3.yaml b/openapi/openapiv3.yaml index 2ceca06b4..3daf4e6a9 100644 --- a/openapi/openapiv3.yaml +++ b/openapi/openapiv3.yaml @@ -14515,6 +14515,12 @@ components: allOf: - $ref: '#/components/schemas/Priority' description: Priority metadata + timeSkippingConfig: + allOf: + - $ref: '#/components/schemas/TimeSkippingConfig' + description: |- + Initial time-skipping configuration for the child workflow execution. + This field cannot be set explicitly; it is propagated from the parent workflow. StartWorkflowExecutionRequest: type: object properties: @@ -15069,10 +15075,14 @@ components: properties: enabled: type: boolean - 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." - disablePropagation: + description: Enables or disables time skipping for this workflow execution. + disableChildWorkflowPropagation: type: boolean - description: If set, the enabled field is not propagated to transitively related workflows. + description: |- + By default, the time skipping configuration (enabled and bound) is propagated to child workflows, + using the same values as the parent workflow. + If set, child workflows will be started with time skipping disabled. + Regardless of this field, the start time of the child workflow uses the parent's virtual time. maxSkippedDuration: pattern: ^-?(?:0|[1-9][0-9]{0,11})(?:\.[0-9]{1,9})?s$ type: string diff --git a/temporal/api/history/v1/message.proto b/temporal/api/history/v1/message.proto index bcd71928a..14124656f 100644 --- a/temporal/api/history/v1/message.proto +++ b/temporal/api/history/v1/message.proto @@ -765,6 +765,10 @@ message StartChildWorkflowExecutionInitiatedEventAttributes { bool inherit_build_id = 19 [deprecated = true]; // Priority metadata temporal.api.common.v1.Priority priority = 20; + + // Initial time-skipping configuration for the child workflow execution. + // This field cannot be set explicitly; it is propagated from the parent workflow. + temporal.api.workflow.v1.TimeSkippingConfig time_skipping_config = 21; } message StartChildWorkflowExecutionFailedEventAttributes { diff --git a/temporal/api/workflow/v1/message.proto b/temporal/api/workflow/v1/message.proto index e7a00156b..21928de7a 100644 --- a/temporal/api/workflow/v1/message.proto +++ b/temporal/api/workflow/v1/message.proto @@ -592,26 +592,29 @@ message WorkflowExecutionOptions { message TimeSkippingConfig { // Enables or disables time skipping for this workflow execution. - // By default, this field is propagated to transitively related workflows (child workflows/start-as-new/reset) - // at the time they are started. - // Changes made after a transitively related workflow has started are not propagated. bool enabled = 1; - // If set, the enabled field is not propagated to transitively related workflows. - bool disable_propagation = 2; + reserved 2; + reserved "disable_propagation"; - // Optional bound that limits how long time skipping remains active. - // Once the bound is reached, time skipping is automatically disabled. - // It can later be re-enabled via UpdateWorkflowExecutionOptions. + // By default, the time skipping configuration (enabled and bound) is propagated to child workflows, + // using the same values as the parent workflow. + // If set, child workflows will be started with time skipping disabled. + // Regardless of this field, the start time of the child workflow uses the parent's virtual time. + bool disable_child_workflow_propagation = 3; + + // Optional bound that limits how far virtual time can advance while time skipping is active. + // Once the bound is reached, time skipping is automatically disabled, + // but can be re-enabled via UpdateWorkflowExecutionOptions. // - // This is particularly useful in testing scenarios where workflows - // are expected to receive signals, updates, or other events while - // timers are in progress. + // This is useful in testing scenarios where a workflow is expected to receive + // signals, updates, or other external events while timers are in progress. // - // This bound is not propagated to transitively related workflows. - // When bound is also needed for transitively related workflows, - // it is recommended to set disable_propagation to true - // and configure TimeSkippingConfig explicitly for transitively related workflows. + // Bound scope: + // - Each bound is independent for each workflow execution. + // When a bound is propagated to a child workflow, the child's bound is only applied to that child execution. + // - Continue-as-new is an exception: continued workflow executions are treated as extensions of the + // original execution, so the bound is shared across all executions in the chain. oneof bound { // Maximum total virtual time that can be skipped.