diff --git a/openapi/openapiv2.json b/openapi/openapiv2.json index ea37162a0..53452ae6b 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." } } }, @@ -18617,6 +18629,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." } } }, @@ -19676,18 +19692,22 @@ "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", - "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": "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": "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 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 }}\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", @@ -21009,7 +21029,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": "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." } } }, diff --git a/openapi/openapiv3.yaml b/openapi/openapiv3.yaml index a2ec27cdd..fce9ec09c 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: @@ -15594,6 +15604,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: @@ -16561,6 +16577,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: @@ -17431,30 +17451,38 @@ 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 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. + 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: |- + 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 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 +17495,14 @@ 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 }} + + 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: @@ -19534,7 +19570,16 @@ 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: |- + 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: 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 a0525ab47..df409543c 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,40 @@ 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 }} +// +// 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 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. + // 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; + + // 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; } // The time-skipping state that needs to be propagated from a parent workflow to a child workflow, 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/schedule/v1/message.proto b/temporal/api/schedule/v1/message.proto index 3a0a9344c..9ecd63550 100644 --- a/temporal/api/schedule/v1/message.proto +++ b/temporal/api/schedule/v1/message.proto @@ -359,6 +359,10 @@ message Schedule { ScheduleAction action = 2; SchedulePolicies policies = 3; ScheduleState state = 4; + + // 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 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; } 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 {