diff --git a/openapi/openapiv2.json b/openapi/openapiv2.json index 6bcb9e60..1a58b592 100644 --- a/openapi/openapiv2.json +++ b/openapi/openapiv2.json @@ -1706,7 +1706,7 @@ "/api/v1/namespaces/{namespace}/workflows/execute-multi-operation": { "post": { "summary": "ExecuteMultiOperation executes multiple operations within a single workflow.", - "description": "Operations are started atomically, meaning if *any* operation fails to be started, none are,\nand the request fails. Upon start, the API returns only when *all* operations have a response.\n\nUpon failure, the status code equals the status code of the *first* operation that failed to be started; and the\nlist of details contains one `google.grpc.Status` for each requested operation. The failed\noperation(s) have the same error details as if it was executed separately. All other operations have the\nstatus code `Aborted` and `temporal.api.failure.v1.MultiOperationExecutionAborted` is added to the details field.\n\nNOTE: Experimental API.", + "description": "Operations are started atomically, meaning if *any* operation fails to be started, none are,\nand the request fails. Upon start, the API returns only when *all* operations have a response.\n\nUpon failure, it returns `MultiOperationExecutionFailure` where the status code\nequals the status code of the *first* operation that failed to be started.\n\nNOTE: Experimental API.", "operationId": "ExecuteMultiOperation", "responses": { "200": { diff --git a/openapi/openapiv3.yaml b/openapi/openapiv3.yaml index 0a8ed500..003e81f8 100644 --- a/openapi/openapiv3.yaml +++ b/openapi/openapiv3.yaml @@ -1469,10 +1469,8 @@ paths: Operations are started atomically, meaning if *any* operation fails to be started, none are, and the request fails. Upon start, the API returns only when *all* operations have a response. - Upon failure, the status code equals the status code of the *first* operation that failed to be started; and the - list of details contains one `google.grpc.Status` for each requested operation. The failed - operation(s) have the same error details as if it was executed separately. All other operations have the - status code `Aborted` and `temporal.api.failure.v1.MultiOperationExecutionAborted` is added to the details field. + Upon failure, it returns `MultiOperationExecutionFailure` where the status code + equals the status code of the *first* operation that failed to be started. NOTE: Experimental API. operationId: ExecuteMultiOperation diff --git a/temporal/api/common/v1/message.proto b/temporal/api/common/v1/message.proto index f0ec5676..7f04641f 100644 --- a/temporal/api/common/v1/message.proto +++ b/temporal/api/common/v1/message.proto @@ -191,4 +191,4 @@ message Callback { oneof variant { Nexus nexus = 2; } -} +} \ No newline at end of file diff --git a/temporal/api/errordetails/v1/message.proto b/temporal/api/errordetails/v1/message.proto index ab86baa6..7d490133 100644 --- a/temporal/api/errordetails/v1/message.proto +++ b/temporal/api/errordetails/v1/message.proto @@ -34,6 +34,7 @@ option java_outer_classname = "MessageProto"; option ruby_package = "Temporalio::Api::ErrorDetails::V1"; option csharp_namespace = "Temporalio.Api.ErrorDetails.V1"; +import "google/protobuf/any.proto"; import "temporal/api/common/v1/message.proto"; import "temporal/api/enums/v1/failed_cause.proto"; @@ -112,3 +113,21 @@ message NewerBuildExistsFailure { // The current default compatible build ID which will receive tasks string default_build_id = 1; } + +message MultiOperationExecutionFailure { + // One status for each requested operation from the failed MultiOperation. The failed + // operation(s) have the same error details as if it was executed separately. All other operations have the + // status code `Aborted` and `MultiOperationExecutionAborted` is added to the details field. + repeated OperationStatus statuses = 1; + + // NOTE: `OperationStatus` is modelled after + // [`google.rpc.Status`](https://github.com/googleapis/googleapis/blob/master/google/rpc/status.proto). + // + // (-- api-linter: core::0146::any=disabled + // aip.dev/not-precedent: details are meant to hold arbitrary payloads. --) + message OperationStatus { + int32 code = 1; + string message = 2; + repeated google.protobuf.Any details = 3; + } +} \ No newline at end of file diff --git a/temporal/api/workflowservice/v1/service.proto b/temporal/api/workflowservice/v1/service.proto index 687baf7b..ddf39476 100644 --- a/temporal/api/workflowservice/v1/service.proto +++ b/temporal/api/workflowservice/v1/service.proto @@ -112,10 +112,8 @@ service WorkflowService { // Operations are started atomically, meaning if *any* operation fails to be started, none are, // and the request fails. Upon start, the API returns only when *all* operations have a response. // - // Upon failure, the status code equals the status code of the *first* operation that failed to be started; and the - // list of details contains one `google.grpc.Status` for each requested operation. The failed - // operation(s) have the same error details as if it was executed separately. All other operations have the - // status code `Aborted` and `temporal.api.failure.v1.MultiOperationExecutionAborted` is added to the details field. + // Upon failure, it returns `MultiOperationExecutionFailure` where the status code + // equals the status code of the *first* operation that failed to be started. // // NOTE: Experimental API. rpc ExecuteMultiOperation (ExecuteMultiOperationRequest) returns (ExecuteMultiOperationResponse) {