Skip to content

Commit d0d1aa1

Browse files
committed
add time skipping for saa
1 parent f5f8c40 commit d0d1aa1

5 files changed

Lines changed: 62 additions & 14 deletions

File tree

openapi/openapiv2.json

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12310,6 +12310,10 @@
1231012310
"startDelay": {
1231112311
"type": "string",
1231212312
"description": "Time to wait before dispatching the first activity task. This delay is not applied to retry attempts."
12313+
},
12314+
"timeSkippingConfig": {
12315+
"$ref": "#/definitions/v1TimeSkippingConfig",
12316+
"description": "Time-skipping configuration. If not set, time skipping is disabled."
1231312317
}
1231412318
}
1231512319
},
@@ -13471,6 +13475,10 @@
1347113475
"startDelay": {
1347213476
"type": "string",
1347313477
"description": "Time to wait before dispatching the first activity task. This delay is not applied to retry attempts."
13478+
},
13479+
"timeSkippingConfig": {
13480+
"$ref": "#/definitions/v1TimeSkippingConfig",
13481+
"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."
1347413482
}
1347513483
},
1347613484
"description": "Information about a standalone activity."
@@ -13632,6 +13640,10 @@
1363213640
"priority": {
1363313641
"$ref": "#/definitions/v1Priority",
1363413642
"description": "Priority metadata. If this message is not present, or any fields are not\npresent, they inherit the values from the workflow."
13643+
},
13644+
"timeSkippingConfig": {
13645+
"$ref": "#/definitions/v1TimeSkippingConfig",
13646+
"description": "Time-skipping configuration."
1363513647
}
1363613648
}
1363713649
},
@@ -19680,22 +19692,22 @@
1968019692
"properties": {
1968119693
"enabled": {
1968219694
"type": "boolean",
19683-
"description": "Enables or disables time skipping for this workflow execution."
19695+
"description": "Enables or disables time skipping for this execution."
1968419696
},
1968519697
"fastForward": {
1968619698
"type": "string",
1968719699
"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."
1968819700
},
1968919701
"disableChildPropagation": {
1969019702
"type": "boolean",
19691-
"description": "By default, child workflows inherit the \"enabled\" flag when they are started.\nThis flag disables that inheritance."
19703+
"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."
1969219704
},
1969319705
"disableScheduledActionPropagation": {
1969419706
"type": "boolean",
19695-
"description": "By default, executions inherit the \"enabled\" flag when they are started by a scheduler.\nThis flag disables that inheritance."
19707+
"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."
1969619708
}
1969719709
},
19698-
"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 }}"
19710+
"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."
1969919711
},
1970019712
"v1TimeSkippingStatePropagation": {
1970119713
"type": "object",

openapi/openapiv3.yaml

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9852,6 +9852,12 @@ components:
98529852
pattern: ^-?(?:0|[1-9][0-9]{0,11})(?:\.[0-9]{1,9})?s$
98539853
type: string
98549854
description: Time to wait before dispatching the first activity task. This delay is not applied to retry attempts.
9855+
timeSkippingConfig:
9856+
allOf:
9857+
- $ref: '#/components/schemas/TimeSkippingConfig'
9858+
description: |-
9859+
The current time-skipping configuration for this activity. Reflects the value set at start
9860+
and any subsequent updates via UpdateActivityExecutionOptions. Nil if time skipping is disabled.
98559861
description: Information about a standalone activity.
98569862
ActivityExecutionListInfo:
98579863
type: object
@@ -9997,6 +10003,10 @@ components:
999710003
description: |-
999810004
Priority metadata. If this message is not present, or any fields are not
999910005
present, they inherit the values from the workflow.
10006+
timeSkippingConfig:
10007+
allOf:
10008+
- $ref: '#/components/schemas/TimeSkippingConfig'
10009+
description: Time-skipping configuration.
1000010010
ActivityPropertiesModifiedExternallyEventAttributes:
1000110011
type: object
1000210012
properties:
@@ -16568,6 +16578,10 @@ components:
1656816578
pattern: ^-?(?:0|[1-9][0-9]{0,11})(?:\.[0-9]{1,9})?s$
1656916579
type: string
1657016580
description: Time to wait before dispatching the first activity task. This delay is not applied to retry attempts.
16581+
timeSkippingConfig:
16582+
allOf:
16583+
- $ref: '#/components/schemas/TimeSkippingConfig'
16584+
description: Time-skipping configuration. If not set, time skipping is disabled.
1657116585
StartActivityExecutionResponse:
1657216586
type: object
1657316587
properties:
@@ -17438,7 +17452,7 @@ components:
1743817452
properties:
1743917453
enabled:
1744017454
type: boolean
17441-
description: Enables or disables time skipping for this workflow execution.
17455+
description: Enables or disables time skipping for this execution.
1744217456
fastForward:
1744317457
pattern: ^-?(?:0|[1-9][0-9]{0,11})(?:\.[0-9]{1,9})?s$
1744417458
type: string
@@ -17459,13 +17473,13 @@ components:
1745917473
disableChildPropagation:
1746017474
type: boolean
1746117475
description: |-
17462-
By default, child workflows inherit the "enabled" flag when they are started.
17463-
This flag disables that inheritance.
17476+
Workflow executions only. By default, child workflows inherit the "enabled" flag when they
17477+
are started. This flag disables that inheritance. Ignored for standalone activities.
1746417478
disableScheduledActionPropagation:
1746517479
type: boolean
1746617480
description: |-
17467-
By default, executions inherit the "enabled" flag when they are started by a scheduler.
17468-
This flag disables that inheritance.
17481+
Scheduler executions only. By default, executions inherit the "enabled" flag when they are
17482+
started by a scheduler. This flag disables that inheritance. Ignored for standalone activities.
1746917483
description: |-
1747017484
The configuration for time skipping of an execution.
1747117485

@@ -17484,6 +17498,12 @@ components:
1748417498
parent execution as its start time.
1748517499

1748617500
For a scheduler execution: {{ TBD }}
17501+
17502+
For a standalone activity: time skipping applies to the activity's own retry/backoff schedule.
17503+
Activities scheduled by a workflow do not carry their own configuration; they inherit time
17504+
skipping from the workflow execution. The `disable_child_propagation` and
17505+
`disable_scheduled_action_propagation` fields are workflow/scheduler concepts and are ignored
17506+
for standalone activities.
1748717507
TimeSkippingStatePropagation:
1748817508
type: object
1748917509
properties:

temporal/api/activity/v1/message.proto

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,9 @@ message ActivityOptions {
6363
// Priority metadata. If this message is not present, or any fields are not
6464
// present, they inherit the values from the workflow.
6565
temporal.api.common.v1.Priority priority = 7;
66+
67+
// Time-skipping configuration.
68+
temporal.api.common.v1.TimeSkippingConfig time_skipping_config = 8;
6669
}
6770

6871
// Information about a standalone activity.
@@ -181,6 +184,10 @@ message ActivityExecutionInfo {
181184

182185
// Time to wait before dispatching the first activity task. This delay is not applied to retry attempts.
183186
google.protobuf.Duration start_delay = 37;
187+
188+
// The current time-skipping configuration for this activity. Reflects the value set at start
189+
// and any subsequent updates via UpdateActivityExecutionOptions. Nil if time skipping is disabled.
190+
temporal.api.common.v1.TimeSkippingConfig time_skipping_config = 38;
184191
}
185192

186193
// Limited activity information returned in the list response.

temporal/api/common/v1/message.proto

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -412,8 +412,14 @@ message OnConflictOptions {
412412
// parent execution as its start time.
413413
//
414414
// For a scheduler execution: {{ TBD }}
415+
//
416+
// For a standalone activity: time skipping applies to the activity's own retry/backoff schedule.
417+
// Activities scheduled by a workflow do not carry their own configuration; they inherit time
418+
// skipping from the workflow execution. The `disable_child_propagation` and
419+
// `disable_scheduled_action_propagation` fields are workflow/scheduler concepts and are ignored
420+
// for standalone activities.
415421
message TimeSkippingConfig {
416-
// Enables or disables time skipping for this workflow execution.
422+
// Enables or disables time skipping for this execution.
417423
bool enabled = 1;
418424

419425
// Optionally fast-forward the current execution by this duration ahead of current execution time.
@@ -431,12 +437,12 @@ message TimeSkippingConfig {
431437
// child workflows are separate executions, so this fast_forward won't affect them.
432438
google.protobuf.Duration fast_forward = 2;
433439

434-
// By default, child workflows inherit the "enabled" flag when they are started.
435-
// This flag disables that inheritance.
440+
// Workflow executions only. By default, child workflows inherit the "enabled" flag when they
441+
// are started. This flag disables that inheritance. Ignored for standalone activities.
436442
bool disable_child_propagation = 3;
437443

438-
// By default, executions inherit the "enabled" flag when they are started by a scheduler.
439-
// This flag disables that inheritance.
444+
// Scheduler executions only. By default, executions inherit the "enabled" flag when they are
445+
// started by a scheduler. This flag disables that inheritance. Ignored for standalone activities.
440446
bool disable_scheduled_action_propagation = 4;
441447
}
442448

temporal/api/workflowservice/v1/request_response.proto

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3188,6 +3188,9 @@ message StartActivityExecutionRequest {
31883188
temporal.api.common.v1.OnConflictOptions on_conflict_options = 21;
31893189
// Time to wait before dispatching the first activity task. This delay is not applied to retry attempts.
31903190
google.protobuf.Duration start_delay = 22;
3191+
3192+
// Time-skipping configuration. If not set, time skipping is disabled.
3193+
temporal.api.common.v1.TimeSkippingConfig time_skipping_config = 23;
31913194
}
31923195

31933196
message StartActivityExecutionResponse {

0 commit comments

Comments
 (0)