Skip to content
Draft
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
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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..."
Expand Down
103 changes: 100 additions & 3 deletions openapi/openapiv2.json

Large diffs are not rendered by default.

99 changes: 99 additions & 0 deletions openapi/openapiv3.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10328,6 +10328,20 @@ components:
createTime:
type: string
format: date-time
BatchOperationCancelActivities:
type: object
properties:
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.
BatchOperationCancellation:
type: object
properties:
Expand All @@ -10338,6 +10352,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:
Expand Down Expand Up @@ -10370,6 +10390,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:
Expand Down Expand Up @@ -10464,6 +10508,20 @@ 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
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.
BatchOperationTermination:
type: object
properties:
Expand Down Expand Up @@ -11570,14 +11628,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
Expand Down Expand Up @@ -11616,6 +11683,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:
Expand Down Expand Up @@ -12010,6 +12083,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:
Expand Down Expand Up @@ -16598,6 +16685,12 @@ components:
description: |-
Executions to apply the batch operation
This field and `visibility_query` are mutually exclusive
DEPRECATED: Use `archetype_executions` instead.
archetypeExecutions:
type: array
items:
$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: |-
Expand Down Expand Up @@ -16626,6 +16719,12 @@ 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'
StartBatchOperationResponse:
type: object
properties: {}
Expand Down
27 changes: 27 additions & 0 deletions temporal/api/batch/v1/message.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -40,6 +42,16 @@ 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;
// 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.
// Keep the parameter in sync with temporal.api.workflowservice.v1.SignalWorkflowExecutionRequest.
message BatchOperationSignal {
Expand All @@ -62,13 +74,28 @@ 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;
// 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.
// Keep the parameter in sync with temporal.api.workflowservice.v1.DeleteWorkflowExecutionRequest.
message BatchOperationDeletion {
// The identity of the worker/client
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 {
Expand Down
6 changes: 6 additions & 0 deletions temporal/api/common/v1/message.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
15 changes: 15 additions & 0 deletions temporal/api/enums/v1/batch_operation.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
8 changes: 8 additions & 0 deletions temporal/api/enums/v1/common.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
11 changes: 11 additions & 0 deletions temporal/api/workflowservice/v1/request_response.proto
Original file line number Diff line number Diff line change
Expand Up @@ -1830,7 +1830,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;
// 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.
Expand All @@ -1849,6 +1855,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;
}
}

Expand Down Expand Up @@ -1897,6 +1906,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 {
Expand Down
Loading