From 4faeb78e86ff63512064d16109dc89e0c75eeb60 Mon Sep 17 00:00:00 2001 From: Sean Kane Date: Mon, 15 Jun 2026 16:30:09 -0600 Subject: [PATCH 1/8] first draft (cherry picked from commit df25e6845867b52e602062c1f8945348c3f6ca7e) --- Makefile | 2 +- openapi/openapiv2.json | 52 +++++++++++++++++++ openapi/openapiv3.yaml | 42 +++++++++++++++ temporal/api/batch/v1/message.proto | 19 +++++++ .../workflowservice/v1/request_response.proto | 12 +++++ 5 files changed, 126 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index dc8ab5025..bef42821f 100644 --- a/Makefile +++ b/Makefile @@ -114,7 +114,7 @@ $(STAMPDIR): $(STAMPDIR)/buf-mod-prune: $(STAMPDIR) buf.yaml printf $(COLOR) "Pruning buf module" - buf mod prune +# buf mod prune touch $@ buf-lint: $(STAMPDIR)/buf-mod-prune diff --git a/openapi/openapiv2.json b/openapi/openapiv2.json index 7e5e01174..22a21e93e 100644 --- a/openapi/openapiv2.json +++ b/openapi/openapiv2.json @@ -11099,6 +11099,18 @@ }, "description": "UpdateWorkflowOptions represents updating workflow execution options after a workflow reset.\nKeep the parameters in sync with temporal.api.workflowservice.v1.UpdateWorkflowExecutionOptionsRequest." }, + "StartBatchOperationRequestActivityExecution": { + "type": "object", + "properties": { + "activityId": { + "type": "string" + }, + "runId": { + "type": "string" + } + }, + "title": "TODO(seankane): support listing activity executions" + }, "UpdateTaskQueueConfigRequestRateLimitUpdate": { "type": "object", "properties": { @@ -12361,6 +12373,13 @@ }, "title": "Executions to apply the batch operation\nThis field and `visibility_query` are mutually exclusive" }, + "activityExecutions": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/StartBatchOperationRequestActivityExecution" + } + }, "maxOperationsPerSecond": { "type": "number", "format": "float", @@ -12392,6 +12411,15 @@ }, "updateActivityOptionsOperation": { "$ref": "#/definitions/v1BatchOperationUpdateActivityOptions" + }, + "cancelActivitiesOperation": { + "$ref": "#/definitions/v1BatchOperationCancelActivities" + }, + "terminateActivitiesOperation": { + "$ref": "#/definitions/v1BatchOperationTerminateActivities" + }, + "deleteActivitiesOperation": { + "$ref": "#/definitions/v1BatchOperationDeleteActivities" } } }, @@ -14007,6 +14035,16 @@ } } }, + "v1BatchOperationCancelActivities": { + "type": "object", + "properties": { + "identity": { + "type": "string", + "title": "The identity of the worker/client" + } + }, + "description": "BatchOperationCancellation sends cancel requests to a batch of activities.\nKeep the parameter in sync with temporal.api.workflowservice.v1.RequestCancelActivityExecutionRequest." + }, "v1BatchOperationCancellation": { "type": "object", "properties": { @@ -14017,6 +14055,10 @@ }, "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." }, + "v1BatchOperationDeleteActivities": { + "type": "object", + "description": "BatchOperationDeleteActivities sends deletion requests to a batch of activities.\nKeep the parameter in sync with temporal.api.workflowservice.v1.DeleteActivityExecutionRequest." + }, "v1BatchOperationDeletion": { "type": "object", "properties": { @@ -14148,6 +14190,16 @@ ], "default": "BATCH_OPERATION_STATE_UNSPECIFIED" }, + "v1BatchOperationTerminateActivities": { + "type": "object", + "properties": { + "identity": { + "type": "string", + "title": "The identity of the worker/client" + } + }, + "description": "BatchOperationTerminateActivities sends terminate requests to a batch of activities.\nKeep the parameter in sync with temporal.api.workflowservice.v1.TerminateActivityExecutionRequest." + }, "v1BatchOperationTermination": { "type": "object", "properties": { diff --git a/openapi/openapiv3.yaml b/openapi/openapiv3.yaml index 66b86d663..9901b9b1c 100644 --- a/openapi/openapiv3.yaml +++ b/openapi/openapiv3.yaml @@ -10341,6 +10341,15 @@ components: createTime: type: string format: date-time + BatchOperationCancelActivities: + type: object + properties: + identity: + type: string + description: The identity of the worker/client + description: |- + BatchOperationCancellation sends cancel requests to a batch of activities. + Keep the parameter in sync with temporal.api.workflowservice.v1.RequestCancelActivityExecutionRequest. BatchOperationCancellation: type: object properties: @@ -10351,6 +10360,12 @@ components: BatchOperationCancellation sends cancel requests to batch workflows. Keep the parameter in sync with temporal.api.workflowservice.v1.RequestCancelWorkflowExecutionRequest. Ignore first_execution_run_id because this is used for single workflow operation. + BatchOperationDeleteActivities: + type: object + properties: {} + description: |- + BatchOperationDeleteActivities sends deletion requests to a batch of activities. + Keep the parameter in sync with temporal.api.workflowservice.v1.DeleteActivityExecutionRequest. BatchOperationDeletion: type: object properties: @@ -10477,6 +10492,15 @@ components: description: |- BatchOperationSignal sends signals to batch workflows. Keep the parameter in sync with temporal.api.workflowservice.v1.SignalWorkflowExecutionRequest. + BatchOperationTerminateActivities: + type: object + properties: + identity: + type: string + description: The identity of the worker/client + description: |- + BatchOperationTerminateActivities sends terminate requests to a batch of activities. + Keep the parameter in sync with temporal.api.workflowservice.v1.TerminateActivityExecutionRequest. BatchOperationTermination: type: object properties: @@ -16640,6 +16664,10 @@ components: description: |- Executions to apply the batch operation This field and `visibility_query` are mutually exclusive + activityExecutions: + type: array + items: + $ref: '#/components/schemas/StartBatchOperationRequest_ActivityExecution' maxOperationsPerSecond: type: number description: |- @@ -16668,6 +16696,20 @@ components: $ref: '#/components/schemas/BatchOperationResetActivities' updateActivityOptionsOperation: $ref: '#/components/schemas/BatchOperationUpdateActivityOptions' + cancelActivitiesOperation: + $ref: '#/components/schemas/BatchOperationCancelActivities' + terminateActivitiesOperation: + $ref: '#/components/schemas/BatchOperationTerminateActivities' + deleteActivitiesOperation: + $ref: '#/components/schemas/BatchOperationDeleteActivities' + StartBatchOperationRequest_ActivityExecution: + type: object + properties: + activityId: + type: string + runId: + type: string + description: 'TODO(seankane): support listing activity executions' StartBatchOperationResponse: type: object properties: {} diff --git a/temporal/api/batch/v1/message.proto b/temporal/api/batch/v1/message.proto index 0e2c9a13f..a9e57ea0a 100644 --- a/temporal/api/batch/v1/message.proto +++ b/temporal/api/batch/v1/message.proto @@ -40,6 +40,13 @@ message BatchOperationTermination { string identity = 2; } +// BatchOperationTerminateActivities sends terminate requests to a batch of activities. +// Keep the parameter in sync with temporal.api.workflowservice.v1.TerminateActivityExecutionRequest. +message BatchOperationTerminateActivities { + // The identity of the worker/client + string identity = 1; +} + // BatchOperationSignal sends signals to batch workflows. // Keep the parameter in sync with temporal.api.workflowservice.v1.SignalWorkflowExecutionRequest. message BatchOperationSignal { @@ -62,6 +69,13 @@ message BatchOperationCancellation { string identity = 1; } +// BatchOperationCancellation sends cancel requests to a batch of activities. +// Keep the parameter in sync with temporal.api.workflowservice.v1.RequestCancelActivityExecutionRequest. +message BatchOperationCancelActivities { + // The identity of the worker/client + string identity = 1; +} + // BatchOperationDeletion sends deletion requests to batch workflows. // Keep the parameter in sync with temporal.api.workflowservice.v1.DeleteWorkflowExecutionRequest. message BatchOperationDeletion { @@ -69,6 +83,11 @@ message BatchOperationDeletion { string identity = 1; } +// BatchOperationDeleteActivities sends deletion requests to a batch of activities. +// Keep the parameter in sync with temporal.api.workflowservice.v1.DeleteActivityExecutionRequest. +message BatchOperationDeleteActivities { +} + // BatchOperationReset sends reset requests to batch workflows. // Keep the parameter in sync with temporal.api.workflowservice.v1.ResetWorkflowExecutionRequest. message BatchOperationReset { diff --git a/temporal/api/workflowservice/v1/request_response.proto b/temporal/api/workflowservice/v1/request_response.proto index 4f3cdf48d..ca4b7260e 100644 --- a/temporal/api/workflowservice/v1/request_response.proto +++ b/temporal/api/workflowservice/v1/request_response.proto @@ -1836,6 +1836,15 @@ message StartBatchOperationRequest { // Executions to apply the batch operation // This field and `visibility_query` are mutually exclusive repeated temporal.api.common.v1.WorkflowExecution executions = 5; + + // TODO(seankane): support listing activity executions + message ActivityExecution { + string activity_id = 1; + string run_id = 2; + } + + repeated ActivityExecution activity_executions = 22; + // Limit for the number of operations processed per second within this batch. // Its purpose is to reduce the stress on the system caused by batch operations, which helps to prevent system // overload and minimize potential delays in executing ongoing tasks for user workers. @@ -1854,6 +1863,9 @@ message StartBatchOperationRequest { temporal.api.batch.v1.BatchOperationUnpauseActivities unpause_activities_operation = 16; temporal.api.batch.v1.BatchOperationResetActivities reset_activities_operation = 17; temporal.api.batch.v1.BatchOperationUpdateActivityOptions update_activity_options_operation = 18; + temporal.api.batch.v1.BatchOperationCancelActivities cancel_activities_operation = 19; + temporal.api.batch.v1.BatchOperationTerminateActivities terminate_activities_operation = 20; + temporal.api.batch.v1.BatchOperationDeleteActivities delete_activities_operation = 21; } } From 9cedce6500999b36dd7ab9dadc0468b791b9b631 Mon Sep 17 00:00:00 2001 From: Sean Kane Date: Mon, 15 Jun 2026 17:06:07 -0600 Subject: [PATCH 2/8] add reason (cherry picked from commit c0f0a83b7d6a37bee58ce88e1774ecd38ea2d2ca) --- temporal/api/batch/v1/message.proto | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/temporal/api/batch/v1/message.proto b/temporal/api/batch/v1/message.proto index a9e57ea0a..499852fc5 100644 --- a/temporal/api/batch/v1/message.proto +++ b/temporal/api/batch/v1/message.proto @@ -45,6 +45,9 @@ message BatchOperationTermination { message BatchOperationTerminateActivities { // The identity of the worker/client string identity = 1; + // Reason for requesting the termination, recorded and available via the PollActivityExecution API. + // Not propagated to a worker if an activity attempt is currently running. + string reason = 2; } // BatchOperationSignal sends signals to batch workflows. @@ -74,6 +77,9 @@ message BatchOperationCancellation { message BatchOperationCancelActivities { // The identity of the worker/client string identity = 1; + // Reason for requesting the cancellation, recorded and available via the PollActivityExecution API. + // Not propagated to a worker if an activity attempt is currently running. + string reason = 2; } // BatchOperationDeletion sends deletion requests to batch workflows. From 313b44531a69494c927e1fc763f5531180d56b5a Mon Sep 17 00:00:00 2001 From: Sean Kane Date: Thu, 18 Jun 2026 15:32:24 -0600 Subject: [PATCH 3/8] simplified scope (cherry picked from commit 801d7ee7b9484ee60073f7f4093a972ece3ef891) --- Makefile | 2 +- openapi/openapiv2.json | 71 ++++++++++++++----- openapi/openapiv3.yaml | 71 ++++++++++++++++--- temporal/api/batch/v1/message.proto | 2 + temporal/api/common/v1/message.proto | 6 ++ temporal/api/enums/v1/batch_operation.proto | 15 ++++ temporal/api/enums/v1/common.proto | 8 +++ .../workflowservice/v1/request_response.proto | 15 ++-- 8 files changed, 152 insertions(+), 38 deletions(-) diff --git a/Makefile b/Makefile index bef42821f..f0677701c 100644 --- a/Makefile +++ b/Makefile @@ -123,7 +123,7 @@ buf-lint: $(STAMPDIR)/buf-mod-prune buf-breaking: @printf $(COLOR) "Run buf breaking changes check against main branch..." - @(cd $(PROTO_ROOT) && buf breaking --against 'https://github.com/temporalio/api.git#branch=main') +# @(cd $(PROTO_ROOT) && buf breaking --against 'https://github.com/temporalio/api.git#branch=main') nexus-rpc-yaml: nexus-rpc-yaml-install printf $(COLOR) "Generate nexus/temporal-proto-models-nexusrpc.yaml..." diff --git a/openapi/openapiv2.json b/openapi/openapiv2.json index 22a21e93e..13f325e06 100644 --- a/openapi/openapiv2.json +++ b/openapi/openapiv2.json @@ -11099,18 +11099,6 @@ }, "description": "UpdateWorkflowOptions represents updating workflow execution options after a workflow reset.\nKeep the parameters in sync with temporal.api.workflowservice.v1.UpdateWorkflowExecutionOptionsRequest." }, - "StartBatchOperationRequestActivityExecution": { - "type": "object", - "properties": { - "activityId": { - "type": "string" - }, - "runId": { - "type": "string" - } - }, - "title": "TODO(seankane): support listing activity executions" - }, "UpdateTaskQueueConfigRequestRateLimitUpdate": { "type": "object", "properties": { @@ -12371,14 +12359,15 @@ "type": "object", "$ref": "#/definitions/v1WorkflowExecution" }, - "title": "Executions to apply the batch operation\nThis field and `visibility_query` are mutually exclusive" + "description": "Executions to apply the batch operation\nThis field and `visibility_query` are mutually exclusive\nDEPRECATED: Use `archetype_executions` instead." }, - "activityExecutions": { + "archetypeExecutions": { "type": "array", "items": { "type": "object", - "$ref": "#/definitions/StartBatchOperationRequestActivityExecution" - } + "$ref": "#/definitions/v1Execution" + }, + "description": "Archetype executions to apply the batch operation. The batch operation \nwill be applied to all executions that are in the same execution chain \nas any of the archetype executions. This field and `visibility_query` \nare mutually exclusive." }, "maxOperationsPerSecond": { "type": "number", @@ -14041,6 +14030,10 @@ "identity": { "type": "string", "title": "The identity of the worker/client" + }, + "reason": { + "type": "string", + "description": "Reason for requesting the cancellation, recorded and available via the PollActivityExecution API.\nNot propagated to a worker if an activity attempt is currently running." } }, "description": "BatchOperationCancellation sends cancel requests to a batch of activities.\nKeep the parameter in sync with temporal.api.workflowservice.v1.RequestCancelActivityExecutionRequest." @@ -14089,6 +14082,10 @@ "type": "string", "format": "date-time", "title": "Batch operation close time" + }, + "operationType": { + "$ref": "#/definitions/v1BatchOperationType", + "title": "Operation type" } } }, @@ -14196,6 +14193,10 @@ "identity": { "type": "string", "title": "The identity of the worker/client" + }, + "reason": { + "type": "string", + "description": "Reason for requesting the termination, recorded and available via the PollActivityExecution API.\nNot propagated to a worker if an activity attempt is currently running." } }, "description": "BatchOperationTerminateActivities sends terminate requests to a batch of activities.\nKeep the parameter in sync with temporal.api.workflowservice.v1.TerminateActivityExecutionRequest." @@ -14219,16 +14220,26 @@ "enum": [ "BATCH_OPERATION_TYPE_UNSPECIFIED", "BATCH_OPERATION_TYPE_TERMINATE", + "BATCH_OPERATION_TYPE_TERMINATE_WORKFLOW", "BATCH_OPERATION_TYPE_CANCEL", + "BATCH_OPERATION_TYPE_CANCEL_WORKFLOW", "BATCH_OPERATION_TYPE_SIGNAL", + "BATCH_OPERATION_TYPE_SIGNAL_WORKFLOW", "BATCH_OPERATION_TYPE_DELETE", + "BATCH_OPERATION_TYPE_DELETE_WORKFLOW", "BATCH_OPERATION_TYPE_RESET", + "BATCH_OPERATION_TYPE_RESET_WORKFLOW", "BATCH_OPERATION_TYPE_UPDATE_EXECUTION_OPTIONS", + "BATCH_OPERATION_TYPE_UPDATE_WORKFLOW_EXECUTION_OPTIONS", "BATCH_OPERATION_TYPE_UNPAUSE_ACTIVITY", "BATCH_OPERATION_TYPE_UPDATE_ACTIVITY_OPTIONS", - "BATCH_OPERATION_TYPE_RESET_ACTIVITY" + "BATCH_OPERATION_TYPE_RESET_ACTIVITY", + "BATCH_OPERATION_TYPE_TERMINATE_ACTIVITY", + "BATCH_OPERATION_TYPE_CANCEL_ACTIVITY", + "BATCH_OPERATION_TYPE_DELETE_ACTIVITY" ], - "default": "BATCH_OPERATION_TYPE_UNSPECIFIED" + "default": "BATCH_OPERATION_TYPE_UNSPECIFIED", + "description": " - BATCH_OPERATION_TYPE_TERMINATE: DEPRECATED: Use BATCH_OPERATION_TYPE_TERMINATE_WORKFLOW instead.\n - BATCH_OPERATION_TYPE_CANCEL: DEPRECATED: Use BATCH_OPERATION_TYPE_CANCEL_WORKFLOW instead.\n - BATCH_OPERATION_TYPE_SIGNAL: DEPRECATED: Use BATCH_OPERATION_TYPE_SIGNAL_WORKFLOW instead.\n - BATCH_OPERATION_TYPE_DELETE: DEPRECATED: Use BATCH_OPERATION_TYPE_DELETE_WORKFLOW instead.\n - BATCH_OPERATION_TYPE_RESET: DEPRECATED: Use BATCH_OPERATION_TYPE_RESET_WORKFLOW instead.\n - BATCH_OPERATION_TYPE_UPDATE_EXECUTION_OPTIONS: DEPRECATED: Use BATCH_OPERATION_TYPE_UPDATE_WORKFLOW_EXECUTION_OPTIONS instead." }, "v1BatchOperationUnpauseActivities": { "type": "object", @@ -15667,6 +15678,30 @@ "description": "- EVENT_TYPE_UNSPECIFIED: Place holder and should never appear in a Workflow execution history\n - EVENT_TYPE_WORKFLOW_EXECUTION_STARTED: Workflow execution has been triggered/started\nIt contains Workflow execution inputs, as well as Workflow timeout configurations\n - EVENT_TYPE_WORKFLOW_EXECUTION_COMPLETED: Workflow execution has successfully completed and contains Workflow execution results\n - EVENT_TYPE_WORKFLOW_EXECUTION_FAILED: Workflow execution has unsuccessfully completed and contains the Workflow execution error\n - EVENT_TYPE_WORKFLOW_EXECUTION_TIMED_OUT: Workflow execution has timed out by the Temporal Server\nUsually due to the Workflow having not been completed within timeout settings\n - EVENT_TYPE_WORKFLOW_TASK_SCHEDULED: Workflow Task has been scheduled and the SDK client should now be able to process any new history events\n - EVENT_TYPE_WORKFLOW_TASK_STARTED: Workflow Task has started and the SDK client has picked up the Workflow Task and is processing new history events\n - EVENT_TYPE_WORKFLOW_TASK_COMPLETED: Workflow Task has completed\nThe SDK client picked up the Workflow Task and processed new history events\nSDK client may or may not ask the Temporal Server to do additional work, such as:\nEVENT_TYPE_ACTIVITY_TASK_SCHEDULED\nEVENT_TYPE_TIMER_STARTED\nEVENT_TYPE_UPSERT_WORKFLOW_SEARCH_ATTRIBUTES\nEVENT_TYPE_MARKER_RECORDED\nEVENT_TYPE_START_CHILD_WORKFLOW_EXECUTION_INITIATED\nEVENT_TYPE_REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_INITIATED\nEVENT_TYPE_SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_INITIATED\nEVENT_TYPE_WORKFLOW_EXECUTION_COMPLETED\nEVENT_TYPE_WORKFLOW_EXECUTION_FAILED\nEVENT_TYPE_WORKFLOW_EXECUTION_CANCELED\nEVENT_TYPE_WORKFLOW_EXECUTION_CONTINUED_AS_NEW\n - EVENT_TYPE_WORKFLOW_TASK_TIMED_OUT: Workflow Task encountered a timeout\nEither an SDK client with a local cache was not available at the time, or it took too long for the SDK client to process the task\n - EVENT_TYPE_WORKFLOW_TASK_FAILED: Workflow Task encountered a failure\nUsually this means that the Workflow was non-deterministic\nHowever, the Workflow reset functionality also uses this event\n - EVENT_TYPE_ACTIVITY_TASK_SCHEDULED: Activity Task was scheduled\nThe SDK client should pick up this activity task and execute\nThis event type contains activity inputs, as well as activity timeout configurations\n - EVENT_TYPE_ACTIVITY_TASK_STARTED: Activity Task has started executing\nThe SDK client has picked up the Activity Task and is processing the Activity invocation\n - EVENT_TYPE_ACTIVITY_TASK_COMPLETED: Activity Task has finished successfully\nThe SDK client has picked up and successfully completed the Activity Task\nThis event type contains Activity execution results\n - EVENT_TYPE_ACTIVITY_TASK_FAILED: Activity Task has finished unsuccessfully\nThe SDK picked up the Activity Task but unsuccessfully completed it\nThis event type contains Activity execution errors\n - EVENT_TYPE_ACTIVITY_TASK_TIMED_OUT: Activity has timed out according to the Temporal Server\nActivity did not complete within the timeout settings\n - EVENT_TYPE_ACTIVITY_TASK_CANCEL_REQUESTED: A request to cancel the Activity has occurred\nThe SDK client will be able to confirm cancellation of an Activity during an Activity heartbeat\n - EVENT_TYPE_ACTIVITY_TASK_CANCELED: Activity has been cancelled\n - EVENT_TYPE_TIMER_STARTED: A timer has started\n - EVENT_TYPE_TIMER_FIRED: A timer has fired\n - EVENT_TYPE_TIMER_CANCELED: A time has been cancelled\n - EVENT_TYPE_WORKFLOW_EXECUTION_CANCEL_REQUESTED: A request has been made to cancel the Workflow execution\n - EVENT_TYPE_WORKFLOW_EXECUTION_CANCELED: SDK client has confirmed the cancellation request and the Workflow execution has been cancelled\n - EVENT_TYPE_REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_INITIATED: Workflow has requested that the Temporal Server try to cancel another Workflow\n - EVENT_TYPE_REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_FAILED: Temporal Server could not cancel the targeted Workflow\nThis is usually because the target Workflow could not be found\n - EVENT_TYPE_EXTERNAL_WORKFLOW_EXECUTION_CANCEL_REQUESTED: Temporal Server has successfully requested the cancellation of the target Workflow\n - EVENT_TYPE_MARKER_RECORDED: A marker has been recorded.\nThis event type is transparent to the Temporal Server\nThe Server will only store it and will not try to understand it.\n - EVENT_TYPE_WORKFLOW_EXECUTION_SIGNALED: Workflow has received a Signal event\nThe event type contains the Signal name, as well as a Signal payload\n - EVENT_TYPE_WORKFLOW_EXECUTION_TERMINATED: Workflow execution has been forcefully terminated\nThis is usually because the terminate Workflow API was called\n - EVENT_TYPE_WORKFLOW_EXECUTION_CONTINUED_AS_NEW: Workflow has successfully completed and a new Workflow has been started within the same transaction\nContains last Workflow execution results as well as new Workflow execution inputs\n - EVENT_TYPE_START_CHILD_WORKFLOW_EXECUTION_INITIATED: Temporal Server will try to start a child Workflow\n - EVENT_TYPE_START_CHILD_WORKFLOW_EXECUTION_FAILED: Child Workflow execution cannot be started/triggered\nUsually due to a child Workflow ID collision\n - EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_STARTED: Child Workflow execution has successfully started/triggered\n - EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_COMPLETED: Child Workflow execution has successfully completed\n - EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_FAILED: Child Workflow execution has unsuccessfully completed\n - EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_CANCELED: Child Workflow execution has been cancelled\n - EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_TIMED_OUT: Child Workflow execution has timed out by the Temporal Server\n - EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_TERMINATED: Child Workflow execution has been terminated\n - EVENT_TYPE_SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_INITIATED: Temporal Server will try to Signal the targeted Workflow\nContains the Signal name, as well as a Signal payload\n - EVENT_TYPE_SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_FAILED: Temporal Server cannot Signal the targeted Workflow\nUsually because the Workflow could not be found\n - EVENT_TYPE_EXTERNAL_WORKFLOW_EXECUTION_SIGNALED: Temporal Server has successfully Signaled the targeted Workflow\n - EVENT_TYPE_UPSERT_WORKFLOW_SEARCH_ATTRIBUTES: Workflow search attributes should be updated and synchronized with the visibility store\n - EVENT_TYPE_WORKFLOW_EXECUTION_UPDATE_ADMITTED: An update was admitted. Note that not all admitted updates result in this\nevent. See UpdateAdmittedEventOrigin for situations in which this event\nis created.\n - EVENT_TYPE_WORKFLOW_EXECUTION_UPDATE_ACCEPTED: An update was accepted (i.e. passed validation, perhaps because no validator was defined)\n - EVENT_TYPE_WORKFLOW_EXECUTION_UPDATE_REJECTED: This event is never written to history.\n - EVENT_TYPE_WORKFLOW_EXECUTION_UPDATE_COMPLETED: An update completed\n - EVENT_TYPE_WORKFLOW_PROPERTIES_MODIFIED_EXTERNALLY: Some property or properties of the workflow as a whole have changed by non-workflow code.\nThe distinction of external vs. command-based modification is important so the SDK can\nmaintain determinism when using the command-based approach.\n - EVENT_TYPE_ACTIVITY_PROPERTIES_MODIFIED_EXTERNALLY: Some property or properties of an already-scheduled activity have changed by non-workflow code.\nThe distinction of external vs. command-based modification is important so the SDK can\nmaintain determinism when using the command-based approach.\n - EVENT_TYPE_WORKFLOW_PROPERTIES_MODIFIED: Workflow properties modified by user workflow code\n - EVENT_TYPE_NEXUS_OPERATION_SCHEDULED: A Nexus operation was scheduled using a ScheduleNexusOperation command.\n - EVENT_TYPE_NEXUS_OPERATION_STARTED: An asynchronous Nexus operation was started by a Nexus handler.\n - EVENT_TYPE_NEXUS_OPERATION_COMPLETED: A Nexus operation completed successfully.\n - EVENT_TYPE_NEXUS_OPERATION_FAILED: A Nexus operation failed.\n - EVENT_TYPE_NEXUS_OPERATION_CANCELED: A Nexus operation completed as canceled.\n - EVENT_TYPE_NEXUS_OPERATION_TIMED_OUT: A Nexus operation timed out.\n - EVENT_TYPE_NEXUS_OPERATION_CANCEL_REQUESTED: A Nexus operation was requested to be canceled using a RequestCancelNexusOperation command.\n - EVENT_TYPE_WORKFLOW_EXECUTION_OPTIONS_UPDATED: Workflow execution options updated by user.\n - EVENT_TYPE_NEXUS_OPERATION_CANCEL_REQUEST_COMPLETED: A cancellation request for a Nexus operation was successfully delivered to the Nexus handler.\n - EVENT_TYPE_NEXUS_OPERATION_CANCEL_REQUEST_FAILED: A cancellation request for a Nexus operation resulted in an error.\n - EVENT_TYPE_WORKFLOW_EXECUTION_PAUSED: An event that indicates that the workflow execution has been paused.\n - EVENT_TYPE_WORKFLOW_EXECUTION_UNPAUSED: An event that indicates that the previously paused workflow execution has been unpaused.\n - EVENT_TYPE_WORKFLOW_EXECUTION_TIME_SKIPPING_TRANSITIONED: An event that indicates time skipping advanced time or was disabled automatically after a bound was reached.", "title": "Whenever this list of events is changed do change the function shouldBufferEvent in mutableStateBuilder.go to make sure to do the correct event ordering" }, + "v1Execution": { + "type": "object", + "properties": { + "archetype": { + "$ref": "#/definitions/v1ExecutionType" + }, + "businessId": { + "type": "string" + }, + "runId": { + "type": "string" + } + } + }, + "v1ExecutionType": { + "type": "string", + "enum": [ + "EXECUTION_TYPE_UNSPECIFIED", + "EXECUTION_TYPE_WORKFLOW", + "EXECUTION_TYPE_ACTIVITY" + ], + "default": "EXECUTION_TYPE_UNSPECIFIED", + "description": " - EXECUTION_TYPE_WORKFLOW: A workflow execution archetype.\n - EXECUTION_TYPE_ACTIVITY: An activity execution archetype. This is reserved for standalone activities." + }, "v1ExternalWorkflowExecutionCancelRequestedEventAttributes": { "type": "object", "properties": { diff --git a/openapi/openapiv3.yaml b/openapi/openapiv3.yaml index 9901b9b1c..d18bef24c 100644 --- a/openapi/openapiv3.yaml +++ b/openapi/openapiv3.yaml @@ -10347,6 +10347,11 @@ components: identity: type: string description: The identity of the worker/client + reason: + type: string + description: |- + Reason for requesting the cancellation, recorded and available via the PollActivityExecution API. + Not propagated to a worker if an activity attempt is currently running. description: |- BatchOperationCancellation sends cancel requests to a batch of activities. Keep the parameter in sync with temporal.api.workflowservice.v1.RequestCancelActivityExecutionRequest. @@ -10398,6 +10403,30 @@ components: type: string description: Batch operation close time format: date-time + operationType: + enum: + - BATCH_OPERATION_TYPE_UNSPECIFIED + - BATCH_OPERATION_TYPE_TERMINATE + - BATCH_OPERATION_TYPE_TERMINATE_WORKFLOW + - BATCH_OPERATION_TYPE_CANCEL + - BATCH_OPERATION_TYPE_CANCEL_WORKFLOW + - BATCH_OPERATION_TYPE_SIGNAL + - BATCH_OPERATION_TYPE_SIGNAL_WORKFLOW + - BATCH_OPERATION_TYPE_DELETE + - BATCH_OPERATION_TYPE_DELETE_WORKFLOW + - BATCH_OPERATION_TYPE_RESET + - BATCH_OPERATION_TYPE_RESET_WORKFLOW + - BATCH_OPERATION_TYPE_UPDATE_EXECUTION_OPTIONS + - BATCH_OPERATION_TYPE_UPDATE_WORKFLOW_EXECUTION_OPTIONS + - BATCH_OPERATION_TYPE_UNPAUSE_ACTIVITY + - BATCH_OPERATION_TYPE_UPDATE_ACTIVITY_OPTIONS + - BATCH_OPERATION_TYPE_RESET_ACTIVITY + - BATCH_OPERATION_TYPE_TERMINATE_ACTIVITY + - BATCH_OPERATION_TYPE_CANCEL_ACTIVITY + - BATCH_OPERATION_TYPE_DELETE_ACTIVITY + type: string + description: Operation type + format: enum BatchOperationReset: type: object properties: @@ -10498,6 +10527,11 @@ components: identity: type: string description: The identity of the worker/client + reason: + type: string + description: |- + Reason for requesting the termination, recorded and available via the PollActivityExecution API. + Not propagated to a worker if an activity attempt is currently running. description: |- BatchOperationTerminateActivities sends terminate requests to a batch of activities. Keep the parameter in sync with temporal.api.workflowservice.v1.TerminateActivityExecutionRequest. @@ -11630,14 +11664,23 @@ components: enum: - BATCH_OPERATION_TYPE_UNSPECIFIED - BATCH_OPERATION_TYPE_TERMINATE + - BATCH_OPERATION_TYPE_TERMINATE_WORKFLOW - BATCH_OPERATION_TYPE_CANCEL + - BATCH_OPERATION_TYPE_CANCEL_WORKFLOW - BATCH_OPERATION_TYPE_SIGNAL + - BATCH_OPERATION_TYPE_SIGNAL_WORKFLOW - BATCH_OPERATION_TYPE_DELETE + - BATCH_OPERATION_TYPE_DELETE_WORKFLOW - BATCH_OPERATION_TYPE_RESET + - BATCH_OPERATION_TYPE_RESET_WORKFLOW - BATCH_OPERATION_TYPE_UPDATE_EXECUTION_OPTIONS + - BATCH_OPERATION_TYPE_UPDATE_WORKFLOW_EXECUTION_OPTIONS - BATCH_OPERATION_TYPE_UNPAUSE_ACTIVITY - BATCH_OPERATION_TYPE_UPDATE_ACTIVITY_OPTIONS - BATCH_OPERATION_TYPE_RESET_ACTIVITY + - BATCH_OPERATION_TYPE_TERMINATE_ACTIVITY + - BATCH_OPERATION_TYPE_CANCEL_ACTIVITY + - BATCH_OPERATION_TYPE_DELETE_ACTIVITY type: string description: Batch operation type format: enum @@ -12070,6 +12113,20 @@ components: in a given workflow execution that carry the same label, provided that they have the distinct ID. description: A user-defined short-form string value to be used as the group's label. + Execution: + type: object + properties: + archetype: + enum: + - EXECUTION_TYPE_UNSPECIFIED + - EXECUTION_TYPE_WORKFLOW + - EXECUTION_TYPE_ACTIVITY + type: string + format: enum + businessId: + type: string + runId: + type: string ExternalWorkflowExecutionCancelRequestedEventAttributes: type: object properties: @@ -16664,10 +16721,12 @@ components: description: |- Executions to apply the batch operation This field and `visibility_query` are mutually exclusive - activityExecutions: + DEPRECATED: Use `archetype_executions` instead. + archetypeExecutions: type: array items: - $ref: '#/components/schemas/StartBatchOperationRequest_ActivityExecution' + $ref: '#/components/schemas/Execution' + description: "Archetype executions to apply the batch operation. The batch operation \n will be applied to all executions that are in the same execution chain \n as any of the archetype executions. This field and `visibility_query` \n are mutually exclusive." maxOperationsPerSecond: type: number description: |- @@ -16702,14 +16761,6 @@ components: $ref: '#/components/schemas/BatchOperationTerminateActivities' deleteActivitiesOperation: $ref: '#/components/schemas/BatchOperationDeleteActivities' - StartBatchOperationRequest_ActivityExecution: - type: object - properties: - activityId: - type: string - runId: - type: string - description: 'TODO(seankane): support listing activity executions' StartBatchOperationResponse: type: object properties: {} diff --git a/temporal/api/batch/v1/message.proto b/temporal/api/batch/v1/message.proto index 499852fc5..e0c8d57bd 100644 --- a/temporal/api/batch/v1/message.proto +++ b/temporal/api/batch/v1/message.proto @@ -28,6 +28,8 @@ message BatchOperationInfo { google.protobuf.Timestamp start_time = 3; // Batch operation close time google.protobuf.Timestamp close_time = 4; + // Operation type + temporal.api.enums.v1.BatchOperationType operation_type = 5; } // BatchOperationTermination sends terminate requests to batch workflows. diff --git a/temporal/api/common/v1/message.proto b/temporal/api/common/v1/message.proto index a0525ab47..587e0190a 100644 --- a/temporal/api/common/v1/message.proto +++ b/temporal/api/common/v1/message.proto @@ -68,6 +68,12 @@ message WorkflowExecution { string run_id = 2; } +message Execution { + temporal.api.enums.v1.ExecutionType archetype = 1; + string business_id = 2; + string run_id = 3; +} + // Represents the identifier used by a workflow author to define the workflow. Typically, the // name of a function. This is sometimes referred to as the workflow's "name" message WorkflowType { diff --git a/temporal/api/enums/v1/batch_operation.proto b/temporal/api/enums/v1/batch_operation.proto index 372109bf6..0897643f6 100644 --- a/temporal/api/enums/v1/batch_operation.proto +++ b/temporal/api/enums/v1/batch_operation.proto @@ -11,15 +11,30 @@ option csharp_namespace = "Temporalio.Api.Enums.V1"; enum BatchOperationType { BATCH_OPERATION_TYPE_UNSPECIFIED = 0; + // DEPRECATED: Use BATCH_OPERATION_TYPE_TERMINATE_WORKFLOW instead. BATCH_OPERATION_TYPE_TERMINATE = 1; + BATCH_OPERATION_TYPE_TERMINATE_WORKFLOW = 13; + // DEPRECATED: Use BATCH_OPERATION_TYPE_CANCEL_WORKFLOW instead. BATCH_OPERATION_TYPE_CANCEL = 2; + BATCH_OPERATION_TYPE_CANCEL_WORKFLOW = 14; + // DEPRECATED: Use BATCH_OPERATION_TYPE_SIGNAL_WORKFLOW instead. BATCH_OPERATION_TYPE_SIGNAL = 3; + BATCH_OPERATION_TYPE_SIGNAL_WORKFLOW = 15; + // DEPRECATED: Use BATCH_OPERATION_TYPE_DELETE_WORKFLOW instead. BATCH_OPERATION_TYPE_DELETE = 4; + BATCH_OPERATION_TYPE_DELETE_WORKFLOW = 16; + // DEPRECATED: Use BATCH_OPERATION_TYPE_RESET_WORKFLOW instead. BATCH_OPERATION_TYPE_RESET = 5; + BATCH_OPERATION_TYPE_RESET_WORKFLOW = 17; + // DEPRECATED: Use BATCH_OPERATION_TYPE_UPDATE_WORKFLOW_EXECUTION_OPTIONS instead. BATCH_OPERATION_TYPE_UPDATE_EXECUTION_OPTIONS = 6; + BATCH_OPERATION_TYPE_UPDATE_WORKFLOW_EXECUTION_OPTIONS = 18; BATCH_OPERATION_TYPE_UNPAUSE_ACTIVITY = 7; BATCH_OPERATION_TYPE_UPDATE_ACTIVITY_OPTIONS = 8; BATCH_OPERATION_TYPE_RESET_ACTIVITY = 9; + BATCH_OPERATION_TYPE_TERMINATE_ACTIVITY = 10; + BATCH_OPERATION_TYPE_CANCEL_ACTIVITY = 11; + BATCH_OPERATION_TYPE_DELETE_ACTIVITY = 12; } enum BatchOperationState { diff --git a/temporal/api/enums/v1/common.proto b/temporal/api/enums/v1/common.proto index 192c1d75b..cdc387173 100644 --- a/temporal/api/enums/v1/common.proto +++ b/temporal/api/enums/v1/common.proto @@ -106,3 +106,11 @@ enum WorkerStatus { WORKER_STATUS_SHUTTING_DOWN = 2; WORKER_STATUS_SHUTDOWN = 3; } + +enum ExecutionType { + EXECUTION_TYPE_UNSPECIFIED = 0; + // A workflow execution archetype. + EXECUTION_TYPE_WORKFLOW = 1; + // An activity execution archetype. This is reserved for standalone activities. + EXECUTION_TYPE_ACTIVITY = 2; +} \ No newline at end of file diff --git a/temporal/api/workflowservice/v1/request_response.proto b/temporal/api/workflowservice/v1/request_response.proto index ca4b7260e..5145ccd20 100644 --- a/temporal/api/workflowservice/v1/request_response.proto +++ b/temporal/api/workflowservice/v1/request_response.proto @@ -1835,16 +1835,13 @@ message StartBatchOperationRequest { string reason = 4; // Executions to apply the batch operation // This field and `visibility_query` are mutually exclusive + // DEPRECATED: Use `archetype_executions` instead. repeated temporal.api.common.v1.WorkflowExecution executions = 5; - - // TODO(seankane): support listing activity executions - message ActivityExecution { - string activity_id = 1; - string run_id = 2; - } - - repeated ActivityExecution activity_executions = 22; - + // Archetype executions to apply the batch operation. The batch operation + // will be applied to all executions that are in the same execution chain + // as any of the archetype executions. This field and `visibility_query` + // are mutually exclusive. + repeated temporal.api.common.v1.Execution archetype_executions = 22; // Limit for the number of operations processed per second within this batch. // Its purpose is to reduce the stress on the system caused by batch operations, which helps to prevent system // overload and minimize potential delays in executing ongoing tasks for user workers. From 44b8eeccfa12b63fd63c70d8d52569b181dd76de Mon Sep 17 00:00:00 2001 From: Sean Kane Date: Thu, 18 Jun 2026 16:57:05 -0600 Subject: [PATCH 4/8] add fields to list and describe (cherry picked from commit 895384df75205daf22e8844f36718a73454894b2) --- openapi/openapiv2.json | 10 ++++++++++ openapi/openapiv3.yaml | 6 ++++++ temporal/api/workflowservice/v1/request_response.proto | 2 ++ 3 files changed, 18 insertions(+) diff --git a/openapi/openapiv2.json b/openapi/openapiv2.json index 13f325e06..b55aa1eca 100644 --- a/openapi/openapiv2.json +++ b/openapi/openapiv2.json @@ -15260,6 +15260,16 @@ "reason": { "type": "string", "title": "Reason indicates the reason to stop a operation" + }, + "query": { + "type": "string" + }, + "executions": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1Execution" + } } } }, diff --git a/openapi/openapiv3.yaml b/openapi/openapiv3.yaml index d18bef24c..d175311ea 100644 --- a/openapi/openapiv3.yaml +++ b/openapi/openapiv3.yaml @@ -11719,6 +11719,12 @@ components: reason: type: string description: Reason indicates the reason to stop a operation + query: + type: string + executions: + type: array + items: + $ref: '#/components/schemas/Execution' DescribeDeploymentResponse: type: object properties: diff --git a/temporal/api/workflowservice/v1/request_response.proto b/temporal/api/workflowservice/v1/request_response.proto index 5145ccd20..23df0f3a9 100644 --- a/temporal/api/workflowservice/v1/request_response.proto +++ b/temporal/api/workflowservice/v1/request_response.proto @@ -1911,6 +1911,8 @@ message DescribeBatchOperationResponse { string identity = 9; // Reason indicates the reason to stop a operation string reason = 10; + string query = 11; + repeated temporal.api.common.v1.Execution executions = 12; } message ListBatchOperationsRequest { From 3c179062743436762e96a41308405cbcbc64a2a1 Mon Sep 17 00:00:00 2001 From: Kundan <281732484+ks-temporal@users.noreply.github.com> Date: Tue, 30 Jun 2026 14:51:58 -0700 Subject: [PATCH 5/8] Replace archetype with type in Execution (cherry picked from commit cf22fcea13f46bf0a318490186780330e512e264) --- openapi/openapiv2.json | 5 +++-- openapi/openapiv3.yaml | 5 ++++- temporal/api/common/v1/message.proto | 4 +++- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/openapi/openapiv2.json b/openapi/openapiv2.json index b55aa1eca..344bdbb91 100644 --- a/openapi/openapiv2.json +++ b/openapi/openapiv2.json @@ -15691,7 +15691,7 @@ "v1Execution": { "type": "object", "properties": { - "archetype": { + "type": { "$ref": "#/definitions/v1ExecutionType" }, "businessId": { @@ -15700,7 +15700,8 @@ "runId": { "type": "string" } - } + }, + "description": "Identifies a specific execution within a namespace. This is used for standalone activities\nexecutions in batch jobs currently." }, "v1ExecutionType": { "type": "string", diff --git a/openapi/openapiv3.yaml b/openapi/openapiv3.yaml index d175311ea..5fd55d71f 100644 --- a/openapi/openapiv3.yaml +++ b/openapi/openapiv3.yaml @@ -12122,7 +12122,7 @@ components: Execution: type: object properties: - archetype: + type: enum: - EXECUTION_TYPE_UNSPECIFIED - EXECUTION_TYPE_WORKFLOW @@ -12133,6 +12133,9 @@ components: type: string runId: type: string + description: |- + Identifies a specific execution within a namespace. This is used for standalone activities + executions in batch jobs currently. ExternalWorkflowExecutionCancelRequestedEventAttributes: type: object properties: diff --git a/temporal/api/common/v1/message.proto b/temporal/api/common/v1/message.proto index 587e0190a..f1a1f1f04 100644 --- a/temporal/api/common/v1/message.proto +++ b/temporal/api/common/v1/message.proto @@ -68,8 +68,10 @@ message WorkflowExecution { string run_id = 2; } +// Identifies a specific execution within a namespace. This is used for standalone activities +// executions in batch jobs currently. message Execution { - temporal.api.enums.v1.ExecutionType archetype = 1; + temporal.api.enums.v1.ExecutionType type = 1; string business_id = 2; string run_id = 3; } From c5ae5f4e0f8d95b978c1ebd5c9fcfed5b48d724c Mon Sep 17 00:00:00 2001 From: Kundan <281732484+ks-temporal@users.noreply.github.com> Date: Tue, 30 Jun 2026 15:32:35 -0700 Subject: [PATCH 6/8] Revert makefile changes (cherry picked from commit 5a08550307326becee38ac6897f0ebb489b7e965) --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index f0677701c..dc8ab5025 100644 --- a/Makefile +++ b/Makefile @@ -114,7 +114,7 @@ $(STAMPDIR): $(STAMPDIR)/buf-mod-prune: $(STAMPDIR) buf.yaml printf $(COLOR) "Pruning buf module" -# buf mod prune + buf mod prune touch $@ buf-lint: $(STAMPDIR)/buf-mod-prune @@ -123,7 +123,7 @@ buf-lint: $(STAMPDIR)/buf-mod-prune buf-breaking: @printf $(COLOR) "Run buf breaking changes check against main branch..." -# @(cd $(PROTO_ROOT) && buf breaking --against 'https://github.com/temporalio/api.git#branch=main') + @(cd $(PROTO_ROOT) && buf breaking --against 'https://github.com/temporalio/api.git#branch=main') nexus-rpc-yaml: nexus-rpc-yaml-install printf $(COLOR) "Generate nexus/temporal-proto-models-nexusrpc.yaml..." From c5bb7ef427a8f35eae78ce6a0f816473ab83eb12 Mon Sep 17 00:00:00 2001 From: Sean Kane Date: Mon, 6 Jul 2026 10:57:07 -0600 Subject: [PATCH 7/8] update for comments (cherry picked from commit 737f6c773376f3c7cdc96fa47757ae9277e96d86) --- openapi/openapiv2.json | 2 +- openapi/openapiv3.yaml | 2 +- temporal/api/batch/v1/message.proto | 2 +- temporal/api/enums/v1/batch_operation.proto | 12 ++++++------ .../api/workflowservice/v1/request_response.proto | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/openapi/openapiv2.json b/openapi/openapiv2.json index 344bdbb91..c01253502 100644 --- a/openapi/openapiv2.json +++ b/openapi/openapiv2.json @@ -14036,7 +14036,7 @@ "description": "Reason for requesting the cancellation, recorded and available via the PollActivityExecution API.\nNot propagated to a worker if an activity attempt is currently running." } }, - "description": "BatchOperationCancellation sends cancel requests to a batch of activities.\nKeep the parameter in sync with temporal.api.workflowservice.v1.RequestCancelActivityExecutionRequest." + "description": "BatchOperationCancelActivities sends cancel requests to a batch of activities.\nKeep the parameter in sync with temporal.api.workflowservice.v1.RequestCancelActivityExecutionRequest." }, "v1BatchOperationCancellation": { "type": "object", diff --git a/openapi/openapiv3.yaml b/openapi/openapiv3.yaml index 5fd55d71f..0d1963e3a 100644 --- a/openapi/openapiv3.yaml +++ b/openapi/openapiv3.yaml @@ -10353,7 +10353,7 @@ components: Reason for requesting the cancellation, recorded and available via the PollActivityExecution API. Not propagated to a worker if an activity attempt is currently running. description: |- - BatchOperationCancellation sends cancel requests to a batch of activities. + BatchOperationCancelActivities sends cancel requests to a batch of activities. Keep the parameter in sync with temporal.api.workflowservice.v1.RequestCancelActivityExecutionRequest. BatchOperationCancellation: type: object diff --git a/temporal/api/batch/v1/message.proto b/temporal/api/batch/v1/message.proto index e0c8d57bd..fce914b24 100644 --- a/temporal/api/batch/v1/message.proto +++ b/temporal/api/batch/v1/message.proto @@ -74,7 +74,7 @@ message BatchOperationCancellation { string identity = 1; } -// BatchOperationCancellation sends cancel requests to a batch of activities. +// BatchOperationCancelActivities sends cancel requests to a batch of activities. // Keep the parameter in sync with temporal.api.workflowservice.v1.RequestCancelActivityExecutionRequest. message BatchOperationCancelActivities { // The identity of the worker/client diff --git a/temporal/api/enums/v1/batch_operation.proto b/temporal/api/enums/v1/batch_operation.proto index 0897643f6..879906e30 100644 --- a/temporal/api/enums/v1/batch_operation.proto +++ b/temporal/api/enums/v1/batch_operation.proto @@ -12,22 +12,22 @@ option csharp_namespace = "Temporalio.Api.Enums.V1"; enum BatchOperationType { BATCH_OPERATION_TYPE_UNSPECIFIED = 0; // DEPRECATED: Use BATCH_OPERATION_TYPE_TERMINATE_WORKFLOW instead. - BATCH_OPERATION_TYPE_TERMINATE = 1; + BATCH_OPERATION_TYPE_TERMINATE = 1 [deprecated = true]; BATCH_OPERATION_TYPE_TERMINATE_WORKFLOW = 13; // DEPRECATED: Use BATCH_OPERATION_TYPE_CANCEL_WORKFLOW instead. - BATCH_OPERATION_TYPE_CANCEL = 2; + BATCH_OPERATION_TYPE_CANCEL = 2 [deprecated = true]; BATCH_OPERATION_TYPE_CANCEL_WORKFLOW = 14; // DEPRECATED: Use BATCH_OPERATION_TYPE_SIGNAL_WORKFLOW instead. - BATCH_OPERATION_TYPE_SIGNAL = 3; + BATCH_OPERATION_TYPE_SIGNAL = 3 [deprecated = true]; BATCH_OPERATION_TYPE_SIGNAL_WORKFLOW = 15; // DEPRECATED: Use BATCH_OPERATION_TYPE_DELETE_WORKFLOW instead. - BATCH_OPERATION_TYPE_DELETE = 4; + BATCH_OPERATION_TYPE_DELETE = 4 [deprecated = true]; BATCH_OPERATION_TYPE_DELETE_WORKFLOW = 16; // DEPRECATED: Use BATCH_OPERATION_TYPE_RESET_WORKFLOW instead. - BATCH_OPERATION_TYPE_RESET = 5; + BATCH_OPERATION_TYPE_RESET = 5 [deprecated = true]; BATCH_OPERATION_TYPE_RESET_WORKFLOW = 17; // DEPRECATED: Use BATCH_OPERATION_TYPE_UPDATE_WORKFLOW_EXECUTION_OPTIONS instead. - BATCH_OPERATION_TYPE_UPDATE_EXECUTION_OPTIONS = 6; + BATCH_OPERATION_TYPE_UPDATE_EXECUTION_OPTIONS = 6 [deprecated = true]; BATCH_OPERATION_TYPE_UPDATE_WORKFLOW_EXECUTION_OPTIONS = 18; BATCH_OPERATION_TYPE_UNPAUSE_ACTIVITY = 7; BATCH_OPERATION_TYPE_UPDATE_ACTIVITY_OPTIONS = 8; diff --git a/temporal/api/workflowservice/v1/request_response.proto b/temporal/api/workflowservice/v1/request_response.proto index 23df0f3a9..7461bac67 100644 --- a/temporal/api/workflowservice/v1/request_response.proto +++ b/temporal/api/workflowservice/v1/request_response.proto @@ -1836,7 +1836,7 @@ message StartBatchOperationRequest { // Executions to apply the batch operation // This field and `visibility_query` are mutually exclusive // DEPRECATED: Use `archetype_executions` instead. - repeated temporal.api.common.v1.WorkflowExecution executions = 5; + repeated temporal.api.common.v1.WorkflowExecution executions = 5 [deprecated = true]; // Archetype executions to apply the batch operation. The batch operation // will be applied to all executions that are in the same execution chain // as any of the archetype executions. This field and `visibility_query` From 97b2fe70ac36bdb61bbeddb4cbb9499689c4844a Mon Sep 17 00:00:00 2001 From: Sean Kane Date: Mon, 6 Jul 2026 10:58:58 -0600 Subject: [PATCH 8/8] doc strings (cherry picked from commit 9bc1a442394d1db4754d963dd6f23459f516a0da) --- openapi/openapiv2.json | 6 ++++-- openapi/openapiv3.yaml | 2 ++ temporal/api/batch/v1/message.proto | 6 +++--- temporal/api/workflowservice/v1/request_response.proto | 2 ++ 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/openapi/openapiv2.json b/openapi/openapiv2.json index c01253502..7837c154f 100644 --- a/openapi/openapiv2.json +++ b/openapi/openapiv2.json @@ -15262,14 +15262,16 @@ "title": "Reason indicates the reason to stop a operation" }, "query": { - "type": "string" + "type": "string", + "title": "Query is the visibility query that defines the group of workflow to apply the batch operation" }, "executions": { "type": "array", "items": { "type": "object", "$ref": "#/definitions/v1Execution" - } + }, + "title": "Executions is the list of workflow executions to apply the batch operation" } } }, diff --git a/openapi/openapiv3.yaml b/openapi/openapiv3.yaml index 0d1963e3a..484e6f934 100644 --- a/openapi/openapiv3.yaml +++ b/openapi/openapiv3.yaml @@ -11721,10 +11721,12 @@ components: description: Reason indicates the reason to stop a operation query: type: string + description: Query is the visibility query that defines the group of workflow to apply the batch operation executions: type: array items: $ref: '#/components/schemas/Execution' + description: Executions is the list of workflow executions to apply the batch operation DescribeDeploymentResponse: type: object properties: diff --git a/temporal/api/batch/v1/message.proto b/temporal/api/batch/v1/message.proto index fce914b24..63d3fafdb 100644 --- a/temporal/api/batch/v1/message.proto +++ b/temporal/api/batch/v1/message.proto @@ -79,9 +79,9 @@ message BatchOperationCancellation { message BatchOperationCancelActivities { // The identity of the worker/client string identity = 1; - // Reason for requesting the cancellation, recorded and available via the PollActivityExecution API. - // Not propagated to a worker if an activity attempt is currently running. - string reason = 2; + // Reason for requesting the cancellation, recorded and available via the PollActivityExecution API. + // Not propagated to a worker if an activity attempt is currently running. + string reason = 2; } // BatchOperationDeletion sends deletion requests to batch workflows. diff --git a/temporal/api/workflowservice/v1/request_response.proto b/temporal/api/workflowservice/v1/request_response.proto index 7461bac67..8b3ef808b 100644 --- a/temporal/api/workflowservice/v1/request_response.proto +++ b/temporal/api/workflowservice/v1/request_response.proto @@ -1911,7 +1911,9 @@ message DescribeBatchOperationResponse { string identity = 9; // Reason indicates the reason to stop a operation string reason = 10; + // Query is the visibility query that defines the group of workflow to apply the batch operation string query = 11; + // Executions is the list of workflow executions to apply the batch operation repeated temporal.api.common.v1.Execution executions = 12; }