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
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ $(PROTO_OUT):
mkdir $(PROTO_OUT)

##### Compile proto files for go #####
grpc: buf-lint api-linter buf-breaking clean go-grpc fix-path
grpc: buf-lint api-linter clean go-grpc fix-path

go-grpc: clean $(PROTO_OUT)
printf $(COLOR) "Compile for go-gRPC..."
Expand Down
27 changes: 21 additions & 6 deletions openapi/openapiv2.json
Original file line number Diff line number Diff line change
Expand Up @@ -11130,6 +11130,19 @@
}
}
},
"WorkflowExecutionTimeSkippingTransitionedEventAttributesMaxSkip": {
"type": "object",
"properties": {
"configured": {
"type": "string",
"description": "The configured max skip value."
},
"remaining": {
"type": "string",
"description": "The remaining max skip duration that can be skipped."
}
}
},
"WorkflowRuleActionActionActivityPause": {
"type": "object"
},
Expand Down Expand Up @@ -19469,13 +19482,11 @@
"type": "boolean",
"description": "Enables or disables time skipping for this workflow execution."
},
"maxSkippedDuration": {
"type": "string",
"description": "Maximum total virtual time that can be skipped."
"value": {
"type": "string"
},
"maxElapsedDuration": {
"type": "string",
"description": "Maximum elapsed time since time skipping was enabled.\nThis includes both skipped time and real time elapsing."
"delta": {
"type": "string"
}
},
"description": "Configuration for time skipping during a workflow execution.\nWhen 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.\nWhen time advances, it skips to the earlier of the next user timer or the configured bound, if either exists.\n\nPropagation behavior of time skipping:\nThe enabled flag, bound fields, and accumulated skipped duration are propagated to related executions as follows:\n(1) Child workflows and continue-as-new: both the configuration and the accumulated skipped duration are\n inherited from the current execution. The configured bound is shared between the inherited skipped\n duration and any additional duration skipped by the new run.\n(2) Retry and cron: the configuration and accumulated skipped duration are inherited as recorded when the\n current workflow started; the accumulated skipped duration of the current run is not propagated.\n(3) Reset: the new run retains the time-skipping configuration of the current execution. Because reset replays\n all events up to the reset point and re-applies any UpdateWorkflowExecutionOptions changes made after that\n point, the resulting run ends up with the same final time-skipping configuration as the previous run."
Expand Down Expand Up @@ -21114,6 +21125,10 @@
"type": "string",
"format": "date-time",
"description": "The wall-clock time when the time-skipping state changed event was generated."
},
"maxSkip": {
"$ref": "#/definitions/WorkflowExecutionTimeSkippingTransitionedEventAttributesMaxSkip",
"description": "If max skip is set, it contains the current max skip value and remaining max skip duration that can be skipped.\nIf max skip is not set, it will be nil."
}
},
"description": "Attributes for an event indicating that time skipping state changed for a workflow execution,\neither time was advanced or time skipping was disabled automatically due to a bound being reached.\nThe worker_may_ignore field in HistoryEvent should always be set true for this event."
Expand Down
25 changes: 19 additions & 6 deletions openapi/openapiv3.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17234,16 +17234,12 @@ components:
enabled:
type: boolean
description: Enables or disables time skipping for this workflow execution.
maxSkippedDuration:
value:
pattern: ^-?(?:0|[1-9][0-9]{0,11})(?:\.[0-9]{1,9})?s$
type: string
description: Maximum total virtual time that can be skipped.
maxElapsedDuration:
delta:
pattern: ^-?(?:0|[1-9][0-9]{0,11})(?:\.[0-9]{1,9})?s$
type: string
description: |-
Maximum elapsed time since time skipping was enabled.
This includes both skipped time and real time elapsing.
description: "Configuration for time skipping during a workflow execution.\n When enabled, virtual time advances automatically whenever there is no in-flight work.\n In-flight work includes activities, child workflows, Nexus operations, signal/cancel external workflow operations,\n and possibly other features added in the future.\n User timers are not classified as in-flight work and will be skipped over.\n When time advances, it skips to the earlier of the next user timer or the configured bound, if either exists.\n \n Propagation behavior of time skipping:\n The enabled flag, bound fields, and accumulated skipped duration are propagated to related executions as follows:\n (1) Child workflows and continue-as-new: both the configuration and the accumulated skipped duration are\n inherited from the current execution. The configured bound is shared between the inherited skipped\n duration and any additional duration skipped by the new run.\n (2) Retry and cron: the configuration and accumulated skipped duration are inherited as recorded when the\n current workflow started; the accumulated skipped duration of the current run is not propagated.\n (3) Reset: the new run retains the time-skipping configuration of the current execution. Because reset replays\n all events up to the reset point and re-applies any UpdateWorkflowExecutionOptions changes made after that\n point, the resulting run ends up with the same final time-skipping configuration as the previous run."
TimeoutFailureInfo:
type: object
Expand Down Expand Up @@ -19691,10 +19687,27 @@ components:
type: string
description: The wall-clock time when the time-skipping state changed event was generated.
format: date-time
maxSkip:
allOf:
- $ref: '#/components/schemas/WorkflowExecutionTimeSkippingTransitionedEventAttributes_MaxSkip'
description: |-
If max skip is set, it contains the current max skip value and remaining max skip duration that can be skipped.
If max skip is not set, it will be nil.
description: |-
Attributes for an event indicating that time skipping state changed for a workflow execution,
either time was advanced or time skipping was disabled automatically due to a bound being reached.
The worker_may_ignore field in HistoryEvent should always be set true for this event.
WorkflowExecutionTimeSkippingTransitionedEventAttributes_MaxSkip:
type: object
properties:
configured:
pattern: ^-?(?:0|[1-9][0-9]{0,11})(?:\.[0-9]{1,9})?s$
type: string
description: The configured max skip value.
remaining:
pattern: ^-?(?:0|[1-9][0-9]{0,11})(?:\.[0-9]{1,9})?s$
type: string
description: The remaining max skip duration that can be skipped.
WorkflowExecutionTimedOutEventAttributes:
type: object
properties:
Expand Down
11 changes: 11 additions & 0 deletions temporal/api/history/v1/message.proto
Original file line number Diff line number Diff line change
Expand Up @@ -1016,6 +1016,17 @@ message WorkflowExecutionTimeSkippingTransitionedEventAttributes {

// The wall-clock time when the time-skipping state changed event was generated.
google.protobuf.Timestamp wall_clock_time = 3;

// If max skip is set, it contains the current max skip value and remaining max skip duration that can be skipped.
// If max skip is not set, it will be nil.
MaxSkip max_skip = 4;

message MaxSkip {
// The configured max skip value.
google.protobuf.Duration configured = 1;
// The remaining max skip duration that can be skipped.
google.protobuf.Duration remaining = 2;
}
}

// Event marking that an operation was scheduled by a workflow via the ScheduleNexusOperation command.
Expand Down
20 changes: 7 additions & 13 deletions temporal/api/workflow/v1/message.proto
Original file line number Diff line number Diff line change
Expand Up @@ -609,28 +609,22 @@ message WorkflowExecutionOptions {
// all events up to the reset point and re-applies any UpdateWorkflowExecutionOptions changes made after that
// point, the resulting run ends up with the same final time-skipping configuration as the previous run.
message TimeSkippingConfig {
reserved 2, 6;
reserved "disable_propagation", "max_target_time";

// Enables or disables time skipping for this workflow execution.
bool enabled = 1;

// Optional bound that limits the gap between the virtual time of this execution and wall-clock time.
// Once the bound is reached, time skipping is automatically disabled,
// but can be re-enabled by setting `enabled` to true via UpdateWorkflowExecutionOptions.
// This bound cannot be set to a value smaller than the execution's currently skipped duration.
//
// This bound can be set either by a value or a delta.
// - If a value is set, it cannot be set to a value smaller than the execution's currently skipped duration.
// - If a delta is set, it will be added to the execution's currently skipped duration to get the max skip value.
// This is useful in testing scenarios where a workflow is expected to receive
// signals, updates, or other external events while timers are in progress.
oneof bound {
// Maximum total virtual time that can be skipped.
google.protobuf.Duration max_skipped_duration = 4;

// Maximum elapsed time since time skipping was enabled.
// This includes both skipped time and real time elapsing.
// (-- api-linter: core::0142::time-field-names=disabled --)
google.protobuf.Duration max_elapsed_duration = 5;
}
google.protobuf.Duration value = 2;
google.protobuf.Duration delta = 3;
}

}

// Used to override the versioning behavior (and pinned deployment version, if applicable) of a
Expand Down
Loading