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
23 changes: 23 additions & 0 deletions openapi/openapiv2.json
Original file line number Diff line number Diff line change
Expand Up @@ -11967,6 +11967,10 @@
"deploymentOptions": {
"$ref": "#/definitions/v1WorkerDeploymentOptions",
"description": "Worker deployment options that user has set in the worker."
},
"cause": {
"$ref": "#/definitions/v1ActivityTaskFailedCause",
"description": "Why did the task fail? When unset, the failure is treated as an unspecified activity failure."
}
}
},
Expand All @@ -11992,6 +11996,10 @@
"resourceId": {
"type": "string",
"description": "Resource ID for routing. Contains \"workflow:workflow_id\" or \"activity:activity_id\" for standalone activities."
},
"cause": {
"$ref": "#/definitions/v1ActivityTaskFailedCause",
"description": "Why did the activity task fail? Optional; when unset the failure is treated as a normal\nactivity failure. See the type's doc for more."
}
}
},
Expand Down Expand Up @@ -13752,6 +13760,17 @@
}
}
},
"v1ActivityTaskFailedCause": {
"type": "string",
"enum": [
"ACTIVITY_TASK_FAILED_CAUSE_UNSPECIFIED",
"ACTIVITY_TASK_FAILED_CAUSE_GRPC_MESSAGE_TOO_LARGE",
"ACTIVITY_TASK_FAILED_CAUSE_PAYLOADS_TOO_LARGE",
"ACTIVITY_TASK_FAILED_CAUSE_EXTERNAL_STORAGE_FAILURE"
],
"default": "ACTIVITY_TASK_FAILED_CAUSE_UNSPECIFIED",
"description": "Activity tasks can fail for various reasons. Note that some of these reasons can only originate\nfrom the server, and some of them can only originate from the SDK/worker.\n\n - ACTIVITY_TASK_FAILED_CAUSE_GRPC_MESSAGE_TOO_LARGE: An activity task failed because a grpc message was too large.\n - ACTIVITY_TASK_FAILED_CAUSE_PAYLOADS_TOO_LARGE: An activity task failed because payloads were too large.\n - ACTIVITY_TASK_FAILED_CAUSE_EXTERNAL_STORAGE_FAILURE: An activity task failed because an external storage operation failed.\nCheck the activity task failure message for more information."
},
"v1ActivityTaskFailedEventAttributes": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -13779,6 +13798,10 @@
"workerVersion": {
"$ref": "#/definitions/v1WorkerVersionStamp",
"title": "Version info of the worker who processed this workflow task.\nDeprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv]"
},
"cause": {
"$ref": "#/definitions/v1ActivityTaskFailedCause",
"description": "Why did the task fail? When unset, the failure is treated as an unspecified activity failure."
}
}
},
Expand Down
29 changes: 29 additions & 0 deletions openapi/openapiv3.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10101,6 +10101,15 @@ components:
description: |-
Version info of the worker who processed this workflow task.
Deprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv]
cause:
enum:
- ACTIVITY_TASK_FAILED_CAUSE_UNSPECIFIED
- ACTIVITY_TASK_FAILED_CAUSE_GRPC_MESSAGE_TOO_LARGE
- ACTIVITY_TASK_FAILED_CAUSE_PAYLOADS_TOO_LARGE
- ACTIVITY_TASK_FAILED_CAUSE_EXTERNAL_STORAGE_FAILURE
type: string
description: Why did the task fail? When unset, the failure is treated as an unspecified activity failure.
format: enum
ActivityTaskScheduledEventAttributes:
type: object
properties:
Expand Down Expand Up @@ -15456,6 +15465,17 @@ components:
resourceId:
type: string
description: Resource ID for routing. Contains "workflow:workflow_id" or "activity:activity_id" for standalone activities.
cause:
enum:
- ACTIVITY_TASK_FAILED_CAUSE_UNSPECIFIED
- ACTIVITY_TASK_FAILED_CAUSE_GRPC_MESSAGE_TOO_LARGE
- ACTIVITY_TASK_FAILED_CAUSE_PAYLOADS_TOO_LARGE
- ACTIVITY_TASK_FAILED_CAUSE_EXTERNAL_STORAGE_FAILURE
type: string
description: |-
Why did the activity task fail? Optional; when unset the failure is treated as a normal
activity failure. See the type's doc for more.
format: enum
RespondActivityTaskFailedByIdResponse:
type: object
properties:
Expand Down Expand Up @@ -15508,6 +15528,15 @@ components:
allOf:
- $ref: '#/components/schemas/WorkerDeploymentOptions'
description: Worker deployment options that user has set in the worker.
cause:
enum:
- ACTIVITY_TASK_FAILED_CAUSE_UNSPECIFIED
- ACTIVITY_TASK_FAILED_CAUSE_GRPC_MESSAGE_TOO_LARGE
- ACTIVITY_TASK_FAILED_CAUSE_PAYLOADS_TOO_LARGE
- ACTIVITY_TASK_FAILED_CAUSE_EXTERNAL_STORAGE_FAILURE
type: string
description: Why did the task fail? When unset, the failure is treated as an unspecified activity failure.
format: enum
RespondActivityTaskFailedResponse:
type: object
properties:
Expand Down
13 changes: 13 additions & 0 deletions temporal/api/enums/v1/failed_cause.proto
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,19 @@ enum WorkflowTaskFailedCause {
WORKFLOW_TASK_FAILED_CAUSE_PAYLOADS_TOO_LARGE = 37;
}

// Activity tasks can fail for various reasons. Note that some of these reasons can only originate
// from the server, and some of them can only originate from the SDK/worker.
enum ActivityTaskFailedCause {
ACTIVITY_TASK_FAILED_CAUSE_UNSPECIFIED = 0;
// An activity task failed because a grpc message was too large.
ACTIVITY_TASK_FAILED_CAUSE_GRPC_MESSAGE_TOO_LARGE = 1;
// An activity task failed because payloads were too large.
ACTIVITY_TASK_FAILED_CAUSE_PAYLOADS_TOO_LARGE = 2;
// An activity task failed because an external storage operation failed.
// Check the activity task failure message for more information.
ACTIVITY_TASK_FAILED_CAUSE_EXTERNAL_STORAGE_FAILURE = 3;
}

enum StartChildWorkflowExecutionFailedCause {
START_CHILD_WORKFLOW_EXECUTION_FAILED_CAUSE_UNSPECIFIED = 0;
START_CHILD_WORKFLOW_EXECUTION_FAILED_CAUSE_WORKFLOW_ALREADY_EXISTS = 1;
Expand Down
2 changes: 2 additions & 0 deletions temporal/api/history/v1/message.proto
Original file line number Diff line number Diff line change
Expand Up @@ -517,6 +517,8 @@ message ActivityTaskFailedEventAttributes {
// Version info of the worker who processed this workflow task.
// Deprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv]
temporal.api.common.v1.WorkerVersionStamp worker_version = 6 [deprecated = true];
// Why did the task fail? When unset, the failure is treated as an unspecified activity failure.
temporal.api.enums.v1.ActivityTaskFailedCause cause = 7;
}

message ActivityTaskTimedOutEventAttributes {
Expand Down
5 changes: 5 additions & 0 deletions temporal/api/workflowservice/v1/request_response.proto
Original file line number Diff line number Diff line change
Expand Up @@ -702,6 +702,8 @@ message RespondActivityTaskFailedRequest {
temporal.api.deployment.v1.Deployment deployment = 7 [deprecated = true];
// Worker deployment options that user has set in the worker.
temporal.api.deployment.v1.WorkerDeploymentOptions deployment_options = 8;
// Why did the task fail? When unset, the failure is treated as an unspecified activity failure.
temporal.api.enums.v1.ActivityTaskFailedCause cause = 10;
}

message RespondActivityTaskFailedResponse {
Expand All @@ -728,6 +730,9 @@ message RespondActivityTaskFailedByIdRequest {
temporal.api.common.v1.Payloads last_heartbeat_details = 7;
// Resource ID for routing. Contains "workflow:workflow_id" or "activity:activity_id" for standalone activities.
string resource_id = 8;
// Why did the activity task fail? Optional; when unset the failure is treated as a normal
// activity failure. See the type's doc for more.
temporal.api.enums.v1.ActivityTaskFailedCause cause = 9;
}

message RespondActivityTaskFailedByIdResponse {
Expand Down
Loading