Skip to content

Commit aaf6f74

Browse files
committed
Merge branch 'master' into ss/rev-number-can-child
2 parents 3eb3f3c + 3a34532 commit aaf6f74

File tree

9 files changed

+527
-6
lines changed

9 files changed

+527
-6
lines changed

openapi/openapiv2.json

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

openapi/openapiv3.yaml

Lines changed: 203 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6204,6 +6204,52 @@ paths:
62046204
application/json:
62056205
schema:
62066206
$ref: '#/components/schemas/Status'
6207+
/namespaces/{namespace}/workflows/{workflowId}/pause:
6208+
post:
6209+
tags:
6210+
- WorkflowService
6211+
description: |-
6212+
Note: This is an experimental API and the behavior may change in a future release.
6213+
PauseWorkflowExecution pauses the workflow execution specified in the request. Pausing a workflow execution results in
6214+
- The workflow execution status changes to `PAUSED` and a new WORKFLOW_EXECUTION_PAUSED event is added to the history
6215+
- No new workflow tasks or activity tasks are dispatched.
6216+
- Any workflow task currently executing on the worker will be allowed to complete.
6217+
- Any activity task currently executing will be paused.
6218+
- All server-side events will continue to be processed by the server.
6219+
- Queries & Updates on a paused workflow will be rejected.
6220+
operationId: PauseWorkflowExecution
6221+
parameters:
6222+
- name: namespace
6223+
in: path
6224+
description: Namespace of the workflow to pause.
6225+
required: true
6226+
schema:
6227+
type: string
6228+
- name: workflowId
6229+
in: path
6230+
description: ID of the workflow execution to be paused. Required.
6231+
required: true
6232+
schema:
6233+
type: string
6234+
requestBody:
6235+
content:
6236+
application/json:
6237+
schema:
6238+
$ref: '#/components/schemas/PauseWorkflowExecutionRequest'
6239+
required: true
6240+
responses:
6241+
"200":
6242+
description: OK
6243+
content:
6244+
application/json:
6245+
schema:
6246+
$ref: '#/components/schemas/PauseWorkflowExecutionResponse'
6247+
default:
6248+
description: Default error response
6249+
content:
6250+
application/json:
6251+
schema:
6252+
$ref: '#/components/schemas/Status'
62076253
/namespaces/{namespace}/workflows/{workflowId}/signal-with-start/{signalName}:
62086254
post:
62096255
tags:
@@ -6258,6 +6304,49 @@ paths:
62586304
application/json:
62596305
schema:
62606306
$ref: '#/components/schemas/Status'
6307+
/namespaces/{namespace}/workflows/{workflowId}/unpause:
6308+
post:
6309+
tags:
6310+
- WorkflowService
6311+
description: |-
6312+
Note: This is an experimental API and the behavior may change in a future release.
6313+
UnpauseWorkflowExecution unpauses a previously paused workflow execution specified in the request.
6314+
Unpausing a workflow execution results in
6315+
- The workflow execution status changes to `RUNNING` and a new WORKFLOW_EXECUTION_UNPAUSED event is added to the history
6316+
- Workflow tasks and activity tasks are resumed.
6317+
operationId: UnpauseWorkflowExecution
6318+
parameters:
6319+
- name: namespace
6320+
in: path
6321+
description: Namespace of the workflow to unpause.
6322+
required: true
6323+
schema:
6324+
type: string
6325+
- name: workflowId
6326+
in: path
6327+
description: ID of the workflow execution to be paused. Required.
6328+
required: true
6329+
schema:
6330+
type: string
6331+
requestBody:
6332+
content:
6333+
application/json:
6334+
schema:
6335+
$ref: '#/components/schemas/UnpauseWorkflowExecutionRequest'
6336+
required: true
6337+
responses:
6338+
"200":
6339+
description: OK
6340+
content:
6341+
application/json:
6342+
schema:
6343+
$ref: '#/components/schemas/UnpauseWorkflowExecutionResponse'
6344+
default:
6345+
description: Default error response
6346+
content:
6347+
application/json:
6348+
schema:
6349+
$ref: '#/components/schemas/Status'
62616350
/namespaces/{namespace}/workflows/{workflow_execution.workflow_id}/cancel:
62626351
post:
62636352
tags:
@@ -8670,6 +8759,8 @@ components:
86708759
- EVENT_TYPE_WORKFLOW_EXECUTION_OPTIONS_UPDATED
86718760
- EVENT_TYPE_NEXUS_OPERATION_CANCEL_REQUEST_COMPLETED
86728761
- EVENT_TYPE_NEXUS_OPERATION_CANCEL_REQUEST_FAILED
8762+
- EVENT_TYPE_WORKFLOW_EXECUTION_PAUSED
8763+
- EVENT_TYPE_WORKFLOW_EXECUTION_UNPAUSED
86738764
type: string
86748765
format: enum
86758766
version:
@@ -8820,6 +8911,10 @@ components:
88208911
$ref: '#/components/schemas/NexusOperationCancelRequestCompletedEventAttributes'
88218912
nexusOperationCancelRequestFailedEventAttributes:
88228913
$ref: '#/components/schemas/NexusOperationCancelRequestFailedEventAttributes'
8914+
workflowExecutionPausedEventAttributes:
8915+
$ref: '#/components/schemas/WorkflowExecutionPausedEventAttributes'
8916+
workflowExecutionUnpausedEventAttributes:
8917+
$ref: '#/components/schemas/WorkflowExecutionUnpausedEventAttributes'
88238918
description: |-
88248919
History events are the method by which Temporal SDKs advance (or recreate) workflow state.
88258920
See the `EventType` enum for more info about what each event is for.
@@ -9664,6 +9759,32 @@ components:
96649759
reason:
96659760
type: string
96669761
description: Reason why rule was created. Populated from rule description.
9762+
PauseWorkflowExecutionRequest:
9763+
type: object
9764+
properties:
9765+
namespace:
9766+
type: string
9767+
description: Namespace of the workflow to pause.
9768+
workflowId:
9769+
type: string
9770+
description: ID of the workflow execution to be paused. Required.
9771+
runId:
9772+
type: string
9773+
description: Run ID of the workflow execution to be paused. Optional. If not provided, the current run of the workflow will be paused.
9774+
identity:
9775+
type: string
9776+
description: The identity of the client who initiated this request.
9777+
reason:
9778+
type: string
9779+
description: Reason to pause the workflow execution.
9780+
requestId:
9781+
type: string
9782+
description: A unique identifier for this pause request for idempotence. Typically UUIDv4.
9783+
description: Request to pause a workflow execution.
9784+
PauseWorkflowExecutionResponse:
9785+
type: object
9786+
properties: {}
9787+
description: Response to a successful PauseWorkflowExecution request.
96679788
Payload:
96689789
description: |-
96699790
Represents some binary (byte array) data (ex: activity input parameters or workflow result) with
@@ -10202,6 +10323,7 @@ components:
1020210323
- WORKFLOW_EXECUTION_STATUS_TERMINATED
1020310324
- WORKFLOW_EXECUTION_STATUS_CONTINUED_AS_NEW
1020410325
- WORKFLOW_EXECUTION_STATUS_TIMED_OUT
10326+
- WORKFLOW_EXECUTION_STATUS_PAUSED
1020510327
type: string
1020610328
format: enum
1020710329
QueryWorkflowRequest:
@@ -10576,6 +10698,8 @@ components:
1057610698
- EVENT_TYPE_WORKFLOW_EXECUTION_OPTIONS_UPDATED
1057710699
- EVENT_TYPE_NEXUS_OPERATION_CANCEL_REQUEST_COMPLETED
1057810700
- EVENT_TYPE_NEXUS_OPERATION_CANCEL_REQUEST_FAILED
10701+
- EVENT_TYPE_WORKFLOW_EXECUTION_PAUSED
10702+
- EVENT_TYPE_WORKFLOW_EXECUTION_UNPAUSED
1057910703
type: string
1058010704
description: The event type of the history event generated by the request.
1058110705
format: enum
@@ -11134,6 +11258,7 @@ components:
1113411258
- WORKFLOW_EXECUTION_STATUS_TERMINATED
1113511259
- WORKFLOW_EXECUTION_STATUS_CONTINUED_AS_NEW
1113611260
- WORKFLOW_EXECUTION_STATUS_TIMED_OUT
11261+
- WORKFLOW_EXECUTION_STATUS_PAUSED
1113711262
type: string
1113811263
description: |-
1113911264
If the action was start_workflow, this field will reflect an
@@ -12216,6 +12341,7 @@ components:
1221612341
- WORKFLOW_EXECUTION_STATUS_TERMINATED
1221712342
- WORKFLOW_EXECUTION_STATUS_CONTINUED_AS_NEW
1221812343
- WORKFLOW_EXECUTION_STATUS_TIMED_OUT
12344+
- WORKFLOW_EXECUTION_STATUS_PAUSED
1221912345
type: string
1222012346
description: |-
1222112347
Current execution status of the workflow. Typically remains WORKFLOW_EXECUTION_STATUS_RUNNING
@@ -12722,6 +12848,31 @@ components:
1272212848
UnpauseActivityResponse:
1272312849
type: object
1272412850
properties: {}
12851+
UnpauseWorkflowExecutionRequest:
12852+
type: object
12853+
properties:
12854+
namespace:
12855+
type: string
12856+
description: Namespace of the workflow to unpause.
12857+
workflowId:
12858+
type: string
12859+
description: ID of the workflow execution to be paused. Required.
12860+
runId:
12861+
type: string
12862+
description: Run ID of the workflow execution to be paused. Optional. If not provided, the current run of the workflow will be paused.
12863+
identity:
12864+
type: string
12865+
description: The identity of the client who initiated this request.
12866+
reason:
12867+
type: string
12868+
description: Reason to unpause the workflow execution.
12869+
requestId:
12870+
type: string
12871+
description: A unique identifier for this unpause request for idempotence. Typically UUIDv4.
12872+
UnpauseWorkflowExecutionResponse:
12873+
type: object
12874+
properties: {}
12875+
description: Response to a successful UnpauseWorkflowExecution request.
1272512876
UpdateActivityOptionsRequest:
1272612877
type: object
1272712878
properties:
@@ -13870,6 +14021,8 @@ components:
1387014021
- EVENT_TYPE_WORKFLOW_EXECUTION_OPTIONS_UPDATED
1387114022
- EVENT_TYPE_NEXUS_OPERATION_CANCEL_REQUEST_COMPLETED
1387214023
- EVENT_TYPE_NEXUS_OPERATION_CANCEL_REQUEST_FAILED
14024+
- EVENT_TYPE_WORKFLOW_EXECUTION_PAUSED
14025+
- EVENT_TYPE_WORKFLOW_EXECUTION_UNPAUSED
1387314026
type: string
1387414027
format: enum
1387514028
description: EventReference is a direct reference to a history event through the event ID.
@@ -13938,6 +14091,8 @@ components:
1393814091
- EVENT_TYPE_WORKFLOW_EXECUTION_OPTIONS_UPDATED
1393914092
- EVENT_TYPE_NEXUS_OPERATION_CANCEL_REQUEST_COMPLETED
1394014093
- EVENT_TYPE_NEXUS_OPERATION_CANCEL_REQUEST_FAILED
14094+
- EVENT_TYPE_WORKFLOW_EXECUTION_PAUSED
14095+
- EVENT_TYPE_WORKFLOW_EXECUTION_UNPAUSED
1394114096
type: string
1394214097
format: enum
1394314098
description: RequestIdReference is a indirect reference to a history event through the request ID.
@@ -14155,6 +14310,7 @@ components:
1415514310
- WORKFLOW_EXECUTION_STATUS_TERMINATED
1415614311
- WORKFLOW_EXECUTION_STATUS_CONTINUED_AS_NEW
1415714312
- WORKFLOW_EXECUTION_STATUS_TIMED_OUT
14313+
- WORKFLOW_EXECUTION_STATUS_PAUSED
1415814314
type: string
1415914315
format: enum
1416014316
historyLength:
@@ -14252,6 +14408,10 @@ components:
1425214408
allOf:
1425314409
- $ref: '#/components/schemas/Priority'
1425414410
description: Priority metadata
14411+
pauseInfo:
14412+
allOf:
14413+
- $ref: '#/components/schemas/WorkflowExecutionPauseInfo'
14414+
description: Information about the workflow execution pause operation.
1425514415
description: |-
1425614416
Hold basic information about a workflow execution.
1425714417
This structure is a part of visibility, and thus contain a limited subset of information.
@@ -14287,6 +14447,33 @@ components:
1428714447
identity:
1428814448
type: string
1428914449
description: Optional. The identity of the client who initiated the request that created this event.
14450+
WorkflowExecutionPauseInfo:
14451+
type: object
14452+
properties:
14453+
identity:
14454+
type: string
14455+
description: The identity of the client who paused the workflow execution.
14456+
pausedTime:
14457+
type: string
14458+
description: The time when the workflow execution was paused.
14459+
format: date-time
14460+
reason:
14461+
type: string
14462+
description: The reason for pausing the workflow execution.
14463+
description: WorkflowExecutionPauseInfo contains the information about a workflow execution pause.
14464+
WorkflowExecutionPausedEventAttributes:
14465+
type: object
14466+
properties:
14467+
identity:
14468+
type: string
14469+
description: The identity of the client who paused the workflow execution.
14470+
reason:
14471+
type: string
14472+
description: The reason for pausing the workflow execution.
14473+
requestId:
14474+
type: string
14475+
description: The request ID of the request that paused the workflow execution.
14476+
description: Attributes for an event marking that a workflow execution was paused.
1429014477
WorkflowExecutionSignaledEventAttributes:
1429114478
type: object
1429214479
properties:
@@ -14541,6 +14728,19 @@ components:
1454114728
newExecutionRunId:
1454214729
type: string
1454314730
description: If another run is started by cron or retry, this contains the new run id.
14731+
WorkflowExecutionUnpausedEventAttributes:
14732+
type: object
14733+
properties:
14734+
identity:
14735+
type: string
14736+
description: The identity of the client who unpaused the workflow execution.
14737+
reason:
14738+
type: string
14739+
description: The reason for unpausing the workflow execution.
14740+
requestId:
14741+
type: string
14742+
description: The request ID of the request that unpaused the workflow execution.
14743+
description: Attributes for an event marking that a workflow execution was unpaused.
1454414744
WorkflowExecutionUpdateAcceptedEventAttributes:
1454514745
type: object
1454614746
properties:
@@ -15046,7 +15246,9 @@ components:
1504615246
description: The failure details
1504715247
identity:
1504815248
type: string
15049-
description: "If a worker explicitly failed this task, this field contains the worker's identity. \n When the server generates the failure internally this field is set as 'history-service'."
15249+
description: |-
15250+
If a worker explicitly failed this task, this field contains the worker's identity.
15251+
When the server generates the failure internally this field is set as 'history-service'.
1505015252
baseRunId:
1505115253
type: string
1505215254
description: The original run id of the workflow. For reset workflow.

temporal/api/enums/v1/event_type.proto

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,4 +169,8 @@ enum EventType {
169169
EVENT_TYPE_NEXUS_OPERATION_CANCEL_REQUEST_COMPLETED = 56;
170170
// A cancellation request for a Nexus operation resulted in an error.
171171
EVENT_TYPE_NEXUS_OPERATION_CANCEL_REQUEST_FAILED = 57;
172+
// An event that indicates that the workflow execution has been paused.
173+
EVENT_TYPE_WORKFLOW_EXECUTION_PAUSED = 58;
174+
// An event that indicates that the previously paused workflow execution has been unpaused.
175+
EVENT_TYPE_WORKFLOW_EXECUTION_UNPAUSED = 59;
172176
}

temporal/api/enums/v1/failed_cause.proto

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,8 @@ enum ResourceExhaustedCause {
123123
RESOURCE_EXHAUSTED_CAUSE_CIRCUIT_BREAKER_OPEN = 8;
124124
// Namespace exceeds operations rate limit.
125125
RESOURCE_EXHAUSTED_CAUSE_OPS_LIMIT = 9;
126+
// Limits related to Worker Deployments are reached.
127+
RESOURCE_EXHAUSTED_CAUSE_WORKER_DEPLOYMENT_LIMITS = 10;
126128
}
127129

128130
enum ResourceExhaustedScope {

temporal/api/enums/v1/workflow.proto

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ enum WorkflowExecutionStatus {
7777
WORKFLOW_EXECUTION_STATUS_TERMINATED = 5;
7878
WORKFLOW_EXECUTION_STATUS_CONTINUED_AS_NEW = 6;
7979
WORKFLOW_EXECUTION_STATUS_TIMED_OUT = 7;
80+
WORKFLOW_EXECUTION_STATUS_PAUSED = 8;
8081
}
8182

8283
enum PendingActivityState {

temporal/api/history/v1/message.proto

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ message WorkflowTaskFailedEventAttributes {
350350
temporal.api.enums.v1.WorkflowTaskFailedCause cause = 3;
351351
// The failure details
352352
temporal.api.failure.v1.Failure failure = 4;
353-
// If a worker explicitly failed this task, this field contains the worker's identity.
353+
// If a worker explicitly failed this task, this field contains the worker's identity.
354354
// When the server generates the failure internally this field is set as 'history-service'.
355355
string identity = 5;
356356
// The original run id of the workflow. For reset workflow.
@@ -915,6 +915,26 @@ message WorkflowExecutionUpdateAdmittedEventAttributes {
915915
temporal.api.enums.v1.UpdateAdmittedEventOrigin origin = 2;
916916
}
917917

918+
// Attributes for an event marking that a workflow execution was paused.
919+
message WorkflowExecutionPausedEventAttributes {
920+
// The identity of the client who paused the workflow execution.
921+
string identity = 1;
922+
// The reason for pausing the workflow execution.
923+
string reason = 2;
924+
// The request ID of the request that paused the workflow execution.
925+
string request_id = 3;
926+
}
927+
928+
// Attributes for an event marking that a workflow execution was unpaused.
929+
message WorkflowExecutionUnpausedEventAttributes {
930+
// The identity of the client who unpaused the workflow execution.
931+
string identity = 1;
932+
// The reason for unpausing the workflow execution.
933+
string reason = 2;
934+
// The request ID of the request that unpaused the workflow execution.
935+
string request_id = 3;
936+
}
937+
918938
// Event marking that an operation was scheduled by a workflow via the ScheduleNexusOperation command.
919939
message NexusOperationScheduledEventAttributes {
920940
// Endpoint name, must exist in the endpoint registry.
@@ -1133,6 +1153,8 @@ message HistoryEvent {
11331153
WorkflowExecutionOptionsUpdatedEventAttributes workflow_execution_options_updated_event_attributes = 60;
11341154
NexusOperationCancelRequestCompletedEventAttributes nexus_operation_cancel_request_completed_event_attributes = 61;
11351155
NexusOperationCancelRequestFailedEventAttributes nexus_operation_cancel_request_failed_event_attributes = 62;
1156+
WorkflowExecutionPausedEventAttributes workflow_execution_paused_event_attributes = 63;
1157+
WorkflowExecutionUnpausedEventAttributes workflow_execution_unpaused_event_attributes = 64;
11361158
}
11371159
}
11381160

0 commit comments

Comments
 (0)