Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 17 additions & 5 deletions openapi/openapiv2.json
Original file line number Diff line number Diff line change
Expand Up @@ -12339,6 +12339,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."
}
}
},
Expand Down Expand Up @@ -18656,6 +18660,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."
}
}
},
Expand Down Expand Up @@ -19715,18 +19723,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",
Expand Down Expand Up @@ -21052,7 +21064,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."
}
}
},
Expand Down
63 changes: 49 additions & 14 deletions openapi/openapiv3.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15617,6 +15617,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:
Expand Down Expand Up @@ -16584,6 +16590,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:
Expand Down Expand Up @@ -17454,30 +17464,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.
Expand All @@ -17490,6 +17508,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:
Expand Down Expand Up @@ -19601,7 +19627,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:
Expand Down
41 changes: 28 additions & 13 deletions temporal/api/common/v1/message.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

specific options

// 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,
Expand Down
4 changes: 4 additions & 0 deletions temporal/api/schedule/v1/message.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion temporal/api/workflow/v1/message.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
Loading
Loading