From 209443bf8291fe25d4703f2f32eb02902a4421e3 Mon Sep 17 00:00:00 2001 From: Feiyang Xie Date: Fri, 12 Jun 2026 10:32:41 -0700 Subject: [PATCH 1/2] 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 f5f8c40c76d8158ab13b4f8d1991996d80c98fb6 Mon Sep 17 00:00:00 2001 From: Feiyang Xie Date: Fri, 12 Jun 2026 10:52:47 -0700 Subject: [PATCH 2/2] change comments --- openapi/openapiv2.json | 16 +++++++++-- openapi/openapiv3.yaml | 40 +++++++++++++++++++------- temporal/api/common/v1/message.proto | 29 ++++++++++++------- temporal/api/schedule/v1/message.proto | 9 +++--- 4 files changed, 68 insertions(+), 26 deletions(-) diff --git a/openapi/openapiv2.json b/openapi/openapiv2.json index bebaa1eb4..ef9bd52c5 100644 --- a/openapi/openapiv2.json +++ b/openapi/openapiv2.json @@ -18613,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." } } }, @@ -18814,6 +18818,10 @@ }, "unpause": { "type": "string" + }, + "timeSkippingConfig": { + "$ref": "#/definitions/v1TimeSkippingConfig", + "description": "If set, updates the time-skipping configuration for this schedule." } } }, @@ -19676,14 +19684,18 @@ }, "fastForward": { "type": "string", - "description": "Optionally fast-forward the current workflow execution by this duration ahead of current workflow execution time.\nWhen the fast-forward completes, time skipping is disabled by the call that initiated the fast-forward, and this\naction is recorded in the WorkflowExecutionTimeSkippingTransitionedEvent. It can be re-enabled by\nsetting `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.\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." + }, + "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 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." + "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", diff --git a/openapi/openapiv3.yaml b/openapi/openapiv3.yaml index 92d67f3c3..5f0f1447c 100644 --- a/openapi/openapiv3.yaml +++ b/openapi/openapiv3.yaml @@ -15591,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: @@ -15760,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: @@ -17433,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. - 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. - - 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. @@ -17464,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: diff --git a/temporal/api/common/v1/message.proto b/temporal/api/common/v1/message.proto index 43ca7664d..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. - // 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. - // - // 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