From 6f6df11bff563bc8db2bb9cc1fabd3751f19de33 Mon Sep 17 00:00:00 2001 From: Feiyang Xie Date: Fri, 22 May 2026 15:41:41 -0700 Subject: [PATCH 1/7] refactor time skipping config and event --- temporal/api/workflow/v1/message.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/temporal/api/workflow/v1/message.proto b/temporal/api/workflow/v1/message.proto index 4d35cb74b..19b0e973e 100644 --- a/temporal/api/workflow/v1/message.proto +++ b/temporal/api/workflow/v1/message.proto @@ -592,7 +592,7 @@ message WorkflowExecutionOptions { // from the current timestamp on every call. // // This field must be updated as a whole; updating individual sub-fields is not supported. - // When setting the update mask in `UpdateWorkflowExecutionOptionsRequest`, + // When setting the update mask in `UpdateWorkflowExecutionOptionsRequest`, // `BatchOperationUpdateWorkflowExecutionOptions`, etc., use a mask that covers the entire field. temporal.api.common.v1.TimeSkippingConfig time_skipping_config = 3; } From 5e21fe02d00f820715c034508e1a927a50ca0dff Mon Sep 17 00:00:00 2001 From: Feiyang Xie Date: Tue, 9 Jun 2026 20:51:30 -0700 Subject: [PATCH 2/7] add TimeSkippingStatePropagation --- openapi/openapiv2.json | 15 +++++++++++++++ temporal/api/history/v1/message.proto | 1 - temporal/api/workflow/v1/message.proto | 14 ++++++++++++++ 3 files changed, 29 insertions(+), 1 deletion(-) diff --git a/openapi/openapiv2.json b/openapi/openapiv2.json index ea37162a0..3c99e1614 100644 --- a/openapi/openapiv2.json +++ b/openapi/openapiv2.json @@ -19704,6 +19704,21 @@ }, "description": "The time-skipping state that needs to be propagated from a parent workflow to a child workflow,\nor through a chain of runs." }, + "v1TimeSkippingStatePropagation": { + "type": "object", + "properties": { + "initialSkippedDuration": { + "type": "string", + "description": "The time skipped by the previous execution that started this workflow.\nIt can happen in child workflows and a chain of runs (CaN, cron, retry)." + }, + "fastForwardTargetTime": { + "type": "string", + "format": "date-time", + "description": "If there is a fast-forward action set for the previous run in a chain of runs,\nthe target time should be propagated to the next run as well." + } + }, + "description": "The time-skipping state that needs to be propagated from a parent workflow to a child workflow,\nor through a chain of runs." + }, "v1TimeoutFailureInfo": { "type": "object", "properties": { diff --git a/temporal/api/history/v1/message.proto b/temporal/api/history/v1/message.proto index 2fdb678bc..ca94bc40f 100644 --- a/temporal/api/history/v1/message.proto +++ b/temporal/api/history/v1/message.proto @@ -212,7 +212,6 @@ message WorkflowExecutionStartedEventAttributes { // The time-skipping state propagated from a previous run of this workflow. This can be nil // if no time skipping has occurred or there is no previous run. temporal.api.common.v1.TimeSkippingStatePropagation time_skipping_state_propagation = 43; - } diff --git a/temporal/api/workflow/v1/message.proto b/temporal/api/workflow/v1/message.proto index 19b0e973e..d5a1d6ffd 100644 --- a/temporal/api/workflow/v1/message.proto +++ b/temporal/api/workflow/v1/message.proto @@ -597,6 +597,20 @@ message WorkflowExecutionOptions { temporal.api.common.v1.TimeSkippingConfig time_skipping_config = 3; } +// The time-skipping state that needs to be propagated from a parent workflow to a child workflow, +// or through a chain of runs. +message TimeSkippingStatePropagation { + + // The time skipped by the previous execution that started this workflow. + // It can happen in child workflows and a chain of runs (CaN, cron, retry). + google.protobuf.Duration initial_skipped_duration = 1; + + // If there is a fast-forward action set for the previous run in a chain of runs, + // the target time should be propagated to the next run as well. + google.protobuf.Timestamp fast_forward_target_time = 2; +} + + // Used to override the versioning behavior (and pinned deployment version, if applicable) of a // specific workflow execution. If set, this override takes precedence over worker-sent values. // See `WorkflowExecutionInfo.VersioningInfo` for more information. From 88c5a0e41099830a87b798c98618ada30399ee23 Mon Sep 17 00:00:00 2001 From: Feiyang Xie Date: Fri, 12 Jun 2026 10:37:52 -0700 Subject: [PATCH 3/7] move time skipping config from workflow folder to the common folder --- temporal/api/workflow/v1/message.proto | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/temporal/api/workflow/v1/message.proto b/temporal/api/workflow/v1/message.proto index d5a1d6ffd..19b0e973e 100644 --- a/temporal/api/workflow/v1/message.proto +++ b/temporal/api/workflow/v1/message.proto @@ -597,20 +597,6 @@ message WorkflowExecutionOptions { temporal.api.common.v1.TimeSkippingConfig time_skipping_config = 3; } -// The time-skipping state that needs to be propagated from a parent workflow to a child workflow, -// or through a chain of runs. -message TimeSkippingStatePropagation { - - // The time skipped by the previous execution that started this workflow. - // It can happen in child workflows and a chain of runs (CaN, cron, retry). - google.protobuf.Duration initial_skipped_duration = 1; - - // If there is a fast-forward action set for the previous run in a chain of runs, - // the target time should be propagated to the next run as well. - google.protobuf.Timestamp fast_forward_target_time = 2; -} - - // Used to override the versioning behavior (and pinned deployment version, if applicable) of a // specific workflow execution. If set, this override takes precedence over worker-sent values. // See `WorkflowExecutionInfo.VersioningInfo` for more information. From d36bf916176374402c16cf349eb2718529ba5359 Mon Sep 17 00:00:00 2001 From: Feiyang Xie Date: Fri, 12 Jun 2026 10:32:41 -0700 Subject: [PATCH 4/7] adding ts to schedulers --- temporal/api/schedule/v1/message.proto | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/temporal/api/schedule/v1/message.proto b/temporal/api/schedule/v1/message.proto index 3a0a9344c..73e9230f1 100644 --- a/temporal/api/schedule/v1/message.proto +++ b/temporal/api/schedule/v1/message.proto @@ -310,6 +310,9 @@ message SchedulePatch { // notes field to the value of the string. string pause = 3; string unpause = 4; + + // If set, updates the time-skipping configuration for this schedule. + temporal.api.workflow.v1.TimeSkippingConfig time_skipping_config = 5; } message ScheduleInfo { @@ -359,6 +362,9 @@ message Schedule { ScheduleAction action = 2; SchedulePolicies policies = 3; ScheduleState state = 4; + // Time-skipping configuration for workflows started by this schedule. + // If not set, time skipping is disabled for triggered workflow executions. + temporal.api.workflow.v1.TimeSkippingConfig time_skipping_config = 5; } // ScheduleListInfo is an abbreviated set of values from Schedule and ScheduleInfo From d6e639228c09534e4fa515b6d3c45c744dc8b3eb Mon Sep 17 00:00:00 2001 From: Feiyang Xie Date: Fri, 12 Jun 2026 10:52:47 -0700 Subject: [PATCH 5/7] change comments --- openapi/openapiv2.json | 41 +++++++----------- openapi/openapiv3.yaml | 60 +++++++++++++++++--------- temporal/api/common/v1/message.proto | 29 ++++++++----- temporal/api/schedule/v1/message.proto | 9 ++-- 4 files changed, 79 insertions(+), 60 deletions(-) diff --git a/openapi/openapiv2.json b/openapi/openapiv2.json index 3c99e1614..ef9bd52c5 100644 --- a/openapi/openapiv2.json +++ b/openapi/openapiv2.json @@ -16739,10 +16739,6 @@ "workflowUpdateCallbacks": { "type": "boolean", "title": "True if the namespace supports attaching callbacks on workflow updates" - }, - "pollerAutoscalingAutoEnroll": { - "type": "boolean", - "description": "When true, workers should use poller autoscaling by default unless explicitly configured otherwise." } }, "description": "Namespace capability details. Should contain what features are enabled in a namespace." @@ -18617,6 +18613,10 @@ }, "state": { "$ref": "#/definitions/v1ScheduleState" + }, + "timeSkippingConfig": { + "$ref": "#/definitions/v1TimeSkippingConfig", + "description": "Time-skipping configuration for this schedule.\nIf not set, time skipping is disabled for triggered actions." } } }, @@ -18818,6 +18818,10 @@ }, "unpause": { "type": "string" + }, + "timeSkippingConfig": { + "$ref": "#/definitions/v1TimeSkippingConfig", + "description": "If set, updates the time-skipping configuration for this schedule." } } }, @@ -19680,29 +19684,18 @@ }, "fastForward": { "type": "string", - "description": "Optionally fast-forward the current workflow execution by this duration ahead of current workflow execution time.\nAfter the fast-forward completes, time skipping is disabled, and this\naction is recorded in the WorkflowExecutionTimeSkippingTransitionedEvent. It can be re-enabled by\nsetting `enabled` to true or setting `fast_forward` again via UpdateWorkflowExecutionOptions.\nThe current workflow execution is a chain of runs (retries, cron, continue-as-new);\nchild workflows are separate executions, so this fast_forward won't affect them.\n\nFor a given workflow execution, only one active fast-forward is allowed at a time.\nIf a new fast-forward is set via UpdateWorkflowExecutionOptions before the previous\none completes, the new one will override the previous one.\nIf the fast-forward duration exceeds the remaining execution timeout, time will only\nbe fast-forwarded up to the end of the execution." + "description": "Optionally fast-forward the current execution by this duration ahead of current execution time.\nFor a given execution, only one active fast-forward is allowed at a time.\nIf a new fast-forward is set via a update call before the previous\none completes, the new one will override the previous one.\nIf the fast-forward duration exceeds the remaining execution timeout, time will only\nbe fast-forwarded up to the end of the execution.\n\nIf the executions are workflows:\nWhen the fast-forward completes, time skipping is disabled by the call that initiated\nthe fast-forward, and this action is recorded in the WorkflowExecutionTimeSkippingTransitionedEvent.\nIt can be re-enabled by setting `enabled` to true via UpdateWorkflowExecutionOptions.\nThe current workflow execution is a chain of runs (retries, cron, continue-as-new);\nchild workflows are separate executions, so this fast_forward won't affect them." }, "disableChildPropagation": { "type": "boolean", "description": "By default, child workflows inherit the \"enabled\" flag when they are started.\nThis flag disables that inheritance." - } - }, - "description": "The configuration for time skipping of a workflow execution (a chain of runs including retries, cron, continue-as-new).\nWhen time skipping is enabled, virtual time advances automatically whenever there is no in-flight work.\nIn-flight work includes activities, child workflows, Nexus operations, signal/cancel external workflow operations,\nand possibly other features added in the future.\nUser timers are not classified as in-flight work and will be skipped over; the virtual clock may also skip to the\ntime point of the registered fast forward when there is no in-flight work.\nWhen time is skipped, a WorkflowExecutionTimeSkippingTransitionedEvent will be\nadded to the workflow history to capture the state changes.\n\nFor child workflows, by default, if the parent execution is skipping time, the child execution will also skip time,\nbut a parent's fast_forward won't affect its child's execution. A flag is provided to disable propagation of the\n\"enabled\" flag to child workflows; regardless of that flag, a child workflow inherits the virtual time from the\nparent execution as its start time." - }, - "v1TimeSkippingStatePropagation": { - "type": "object", - "properties": { - "initialSkippedDuration": { - "type": "string", - "description": "The time skipped by the previous execution that started this workflow.\nIt can happen in child workflows and a chain of runs (CaN, cron, retry)." }, - "fastForwardTargetTime": { - "type": "string", - "format": "date-time", - "description": "If there is a fast-forward action set for the previous run in a chain of runs,\nthe target time should be propagated to the next run as well." + "disableScheduledActionPropagation": { + "type": "boolean", + "description": "By default, executions inherit the \"enabled\" flag when they are started by a scheduler.\nThis flag disables that inheritance." } }, - "description": "The time-skipping state that needs to be propagated from a parent workflow to a child workflow,\nor through a chain of runs." + "description": "The configuration for time skipping of an execution.\n\nFor a workflow execution (a chain of runs including retries, cron, continue-as-new):\nWhen time skipping is enabled, virtual time advances automatically whenever there is no in-flight work.\nIn-flight work includes activities, child workflows, Nexus operations, signal/cancel external workflow operations,\nand possibly other features added in the future.\nUser timers are not classified as in-flight work and will be skipped over; the virtual clock may also skip to the\ntime point of the registered fast forward when there is no in-flight work.\nWhen time is skipped, a WorkflowExecutionTimeSkippingTransitionedEvent will be\nadded to the workflow history to capture the state changes.\n\nFor child workflows, by default, if the parent execution is skipping time, the child execution will also skip time,\nbut a parent's fast_forward won't affect its child's execution. A flag is provided to disable propagation of the\n\"enabled\" flag to child workflows; regardless of that flag, a child workflow inherits the virtual time from the\nparent execution as its start time.\n\nFor a scheduler execution: {{ TBD }}" }, "v1TimeSkippingStatePropagation": { "type": "object", @@ -21024,7 +21017,7 @@ }, "timeSkippingConfig": { "$ref": "#/definitions/v1TimeSkippingConfig", - "description": "The time-skipping configuration for this workflow execution.\nWhen `fast_forward` is set, time will be fast-forwarded to a future point relative\nto the current workflow timestamp. Each call takes effect, even if\n`fast_forward` is set to the same duration, since the target time is recalculated\nfrom the current timestamp on every call.\n\nThis field must be updated as a whole; updating individual sub-fields is not supported.\nWhen setting the update mask in `UpdateWorkflowExecutionOptionsRequest`, \n`BatchOperationUpdateWorkflowExecutionOptions`, etc., use a mask that covers the entire field." + "description": "Time-skipping configuration for this workflow execution.\nIf not set, the time-skipping configuration is not updated by this request;\nthe existing configuration is preserved.\n\nWhen `fast_forward` is set, time will be fast-forwarded to a future point relative\nto the current workflow timestamp. Each call takes effect, even if\n`fast_forward` is set to the same duration, since the target time is recalculated\nfrom the current timestamp on every call." } } }, @@ -21061,11 +21054,7 @@ }, "timeSkippingConfig": { "$ref": "#/definitions/v1TimeSkippingConfig", - "description": "TimeSkippingConfig override upserted in this event. Represents the full config." - }, - "timeSkippingConfigUpdated": { - "type": "boolean", - "description": "Indicates the time skipping config was updated by the recent call to update\nworkflow execution options." + "description": "If set, the time-skipping configuration was changed. Contains the full updated configuration." }, "workflowUpdateOptions": { "type": "array", diff --git a/openapi/openapiv3.yaml b/openapi/openapiv3.yaml index a2ec27cdd..5f0f1447c 100644 --- a/openapi/openapiv3.yaml +++ b/openapi/openapiv3.yaml @@ -13141,9 +13141,6 @@ components: workflowUpdateCallbacks: type: boolean description: True if the namespace supports attaching callbacks on workflow updates - pollerAutoscalingAutoEnroll: - type: boolean - description: When true, workers should use poller autoscaling by default unless explicitly configured otherwise. description: Namespace capability details. Should contain what features are enabled in a namespace. NamespaceInfo_Limits: type: object @@ -15594,6 +15591,12 @@ components: $ref: '#/components/schemas/SchedulePolicies' state: $ref: '#/components/schemas/ScheduleState' + timeSkippingConfig: + allOf: + - $ref: '#/components/schemas/TimeSkippingConfig' + description: |- + Time-skipping configuration for this schedule. + If not set, time skipping is disabled for triggered actions. ScheduleAction: type: object properties: @@ -15763,6 +15766,10 @@ components: notes field to the value of the string. unpause: type: string + timeSkippingConfig: + allOf: + - $ref: '#/components/schemas/TimeSkippingConfig' + description: If set, updates the time-skipping configuration for this schedule. SchedulePolicies: type: object properties: @@ -17436,25 +17443,33 @@ components: pattern: ^-?(?:0|[1-9][0-9]{0,11})(?:\.[0-9]{1,9})?s$ type: string description: |- - Optionally fast-forward the current workflow execution by this duration ahead of current workflow execution time. - After the fast-forward completes, time skipping is disabled, and this - action is recorded in the WorkflowExecutionTimeSkippingTransitionedEvent. It can be re-enabled by - setting `enabled` to true or setting `fast_forward` again via UpdateWorkflowExecutionOptions. - The current workflow execution is a chain of runs (retries, cron, continue-as-new); - child workflows are separate executions, so this fast_forward won't affect them. - - For a given workflow execution, only one active fast-forward is allowed at a time. - If a new fast-forward is set via UpdateWorkflowExecutionOptions before the previous + Optionally fast-forward the current execution by this duration ahead of current execution time. + For a given execution, only one active fast-forward is allowed at a time. + If a new fast-forward is set via a update call before the previous one completes, the new one will override the previous one. If the fast-forward duration exceeds the remaining execution timeout, time will only be fast-forwarded up to the end of the execution. + + If the executions are workflows: + When the fast-forward completes, time skipping is disabled by the call that initiated + the fast-forward, and this action is recorded in the WorkflowExecutionTimeSkippingTransitionedEvent. + It can be re-enabled by setting `enabled` to true via UpdateWorkflowExecutionOptions. + The current workflow execution is a chain of runs (retries, cron, continue-as-new); + child workflows are separate executions, so this fast_forward won't affect them. disableChildPropagation: type: boolean description: |- By default, child workflows inherit the "enabled" flag when they are started. This flag disables that inheritance. + disableScheduledActionPropagation: + type: boolean + description: |- + By default, executions inherit the "enabled" flag when they are started by a scheduler. + This flag disables that inheritance. description: |- - The configuration for time skipping of a workflow execution (a chain of runs including retries, cron, continue-as-new). + The configuration for time skipping of an execution. + + For a workflow execution (a chain of runs including retries, cron, continue-as-new): When time skipping is enabled, virtual time advances automatically whenever there is no in-flight work. In-flight work includes activities, child workflows, Nexus operations, signal/cancel external workflow operations, and possibly other features added in the future. @@ -17467,6 +17482,8 @@ components: but a parent's fast_forward won't affect its child's execution. A flag is provided to disable propagation of the "enabled" flag to child workflows; regardless of that flag, a child workflow inherits the virtual time from the parent execution as its start time. + + For a scheduler execution: {{ TBD }} TimeSkippingStatePropagation: type: object properties: @@ -19534,7 +19551,15 @@ components: timeSkippingConfig: allOf: - $ref: '#/components/schemas/TimeSkippingConfig' - description: "The time-skipping configuration for this workflow execution.\n When `fast_forward` is set, time will be fast-forwarded to a future point relative\n to the current workflow timestamp. Each call takes effect, even if\n `fast_forward` is set to the same duration, since the target time is recalculated\n from the current timestamp on every call.\n\n This field must be updated as a whole; updating individual sub-fields is not supported.\n When setting the update mask in `UpdateWorkflowExecutionOptionsRequest`, \n `BatchOperationUpdateWorkflowExecutionOptions`, etc., use a mask that covers the entire field." + description: |- + Time-skipping configuration for this workflow execution. + If not set, the time-skipping configuration is not updated by this request; + the existing configuration is preserved. + + When `fast_forward` is set, time will be fast-forwarded to a future point relative + to the current workflow timestamp. Each call takes effect, even if + `fast_forward` is set to the same duration, since the target time is recalculated + from the current timestamp on every call. WorkflowExecutionOptionsUpdatedEventAttributes: type: object properties: @@ -19569,12 +19594,7 @@ components: timeSkippingConfig: allOf: - $ref: '#/components/schemas/TimeSkippingConfig' - description: TimeSkippingConfig override upserted in this event. Represents the full config. - timeSkippingConfigUpdated: - type: boolean - description: |- - Indicates the time skipping config was updated by the recent call to update - workflow execution options. + description: If set, the time-skipping configuration was changed. Contains the full updated configuration. workflowUpdateOptions: type: array items: diff --git a/temporal/api/common/v1/message.proto b/temporal/api/common/v1/message.proto index a0525ab47..a1275a38f 100644 --- a/temporal/api/common/v1/message.proto +++ b/temporal/api/common/v1/message.proto @@ -395,7 +395,9 @@ message OnConflictOptions { bool attach_links = 3; } -// The configuration for time skipping of a workflow execution (a chain of runs including retries, cron, continue-as-new). +// The configuration for time skipping of an execution. +// +// For a workflow execution (a chain of runs including retries, cron, continue-as-new): // When time skipping is enabled, virtual time advances automatically whenever there is no in-flight work. // In-flight work includes activities, child workflows, Nexus operations, signal/cancel external workflow operations, // and possibly other features added in the future. @@ -408,27 +410,34 @@ message OnConflictOptions { // but a parent's fast_forward won't affect its child's execution. A flag is provided to disable propagation of the // "enabled" flag to child workflows; regardless of that flag, a child workflow inherits the virtual time from the // parent execution as its start time. +// +// For a scheduler execution: {{ TBD }} message TimeSkippingConfig { // Enables or disables time skipping for this workflow execution. bool enabled = 1; - // Optionally fast-forward the current workflow execution by this duration ahead of current workflow execution time. - // After the fast-forward completes, time skipping is disabled, and this - // action is recorded in the WorkflowExecutionTimeSkippingTransitionedEvent. It can be re-enabled by - // setting `enabled` to true or setting `fast_forward` again via UpdateWorkflowExecutionOptions. - // The current workflow execution is a chain of runs (retries, cron, continue-as-new); - // child workflows are separate executions, so this fast_forward won't affect them. - // - // For a given workflow execution, only one active fast-forward is allowed at a time. - // If a new fast-forward is set via UpdateWorkflowExecutionOptions before the previous + // Optionally fast-forward the current execution by this duration ahead of current execution time. + // For a given execution, only one active fast-forward is allowed at a time. + // If a new fast-forward is set via a update call before the previous // one completes, the new one will override the previous one. // If the fast-forward duration exceeds the remaining execution timeout, time will only // be fast-forwarded up to the end of the execution. + // + // If the executions are workflows: + // When the fast-forward completes, time skipping is disabled by the call that initiated + // the fast-forward, and this action is recorded in the WorkflowExecutionTimeSkippingTransitionedEvent. + // It can be re-enabled by setting `enabled` to true via UpdateWorkflowExecutionOptions. + // The current workflow execution is a chain of runs (retries, cron, continue-as-new); + // child workflows are separate executions, so this fast_forward won't affect them. google.protobuf.Duration fast_forward = 2; // By default, child workflows inherit the "enabled" flag when they are started. // This flag disables that inheritance. bool disable_child_propagation = 3; + + // By default, executions inherit the "enabled" flag when they are started by a scheduler. + // This flag disables that inheritance. + bool disable_scheduled_action_propagation = 4; } // The time-skipping state that needs to be propagated from a parent workflow to a child workflow, diff --git a/temporal/api/schedule/v1/message.proto b/temporal/api/schedule/v1/message.proto index 73e9230f1..3eb16b0f1 100644 --- a/temporal/api/schedule/v1/message.proto +++ b/temporal/api/schedule/v1/message.proto @@ -312,7 +312,7 @@ message SchedulePatch { string unpause = 4; // If set, updates the time-skipping configuration for this schedule. - temporal.api.workflow.v1.TimeSkippingConfig time_skipping_config = 5; + temporal.api.common.v1.TimeSkippingConfig time_skipping_config = 5; } message ScheduleInfo { @@ -362,9 +362,10 @@ message Schedule { ScheduleAction action = 2; SchedulePolicies policies = 3; ScheduleState state = 4; - // Time-skipping configuration for workflows started by this schedule. - // If not set, time skipping is disabled for triggered workflow executions. - temporal.api.workflow.v1.TimeSkippingConfig time_skipping_config = 5; + + // Time-skipping configuration for this schedule. + // If not set, time skipping is disabled for triggered actions. + temporal.api.common.v1.TimeSkippingConfig time_skipping_config = 5; } // ScheduleListInfo is an abbreviated set of values from Schedule and ScheduleInfo From 844160ac6a68d74235fbb1b51be385adc521b0c1 Mon Sep 17 00:00:00 2001 From: Feiyang Xie Date: Wed, 17 Jun 2026 13:44:02 -0700 Subject: [PATCH 6/7] add time skipping for saa --- openapi/openapiv2.json | 32 +++++++++--- openapi/openapiv3.yaml | 49 +++++++++++++++---- temporal/api/activity/v1/message.proto | 7 +++ temporal/api/common/v1/message.proto | 16 ++++-- .../workflowservice/v1/request_response.proto | 3 ++ 5 files changed, 86 insertions(+), 21 deletions(-) diff --git a/openapi/openapiv2.json b/openapi/openapiv2.json index ef9bd52c5..d47337f50 100644 --- a/openapi/openapiv2.json +++ b/openapi/openapiv2.json @@ -12310,6 +12310,10 @@ "startDelay": { "type": "string", "description": "Time to wait before dispatching the first activity task. This delay is not applied to retry attempts." + }, + "timeSkippingConfig": { + "$ref": "#/definitions/v1TimeSkippingConfig", + "description": "Time-skipping configuration. If not set, time skipping is disabled." } } }, @@ -13471,6 +13475,10 @@ "startDelay": { "type": "string", "description": "Time to wait before dispatching the first activity task. This delay is not applied to retry attempts." + }, + "timeSkippingConfig": { + "$ref": "#/definitions/v1TimeSkippingConfig", + "description": "The current time-skipping configuration for this activity. Reflects the value set at start\nand any subsequent updates via UpdateActivityExecutionOptions. Nil if time skipping is disabled." } }, "description": "Information about a standalone activity." @@ -13632,6 +13640,10 @@ "priority": { "$ref": "#/definitions/v1Priority", "description": "Priority metadata. If this message is not present, or any fields are not\npresent, they inherit the values from the workflow." + }, + "timeSkippingConfig": { + "$ref": "#/definitions/v1TimeSkippingConfig", + "description": "Time-skipping configuration." } } }, @@ -16739,6 +16751,10 @@ "workflowUpdateCallbacks": { "type": "boolean", "title": "True if the namespace supports attaching callbacks on workflow updates" + }, + "pollerAutoscalingAutoEnroll": { + "type": "boolean", + "description": "When true, workers should use poller autoscaling by default unless explicitly configured otherwise." } }, "description": "Namespace capability details. Should contain what features are enabled in a namespace." @@ -19680,7 +19696,7 @@ "properties": { "enabled": { "type": "boolean", - "description": "Enables or disables time skipping for this workflow execution." + "description": "Enables or disables time skipping for this execution." }, "fastForward": { "type": "string", @@ -19688,14 +19704,14 @@ }, "disableChildPropagation": { "type": "boolean", - "description": "By default, child workflows inherit the \"enabled\" flag when they are started.\nThis flag disables that inheritance." + "description": "Workflow executions only. By default, child workflows inherit the \"enabled\" flag when they\nare started. This flag disables that inheritance. Ignored for standalone activities." }, "disableScheduledActionPropagation": { "type": "boolean", - "description": "By default, executions inherit the \"enabled\" flag when they are started by a scheduler.\nThis flag disables that inheritance." + "description": "Scheduler executions only. By default, executions inherit the \"enabled\" flag when they are\nstarted by a scheduler. This flag disables that inheritance. Ignored for standalone activities." } }, - "description": "The configuration for time skipping of an execution.\n\nFor a workflow execution (a chain of runs including retries, cron, continue-as-new):\nWhen time skipping is enabled, virtual time advances automatically whenever there is no in-flight work.\nIn-flight work includes activities, child workflows, Nexus operations, signal/cancel external workflow operations,\nand possibly other features added in the future.\nUser timers are not classified as in-flight work and will be skipped over; the virtual clock may also skip to the\ntime point of the registered fast forward when there is no in-flight work.\nWhen time is skipped, a WorkflowExecutionTimeSkippingTransitionedEvent will be\nadded to the workflow history to capture the state changes.\n\nFor child workflows, by default, if the parent execution is skipping time, the child execution will also skip time,\nbut a parent's fast_forward won't affect its child's execution. A flag is provided to disable propagation of the\n\"enabled\" flag to child workflows; regardless of that flag, a child workflow inherits the virtual time from the\nparent execution as its start time.\n\nFor a scheduler execution: {{ TBD }}" + "description": "The configuration for time skipping of an execution.\n\nFor a workflow execution (a chain of runs including retries, cron, continue-as-new):\nWhen time skipping is enabled, virtual time advances automatically whenever there is no in-flight work.\nIn-flight work includes activities, child workflows, Nexus operations, signal/cancel external workflow operations,\nand possibly other features added in the future.\nUser timers are not classified as in-flight work and will be skipped over; the virtual clock may also skip to the\ntime point of the registered fast forward when there is no in-flight work.\nWhen time is skipped, a WorkflowExecutionTimeSkippingTransitionedEvent will be\nadded to the workflow history to capture the state changes.\n\nFor child workflows, by default, if the parent execution is skipping time, the child execution will also skip time,\nbut a parent's fast_forward won't affect its child's execution. A flag is provided to disable propagation of the\n\"enabled\" flag to child workflows; regardless of that flag, a child workflow inherits the virtual time from the\nparent execution as its start time.\n\nFor a scheduler execution: {{ TBD }}\n\nFor a standalone activity: time skipping applies to the activity's own retry/backoff schedule.\nActivities scheduled by a workflow do not carry their own configuration; they inherit time\nskipping from the workflow execution. The `disable_child_propagation` and\n`disable_scheduled_action_propagation` fields are workflow/scheduler concepts and are ignored\nfor standalone activities." }, "v1TimeSkippingStatePropagation": { "type": "object", @@ -21017,7 +21033,7 @@ }, "timeSkippingConfig": { "$ref": "#/definitions/v1TimeSkippingConfig", - "description": "Time-skipping configuration for this workflow execution.\nIf not set, the time-skipping configuration is not updated by this request;\nthe existing configuration is preserved.\n\nWhen `fast_forward` is set, time will be fast-forwarded to a future point relative\nto the current workflow timestamp. Each call takes effect, even if\n`fast_forward` is set to the same duration, since the target time is recalculated\nfrom the current timestamp on every call." + "description": "The time-skipping configuration for this workflow execution.\nWhen `fast_forward` is set, time will be fast-forwarded to a future point relative\nto the current workflow timestamp. Each call takes effect, even if\n`fast_forward` is set to the same duration, since the target time is recalculated\nfrom the current timestamp on every call.\n\nThis field must be updated as a whole; updating individual sub-fields is not supported.\nWhen setting the update mask in `UpdateWorkflowExecutionOptionsRequest`,\n`BatchOperationUpdateWorkflowExecutionOptions`, etc., use a mask that covers the entire field." } } }, @@ -21054,7 +21070,11 @@ }, "timeSkippingConfig": { "$ref": "#/definitions/v1TimeSkippingConfig", - "description": "If set, the time-skipping configuration was changed. Contains the full updated configuration." + "description": "TimeSkippingConfig override upserted in this event. Represents the full config." + }, + "timeSkippingConfigUpdated": { + "type": "boolean", + "description": "Indicates the time skipping config was updated by the recent call to update\nworkflow execution options." }, "workflowUpdateOptions": { "type": "array", diff --git a/openapi/openapiv3.yaml b/openapi/openapiv3.yaml index 5f0f1447c..84f5e1816 100644 --- a/openapi/openapiv3.yaml +++ b/openapi/openapiv3.yaml @@ -9852,6 +9852,12 @@ components: pattern: ^-?(?:0|[1-9][0-9]{0,11})(?:\.[0-9]{1,9})?s$ type: string description: Time to wait before dispatching the first activity task. This delay is not applied to retry attempts. + timeSkippingConfig: + allOf: + - $ref: '#/components/schemas/TimeSkippingConfig' + description: |- + The current time-skipping configuration for this activity. Reflects the value set at start + and any subsequent updates via UpdateActivityExecutionOptions. Nil if time skipping is disabled. description: Information about a standalone activity. ActivityExecutionListInfo: type: object @@ -9997,6 +10003,10 @@ components: description: |- Priority metadata. If this message is not present, or any fields are not present, they inherit the values from the workflow. + timeSkippingConfig: + allOf: + - $ref: '#/components/schemas/TimeSkippingConfig' + description: Time-skipping configuration. ActivityPropertiesModifiedExternallyEventAttributes: type: object properties: @@ -13141,6 +13151,9 @@ components: workflowUpdateCallbacks: type: boolean description: True if the namespace supports attaching callbacks on workflow updates + pollerAutoscalingAutoEnroll: + type: boolean + description: When true, workers should use poller autoscaling by default unless explicitly configured otherwise. description: Namespace capability details. Should contain what features are enabled in a namespace. NamespaceInfo_Limits: type: object @@ -16568,6 +16581,10 @@ components: pattern: ^-?(?:0|[1-9][0-9]{0,11})(?:\.[0-9]{1,9})?s$ type: string description: Time to wait before dispatching the first activity task. This delay is not applied to retry attempts. + timeSkippingConfig: + allOf: + - $ref: '#/components/schemas/TimeSkippingConfig' + description: Time-skipping configuration. If not set, time skipping is disabled. StartActivityExecutionResponse: type: object properties: @@ -17438,7 +17455,7 @@ components: properties: enabled: type: boolean - description: Enables or disables time skipping for this workflow execution. + description: Enables or disables time skipping for this execution. fastForward: pattern: ^-?(?:0|[1-9][0-9]{0,11})(?:\.[0-9]{1,9})?s$ type: string @@ -17459,13 +17476,13 @@ components: disableChildPropagation: type: boolean description: |- - By default, child workflows inherit the "enabled" flag when they are started. - This flag disables that inheritance. + Workflow executions only. By default, child workflows inherit the "enabled" flag when they + are started. This flag disables that inheritance. Ignored for standalone activities. disableScheduledActionPropagation: type: boolean description: |- - By default, executions inherit the "enabled" flag when they are started by a scheduler. - This flag disables that inheritance. + Scheduler executions only. By default, executions inherit the "enabled" flag when they are + started by a scheduler. This flag disables that inheritance. Ignored for standalone activities. description: |- The configuration for time skipping of an execution. @@ -17484,6 +17501,12 @@ components: parent execution as its start time. For a scheduler execution: {{ TBD }} + + For a standalone activity: time skipping applies to the activity's own retry/backoff schedule. + Activities scheduled by a workflow do not carry their own configuration; they inherit time + skipping from the workflow execution. The `disable_child_propagation` and + `disable_scheduled_action_propagation` fields are workflow/scheduler concepts and are ignored + for standalone activities. TimeSkippingStatePropagation: type: object properties: @@ -19552,14 +19575,15 @@ components: allOf: - $ref: '#/components/schemas/TimeSkippingConfig' description: |- - Time-skipping configuration for this workflow execution. - If not set, the time-skipping configuration is not updated by this request; - the existing configuration is preserved. - + The time-skipping configuration for this workflow execution. When `fast_forward` is set, time will be fast-forwarded to a future point relative to the current workflow timestamp. Each call takes effect, even if `fast_forward` is set to the same duration, since the target time is recalculated from the current timestamp on every call. + + This field must be updated as a whole; updating individual sub-fields is not supported. + When setting the update mask in `UpdateWorkflowExecutionOptionsRequest`, + `BatchOperationUpdateWorkflowExecutionOptions`, etc., use a mask that covers the entire field. WorkflowExecutionOptionsUpdatedEventAttributes: type: object properties: @@ -19594,7 +19618,12 @@ components: timeSkippingConfig: allOf: - $ref: '#/components/schemas/TimeSkippingConfig' - description: If set, the time-skipping configuration was changed. Contains the full updated configuration. + description: TimeSkippingConfig override upserted in this event. Represents the full config. + timeSkippingConfigUpdated: + type: boolean + description: |- + Indicates the time skipping config was updated by the recent call to update + workflow execution options. workflowUpdateOptions: type: array items: diff --git a/temporal/api/activity/v1/message.proto b/temporal/api/activity/v1/message.proto index 01f058576..88db8a29b 100644 --- a/temporal/api/activity/v1/message.proto +++ b/temporal/api/activity/v1/message.proto @@ -63,6 +63,9 @@ message ActivityOptions { // Priority metadata. If this message is not present, or any fields are not // present, they inherit the values from the workflow. temporal.api.common.v1.Priority priority = 7; + + // Time-skipping configuration. + temporal.api.common.v1.TimeSkippingConfig time_skipping_config = 8; } // Information about a standalone activity. @@ -181,6 +184,10 @@ message ActivityExecutionInfo { // Time to wait before dispatching the first activity task. This delay is not applied to retry attempts. google.protobuf.Duration start_delay = 37; + + // The current time-skipping configuration for this activity. Reflects the value set at start + // and any subsequent updates via UpdateActivityExecutionOptions. Nil if time skipping is disabled. + temporal.api.common.v1.TimeSkippingConfig time_skipping_config = 38; } // Limited activity information returned in the list response. diff --git a/temporal/api/common/v1/message.proto b/temporal/api/common/v1/message.proto index a1275a38f..df409543c 100644 --- a/temporal/api/common/v1/message.proto +++ b/temporal/api/common/v1/message.proto @@ -412,8 +412,14 @@ message OnConflictOptions { // parent execution as its start time. // // For a scheduler execution: {{ TBD }} +// +// For a standalone activity: time skipping applies to the activity's own retry/backoff schedule. +// Activities scheduled by a workflow do not carry their own configuration; they inherit time +// skipping from the workflow execution. The `disable_child_propagation` and +// `disable_scheduled_action_propagation` fields are workflow/scheduler concepts and are ignored +// for standalone activities. message TimeSkippingConfig { - // Enables or disables time skipping for this workflow execution. + // Enables or disables time skipping for this execution. bool enabled = 1; // Optionally fast-forward the current execution by this duration ahead of current execution time. @@ -431,12 +437,12 @@ message TimeSkippingConfig { // child workflows are separate executions, so this fast_forward won't affect them. google.protobuf.Duration fast_forward = 2; - // By default, child workflows inherit the "enabled" flag when they are started. - // This flag disables that inheritance. + // Workflow executions only. By default, child workflows inherit the "enabled" flag when they + // are started. This flag disables that inheritance. Ignored for standalone activities. bool disable_child_propagation = 3; - // By default, executions inherit the "enabled" flag when they are started by a scheduler. - // This flag disables that inheritance. + // Scheduler executions only. By default, executions inherit the "enabled" flag when they are + // started by a scheduler. This flag disables that inheritance. Ignored for standalone activities. bool disable_scheduled_action_propagation = 4; } diff --git a/temporal/api/workflowservice/v1/request_response.proto b/temporal/api/workflowservice/v1/request_response.proto index 263c3c8a0..755cf4d89 100644 --- a/temporal/api/workflowservice/v1/request_response.proto +++ b/temporal/api/workflowservice/v1/request_response.proto @@ -3188,6 +3188,9 @@ message StartActivityExecutionRequest { temporal.api.common.v1.OnConflictOptions on_conflict_options = 21; // Time to wait before dispatching the first activity task. This delay is not applied to retry attempts. google.protobuf.Duration start_delay = 22; + + // Time-skipping configuration. If not set, time skipping is disabled. + temporal.api.common.v1.TimeSkippingConfig time_skipping_config = 23; } message StartActivityExecutionResponse { From 1b67a38e1d8c3a7984a4e88435eb00bab352923d Mon Sep 17 00:00:00 2001 From: Feiyang Xie Date: Wed, 17 Jun 2026 14:07:54 -0700 Subject: [PATCH 7/7] rm ts from patch schedulers --- openapi/openapiv2.json | 4 ---- openapi/openapiv3.yaml | 4 ---- temporal/api/schedule/v1/message.proto | 3 --- 3 files changed, 11 deletions(-) diff --git a/openapi/openapiv2.json b/openapi/openapiv2.json index d47337f50..53452ae6b 100644 --- a/openapi/openapiv2.json +++ b/openapi/openapiv2.json @@ -18834,10 +18834,6 @@ }, "unpause": { "type": "string" - }, - "timeSkippingConfig": { - "$ref": "#/definitions/v1TimeSkippingConfig", - "description": "If set, updates the time-skipping configuration for this schedule." } } }, diff --git a/openapi/openapiv3.yaml b/openapi/openapiv3.yaml index 84f5e1816..fce9ec09c 100644 --- a/openapi/openapiv3.yaml +++ b/openapi/openapiv3.yaml @@ -15779,10 +15779,6 @@ components: notes field to the value of the string. unpause: type: string - timeSkippingConfig: - allOf: - - $ref: '#/components/schemas/TimeSkippingConfig' - description: If set, updates the time-skipping configuration for this schedule. SchedulePolicies: type: object properties: diff --git a/temporal/api/schedule/v1/message.proto b/temporal/api/schedule/v1/message.proto index 3eb16b0f1..9ecd63550 100644 --- a/temporal/api/schedule/v1/message.proto +++ b/temporal/api/schedule/v1/message.proto @@ -310,9 +310,6 @@ message SchedulePatch { // notes field to the value of the string. string pause = 3; string unpause = 4; - - // If set, updates the time-skipping configuration for this schedule. - temporal.api.common.v1.TimeSkippingConfig time_skipping_config = 5; } message ScheduleInfo {