Skip to content

Commit 9a4d896

Browse files
committed
first draft
1 parent 852ee3b commit 9a4d896

5 files changed

Lines changed: 126 additions & 1 deletion

File tree

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ $(STAMPDIR):
114114

115115
$(STAMPDIR)/buf-mod-prune: $(STAMPDIR) buf.yaml
116116
printf $(COLOR) "Pruning buf module"
117-
buf mod prune
117+
# buf mod prune
118118
touch $@
119119

120120
buf-lint: $(STAMPDIR)/buf-mod-prune

openapi/openapiv2.json

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11084,6 +11084,18 @@
1108411084
},
1108511085
"description": "UpdateWorkflowOptions represents updating workflow execution options after a workflow reset.\nKeep the parameters in sync with temporal.api.workflowservice.v1.UpdateWorkflowExecutionOptionsRequest."
1108611086
},
11087+
"StartBatchOperationRequestActivityExecution": {
11088+
"type": "object",
11089+
"properties": {
11090+
"activityId": {
11091+
"type": "string"
11092+
},
11093+
"runId": {
11094+
"type": "string"
11095+
}
11096+
},
11097+
"title": "TODO(seankane): support listing activity executions"
11098+
},
1108711099
"UpdateTaskQueueConfigRequestRateLimitUpdate": {
1108811100
"type": "object",
1108911101
"properties": {
@@ -12332,6 +12344,13 @@
1233212344
},
1233312345
"title": "Executions to apply the batch operation\nThis field and `visibility_query` are mutually exclusive"
1233412346
},
12347+
"activityExecutions": {
12348+
"type": "array",
12349+
"items": {
12350+
"type": "object",
12351+
"$ref": "#/definitions/StartBatchOperationRequestActivityExecution"
12352+
}
12353+
},
1233512354
"maxOperationsPerSecond": {
1233612355
"type": "number",
1233712356
"format": "float",
@@ -12363,6 +12382,15 @@
1236312382
},
1236412383
"updateActivityOptionsOperation": {
1236512384
"$ref": "#/definitions/v1BatchOperationUpdateActivityOptions"
12385+
},
12386+
"cancelActivitiesOperation": {
12387+
"$ref": "#/definitions/v1BatchOperationCancelActivities"
12388+
},
12389+
"terminateActivitiesOperation": {
12390+
"$ref": "#/definitions/v1BatchOperationTerminateActivities"
12391+
},
12392+
"deleteActivitiesOperation": {
12393+
"$ref": "#/definitions/v1BatchOperationDeleteActivities"
1236612394
}
1236712395
}
1236812396
},
@@ -13969,6 +13997,16 @@
1396913997
}
1397013998
}
1397113999
},
14000+
"v1BatchOperationCancelActivities": {
14001+
"type": "object",
14002+
"properties": {
14003+
"identity": {
14004+
"type": "string",
14005+
"title": "The identity of the worker/client"
14006+
}
14007+
},
14008+
"description": "BatchOperationCancellation sends cancel requests to a batch of activities.\nKeep the parameter in sync with temporal.api.workflowservice.v1.RequestCancelActivityExecutionRequest."
14009+
},
1397214010
"v1BatchOperationCancellation": {
1397314011
"type": "object",
1397414012
"properties": {
@@ -13979,6 +14017,10 @@
1397914017
},
1398014018
"description": "BatchOperationCancellation sends cancel requests to batch workflows.\nKeep the parameter in sync with temporal.api.workflowservice.v1.RequestCancelWorkflowExecutionRequest.\nIgnore first_execution_run_id because this is used for single workflow operation."
1398114019
},
14020+
"v1BatchOperationDeleteActivities": {
14021+
"type": "object",
14022+
"description": "BatchOperationDeleteActivities sends deletion requests to a batch of activities.\nKeep the parameter in sync with temporal.api.workflowservice.v1.DeleteActivityExecutionRequest."
14023+
},
1398214024
"v1BatchOperationDeletion": {
1398314025
"type": "object",
1398414026
"properties": {
@@ -14110,6 +14152,16 @@
1411014152
],
1411114153
"default": "BATCH_OPERATION_STATE_UNSPECIFIED"
1411214154
},
14155+
"v1BatchOperationTerminateActivities": {
14156+
"type": "object",
14157+
"properties": {
14158+
"identity": {
14159+
"type": "string",
14160+
"title": "The identity of the worker/client"
14161+
}
14162+
},
14163+
"description": "BatchOperationTerminateActivities sends terminate requests to a batch of activities.\nKeep the parameter in sync with temporal.api.workflowservice.v1.TerminateActivityExecutionRequest."
14164+
},
1411314165
"v1BatchOperationTermination": {
1411414166
"type": "object",
1411514167
"properties": {

openapi/openapiv3.yaml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10328,6 +10328,15 @@ components:
1032810328
createTime:
1032910329
type: string
1033010330
format: date-time
10331+
BatchOperationCancelActivities:
10332+
type: object
10333+
properties:
10334+
identity:
10335+
type: string
10336+
description: The identity of the worker/client
10337+
description: |-
10338+
BatchOperationCancellation sends cancel requests to a batch of activities.
10339+
Keep the parameter in sync with temporal.api.workflowservice.v1.RequestCancelActivityExecutionRequest.
1033110340
BatchOperationCancellation:
1033210341
type: object
1033310342
properties:
@@ -10338,6 +10347,12 @@ components:
1033810347
BatchOperationCancellation sends cancel requests to batch workflows.
1033910348
Keep the parameter in sync with temporal.api.workflowservice.v1.RequestCancelWorkflowExecutionRequest.
1034010349
Ignore first_execution_run_id because this is used for single workflow operation.
10350+
BatchOperationDeleteActivities:
10351+
type: object
10352+
properties: {}
10353+
description: |-
10354+
BatchOperationDeleteActivities sends deletion requests to a batch of activities.
10355+
Keep the parameter in sync with temporal.api.workflowservice.v1.DeleteActivityExecutionRequest.
1034110356
BatchOperationDeletion:
1034210357
type: object
1034310358
properties:
@@ -10464,6 +10479,15 @@ components:
1046410479
description: |-
1046510480
BatchOperationSignal sends signals to batch workflows.
1046610481
Keep the parameter in sync with temporal.api.workflowservice.v1.SignalWorkflowExecutionRequest.
10482+
BatchOperationTerminateActivities:
10483+
type: object
10484+
properties:
10485+
identity:
10486+
type: string
10487+
description: The identity of the worker/client
10488+
description: |-
10489+
BatchOperationTerminateActivities sends terminate requests to a batch of activities.
10490+
Keep the parameter in sync with temporal.api.workflowservice.v1.TerminateActivityExecutionRequest.
1046710491
BatchOperationTermination:
1046810492
type: object
1046910493
properties:
@@ -16598,6 +16622,10 @@ components:
1659816622
description: |-
1659916623
Executions to apply the batch operation
1660016624
This field and `visibility_query` are mutually exclusive
16625+
activityExecutions:
16626+
type: array
16627+
items:
16628+
$ref: '#/components/schemas/StartBatchOperationRequest_ActivityExecution'
1660116629
maxOperationsPerSecond:
1660216630
type: number
1660316631
description: |-
@@ -16626,6 +16654,20 @@ components:
1662616654
$ref: '#/components/schemas/BatchOperationResetActivities'
1662716655
updateActivityOptionsOperation:
1662816656
$ref: '#/components/schemas/BatchOperationUpdateActivityOptions'
16657+
cancelActivitiesOperation:
16658+
$ref: '#/components/schemas/BatchOperationCancelActivities'
16659+
terminateActivitiesOperation:
16660+
$ref: '#/components/schemas/BatchOperationTerminateActivities'
16661+
deleteActivitiesOperation:
16662+
$ref: '#/components/schemas/BatchOperationDeleteActivities'
16663+
StartBatchOperationRequest_ActivityExecution:
16664+
type: object
16665+
properties:
16666+
activityId:
16667+
type: string
16668+
runId:
16669+
type: string
16670+
description: 'TODO(seankane): support listing activity executions'
1662916671
StartBatchOperationResponse:
1663016672
type: object
1663116673
properties: {}

temporal/api/batch/v1/message.proto

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,13 @@ message BatchOperationTermination {
4040
string identity = 2;
4141
}
4242

43+
// BatchOperationTerminateActivities sends terminate requests to a batch of activities.
44+
// Keep the parameter in sync with temporal.api.workflowservice.v1.TerminateActivityExecutionRequest.
45+
message BatchOperationTerminateActivities {
46+
// The identity of the worker/client
47+
string identity = 1;
48+
}
49+
4350
// BatchOperationSignal sends signals to batch workflows.
4451
// Keep the parameter in sync with temporal.api.workflowservice.v1.SignalWorkflowExecutionRequest.
4552
message BatchOperationSignal {
@@ -62,13 +69,25 @@ message BatchOperationCancellation {
6269
string identity = 1;
6370
}
6471

72+
// BatchOperationCancellation sends cancel requests to a batch of activities.
73+
// Keep the parameter in sync with temporal.api.workflowservice.v1.RequestCancelActivityExecutionRequest.
74+
message BatchOperationCancelActivities {
75+
// The identity of the worker/client
76+
string identity = 1;
77+
}
78+
6579
// BatchOperationDeletion sends deletion requests to batch workflows.
6680
// Keep the parameter in sync with temporal.api.workflowservice.v1.DeleteWorkflowExecutionRequest.
6781
message BatchOperationDeletion {
6882
// The identity of the worker/client
6983
string identity = 1;
7084
}
7185

86+
// BatchOperationDeleteActivities sends deletion requests to a batch of activities.
87+
// Keep the parameter in sync with temporal.api.workflowservice.v1.DeleteActivityExecutionRequest.
88+
message BatchOperationDeleteActivities {
89+
}
90+
7291
// BatchOperationReset sends reset requests to batch workflows.
7392
// Keep the parameter in sync with temporal.api.workflowservice.v1.ResetWorkflowExecutionRequest.
7493
message BatchOperationReset {

temporal/api/workflowservice/v1/request_response.proto

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1831,6 +1831,15 @@ message StartBatchOperationRequest {
18311831
// Executions to apply the batch operation
18321832
// This field and `visibility_query` are mutually exclusive
18331833
repeated temporal.api.common.v1.WorkflowExecution executions = 5;
1834+
1835+
// TODO(seankane): support listing activity executions
1836+
message ActivityExecution {
1837+
string activity_id = 1;
1838+
string run_id = 2;
1839+
}
1840+
1841+
repeated ActivityExecution activity_executions = 22;
1842+
18341843
// Limit for the number of operations processed per second within this batch.
18351844
// Its purpose is to reduce the stress on the system caused by batch operations, which helps to prevent system
18361845
// overload and minimize potential delays in executing ongoing tasks for user workers.
@@ -1849,6 +1858,9 @@ message StartBatchOperationRequest {
18491858
temporal.api.batch.v1.BatchOperationUnpauseActivities unpause_activities_operation = 16;
18501859
temporal.api.batch.v1.BatchOperationResetActivities reset_activities_operation = 17;
18511860
temporal.api.batch.v1.BatchOperationUpdateActivityOptions update_activity_options_operation = 18;
1861+
temporal.api.batch.v1.BatchOperationCancelActivities cancel_activities_operation = 19;
1862+
temporal.api.batch.v1.BatchOperationTerminateActivities terminate_activities_operation = 20;
1863+
temporal.api.batch.v1.BatchOperationDeleteActivities delete_activities_operation = 21;
18521864
}
18531865
}
18541866

0 commit comments

Comments
 (0)