Skip to content

Commit 2bf473b

Browse files
committed
add detailed explanation of in-flight work which will impact time-skipping, and change event name
1 parent cabd8ee commit 2bf473b

File tree

6 files changed

+55
-53
lines changed

6 files changed

+55
-53
lines changed

openapi/openapiv2.json

Lines changed: 14 additions & 14 deletions
Large diffs are not rendered by default.

openapi/openapiv3.yaml

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -10157,7 +10157,7 @@ components:
1015710157
- EVENT_TYPE_NEXUS_OPERATION_CANCEL_REQUEST_FAILED
1015810158
- EVENT_TYPE_WORKFLOW_EXECUTION_PAUSED
1015910159
- EVENT_TYPE_WORKFLOW_EXECUTION_UNPAUSED
10160-
- EVENT_TYPE_WORKFLOW_EXECUTION_TIME_SKIPPED
10160+
- EVENT_TYPE_WORKFLOW_EXECUTION_TIME_SKIPPING_STATE_CHANGED
1016110161
type: string
1016210162
format: enum
1016310163
version:
@@ -10316,8 +10316,8 @@ components:
1031610316
$ref: '#/components/schemas/WorkflowExecutionPausedEventAttributes'
1031710317
workflowExecutionUnpausedEventAttributes:
1031810318
$ref: '#/components/schemas/WorkflowExecutionUnpausedEventAttributes'
10319-
workflowExecutionTimeSkippedEventAttributes:
10320-
$ref: '#/components/schemas/WorkflowExecutionTimeSkippedEventAttributes'
10319+
workflowExecutionTimeSkippingStateChangedEventAttributes:
10320+
$ref: '#/components/schemas/WorkflowExecutionTimeSkippingStateChangedEventAttributes'
1032110321
description: |-
1032210322
History events are the method by which Temporal SDKs advance (or recreate) workflow state.
1032310323
See the `EventType` enum for more info about what each event is for.
@@ -12263,7 +12263,7 @@ components:
1226312263
- EVENT_TYPE_NEXUS_OPERATION_CANCEL_REQUEST_FAILED
1226412264
- EVENT_TYPE_WORKFLOW_EXECUTION_PAUSED
1226512265
- EVENT_TYPE_WORKFLOW_EXECUTION_UNPAUSED
12266-
- EVENT_TYPE_WORKFLOW_EXECUTION_TIME_SKIPPED
12266+
- EVENT_TYPE_WORKFLOW_EXECUTION_TIME_SKIPPING_STATE_CHANGED
1226712267
type: string
1226812268
description: The event type of the history event generated by the request.
1226912269
format: enum
@@ -13580,7 +13580,7 @@ components:
1358013580
timeSkippingConfig:
1358113581
allOf:
1358213582
- $ref: '#/components/schemas/TimeSkippingConfig'
13583-
description: Time skipping configuration. If not set, automatic time-skipping is disabled.
13583+
description: Time-skipping configuration. If not set, time skipping is disabled.
1358413584
SignalWithStartWorkflowExecutionResponse:
1358513585
type: object
1358613586
properties:
@@ -14046,7 +14046,7 @@ components:
1404614046
timeSkippingConfig:
1404714047
allOf:
1404814048
- $ref: '#/components/schemas/TimeSkippingConfig'
14049-
description: Automatic time-skipping configuration. If not set, automatic time-skipping is disabled.
14049+
description: Time-skipping configuration. If not set, time skipping is disabled.
1405014050
StartWorkflowExecutionResponse:
1405114051
type: object
1405214052
properties:
@@ -14455,7 +14455,7 @@ components:
1445514455
properties:
1445614456
enabled:
1445714457
type: boolean
14458-
description: "Enables or disables automatic time skipping for this workflow execution.\n By default, this field is propagated to transitively related workflows (child workflows/start-as-new/reset) \n at the time they are started.\n Changes made after a transitively related workflow has started are not propagated."
14458+
description: "Enables or disables time skipping for this workflow execution.\n By default, this field is propagated to transitively related workflows (child workflows/start-as-new/reset) \n at the time they are started.\n Changes made after a transitively related workflow has started are not propagated."
1445914459
disablePropagation:
1446014460
type: boolean
1446114461
description: If set, the enabled field is not propagated to transitively related workflows.
@@ -14476,9 +14476,11 @@ components:
1447614476
Time skipping will not advance beyond this point.
1447714477
format: date-time
1447814478
description: |-
14479-
Configuration for automatic time skipping during a workflow execution.
14480-
When enabled, virtual time advances automatically whenever there are
14481-
no in-flight activities, child workflows, or Nexus operations.
14479+
Configuration for time skipping during a workflow execution.
14480+
When enabled, virtual time advances automatically whenever there is no in-flight work.
14481+
In-flight work includes activities, child workflows, Nexus operations, signal/cancel external workflow operations,
14482+
and possibly other features added in the future.
14483+
User timers are not classified as in-flight work and will be skipped over.
1448214484
TimeoutFailureInfo:
1448314485
type: object
1448414486
properties:
@@ -15909,7 +15911,7 @@ components:
1590915911
- EVENT_TYPE_NEXUS_OPERATION_CANCEL_REQUEST_FAILED
1591015912
- EVENT_TYPE_WORKFLOW_EXECUTION_PAUSED
1591115913
- EVENT_TYPE_WORKFLOW_EXECUTION_UNPAUSED
15912-
- EVENT_TYPE_WORKFLOW_EXECUTION_TIME_SKIPPED
15914+
- EVENT_TYPE_WORKFLOW_EXECUTION_TIME_SKIPPING_STATE_CHANGED
1591315915
type: string
1591415916
format: enum
1591515917
description: EventReference is a direct reference to a history event through the event ID.
@@ -15980,7 +15982,7 @@ components:
1598015982
- EVENT_TYPE_NEXUS_OPERATION_CANCEL_REQUEST_FAILED
1598115983
- EVENT_TYPE_WORKFLOW_EXECUTION_PAUSED
1598215984
- EVENT_TYPE_WORKFLOW_EXECUTION_UNPAUSED
15983-
- EVENT_TYPE_WORKFLOW_EXECUTION_TIME_SKIPPED
15985+
- EVENT_TYPE_WORKFLOW_EXECUTION_TIME_SKIPPING_STATE_CHANGED
1598415986
type: string
1598515987
format: enum
1598615988
description: RequestIdReference is a indirect reference to a history event through the request ID.
@@ -16368,7 +16370,7 @@ components:
1636816370
timeSkippingConfig:
1636916371
allOf:
1637016372
- $ref: '#/components/schemas/TimeSkippingConfig'
16371-
description: "Time skipping configuration upserted in this event. \n It means the time-skipping config is changed, and the full latest config is upserted."
16373+
description: If set, the time-skipping configuration was changed. Contains the full updated configuration.
1637216374
WorkflowExecutionPauseInfo:
1637316375
type: object
1637416376
properties:
@@ -16674,27 +16676,26 @@ components:
1667416676
identity:
1667516677
type: string
1667616678
description: id of the client who requested termination
16677-
WorkflowExecutionTimeSkippedEventAttributes:
16679+
WorkflowExecutionTimeSkippingStateChangedEventAttributes:
1667816680
type: object
1667916681
properties:
1668016682
targetTime:
1668116683
type: string
16682-
description: The virtual time after time skipping is applied.
16684+
description: The virtual time after time skipping was applied.
1668316685
format: date-time
1668416686
disabledAfterBound:
1668516687
type: boolean
1668616688
description: |-
16687-
when true, automatic time-skipping was enabled with a bound
16688-
and now that bound has been reached and time-skipping is disabled automatically.
16689+
when true, time skipping was disabled automatically due to a bound being reached.
1668916690
(-- api-linter: core::0140::prepositions=disabled
1669016691
aip.dev/not-precedent: "after" is used to indicate temporal ordering. --)
1669116692
wallClockTime:
1669216693
type: string
16693-
description: The wall-clock time when the time-skipping event happened.
16694+
description: The wall-clock time when the time-skipping state changed event was generated.
1669416695
format: date-time
1669516696
description: |-
16696-
Attributes for an event indicating that virtual time was advanced for a workflow execution,
16697-
either via a manual time-skipping API call or automatic time skipping.
16697+
Attributes for an event indicating that time skipping state changed for a workflow execution,
16698+
either time was advanced or time skipping was disabled automatically due to a bound being reached.
1669816699
The worker_may_ignore field in HistoryEvent should always be set true for this event.
1669916700
WorkflowExecutionTimedOutEventAttributes:
1670016701
type: object

temporal/api/enums/v1/event_type.proto

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,6 @@ enum EventType {
173173
EVENT_TYPE_WORKFLOW_EXECUTION_PAUSED = 58;
174174
// An event that indicates that the previously paused workflow execution has been unpaused.
175175
EVENT_TYPE_WORKFLOW_EXECUTION_UNPAUSED = 59;
176-
// An event that indicates that some duration was skipped for this workflow execution.
177-
EVENT_TYPE_WORKFLOW_EXECUTION_TIME_SKIPPED = 60;
176+
// An event that indicates time skipping advanced time or was disabled automatically after a bound was reached.
177+
EVENT_TYPE_WORKFLOW_EXECUTION_TIME_SKIPPING_STATE_CHANGED = 60;
178178
}

temporal/api/history/v1/message.proto

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -873,8 +873,7 @@ message WorkflowExecutionOptionsUpdatedEventAttributes {
873873
// Priority override upserted in this event. Represents the full priority; not just partial fields.
874874
// Ignored if nil.
875875
temporal.api.common.v1.Priority priority = 6;
876-
// Time skipping configuration upserted in this event.
877-
// It means the time-skipping config is changed, and the full latest config is upserted.
876+
// If set, the time-skipping configuration was changed. Contains the full updated configuration.
878877
temporal.api.workflow.v1.TimeSkippingConfig time_skipping_config = 7;
879878
}
880879

@@ -968,21 +967,20 @@ message WorkflowExecutionUnpausedEventAttributes {
968967
string request_id = 3;
969968
}
970969

971-
// Attributes for an event indicating that virtual time was advanced for a workflow execution,
972-
// either via a manual time-skipping API call or automatic time skipping.
970+
// Attributes for an event indicating that time skipping state changed for a workflow execution,
971+
// either time was advanced or time skipping was disabled automatically due to a bound being reached.
973972
// The worker_may_ignore field in HistoryEvent should always be set true for this event.
974-
message WorkflowExecutionTimeSkippedEventAttributes {
973+
message WorkflowExecutionTimeSkippingStateChangedEventAttributes {
975974

976-
// The virtual time after time skipping is applied.
975+
// The virtual time after time skipping was applied.
977976
google.protobuf.Timestamp target_time = 1;
978977

979-
// when true, automatic time-skipping was enabled with a bound
980-
// and now that bound has been reached and time-skipping is disabled automatically.
978+
// when true, time skipping was disabled automatically due to a bound being reached.
981979
// (-- api-linter: core::0140::prepositions=disabled
982980
// aip.dev/not-precedent: "after" is used to indicate temporal ordering. --)
983981
bool disabled_after_bound = 2;
984982

985-
// The wall-clock time when the time-skipping event happened.
983+
// The wall-clock time when the time-skipping state changed event was generated.
986984
google.protobuf.Timestamp wall_clock_time = 3;
987985
}
988986

@@ -1222,7 +1220,7 @@ message HistoryEvent {
12221220
NexusOperationCancelRequestFailedEventAttributes nexus_operation_cancel_request_failed_event_attributes = 62;
12231221
WorkflowExecutionPausedEventAttributes workflow_execution_paused_event_attributes = 63;
12241222
WorkflowExecutionUnpausedEventAttributes workflow_execution_unpaused_event_attributes = 64;
1225-
WorkflowExecutionTimeSkippedEventAttributes workflow_execution_time_skipped_event_attributes = 65;
1223+
WorkflowExecutionTimeSkippingStateChangedEventAttributes workflow_execution_time_skipping_state_changed_event_attributes = 65;
12261224
}
12271225
}
12281226

temporal/api/workflow/v1/message.proto

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -573,12 +573,15 @@ message WorkflowExecutionOptions {
573573
TimeSkippingConfig time_skipping_config = 3;
574574
}
575575

576-
// Configuration for automatic time skipping during a workflow execution.
577-
// When enabled, virtual time advances automatically whenever there are
578-
// no in-flight activities, child workflows, or Nexus operations.
576+
// Configuration for time skipping during a workflow execution.
577+
// When enabled, virtual time advances automatically whenever there is no in-flight work.
578+
// In-flight work includes activities, child workflows, Nexus operations, signal/cancel external workflow operations,
579+
// and possibly other features added in the future.
580+
// User timers are not classified as in-flight work and will be skipped over.
581+
// When time advances, it skips to the earlier of the next user timer or the configured bound, if either exists.
579582
message TimeSkippingConfig {
580583

581-
// Enables or disables automatic time skipping for this workflow execution.
584+
// Enables or disables time skipping for this workflow execution.
582585
// By default, this field is propagated to transitively related workflows (child workflows/start-as-new/reset)
583586
// at the time they are started.
584587
// Changes made after a transitively related workflow has started are not propagated.

temporal/api/workflowservice/v1/request_response.proto

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ message StartWorkflowExecutionRequest {
197197
temporal.api.common.v1.Priority priority = 27;
198198
// Deployment Options of the worker who will process the eager task. Passed when `request_eager_execution=true`.
199199
temporal.api.deployment.v1.WorkerDeploymentOptions eager_worker_deployment_options = 28;
200-
// Automatic time-skipping configuration. If not set, automatic time-skipping is disabled.
200+
// Time-skipping configuration. If not set, time skipping is disabled.
201201
temporal.api.workflow.v1.TimeSkippingConfig time_skipping_config = 29;
202202
}
203203

@@ -838,7 +838,7 @@ message SignalWithStartWorkflowExecutionRequest {
838838
temporal.api.workflow.v1.VersioningOverride versioning_override = 25;
839839
// Priority metadata
840840
temporal.api.common.v1.Priority priority = 26;
841-
// Time skipping configuration. If not set, automatic time-skipping is disabled.
841+
// Time-skipping configuration. If not set, time skipping is disabled.
842842
temporal.api.workflow.v1.TimeSkippingConfig time_skipping_config = 27;
843843
}
844844

@@ -2959,4 +2959,4 @@ message DeleteActivityExecutionRequest {
29592959
}
29602960

29612961
message DeleteActivityExecutionResponse {
2962-
}
2962+
}

0 commit comments

Comments
 (0)