Skip to content

Commit c337f33

Browse files
committed
More cleanup
1 parent 8021ebb commit c337f33

File tree

4 files changed

+143
-30
lines changed

4 files changed

+143
-30
lines changed

openapi/openapiv2.json

Lines changed: 36 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9764,13 +9764,17 @@
97649764
"type": "string",
97659765
"description": "Activity run ID, targets the latest run if run_id is empty."
97669766
},
9767-
"reason": {
9768-
"type": "string",
9769-
"description": "Reason for requesting the termination, recorded in in the activity's result failure outcome."
9770-
},
97719767
"identity": {
97729768
"type": "string",
97739769
"description": "The identity of the worker/client."
9770+
},
9771+
"requestId": {
9772+
"type": "string",
9773+
"description": "Used to de-dupe cancellation requests."
9774+
},
9775+
"reason": {
9776+
"type": "string",
9777+
"description": "Reason for requesting the termination, recorded in in the activity's result failure outcome."
97749778
}
97759779
}
97769780
},
@@ -10350,6 +10354,29 @@
1035010354
"$ref": "#/definitions/v1PendingActivityState",
1035110355
"description": "More detailed breakdown of ACTIVITY_EXECUTION_STATUS_RUNNING."
1035210356
},
10357+
"taskQueue": {
10358+
"$ref": "#/definitions/v1TaskQueue"
10359+
},
10360+
"scheduleToCloseTimeout": {
10361+
"type": "string",
10362+
"description": "Indicates how long the caller is willing to wait for an activity completion. Limits how long\nretries will be attempted.\n"
10363+
},
10364+
"scheduleToStartTimeout": {
10365+
"type": "string",
10366+
"description": "Limits time an activity task can stay in a task queue before a worker picks it up. This\ntimeout is always non retryable, as all a retry would achieve is to put it back into the same\nqueue. Defaults to `schedule_to_close_timeout` or workflow execution timeout if not\nspecified.\n"
10367+
},
10368+
"startToCloseTimeout": {
10369+
"type": "string",
10370+
"description": "Maximum time an activity is allowed to execute after being picked up by a worker. This\ntimeout is always retryable.\n"
10371+
},
10372+
"heartbeatTimeout": {
10373+
"type": "string",
10374+
"description": "Maximum permitted time between successful worker heartbeats."
10375+
},
10376+
"retryPolicy": {
10377+
"$ref": "#/definitions/v1RetryPolicy",
10378+
"description": "The retry policy for the activity. Will never exceed `schedule_to_close_timeout`."
10379+
},
1035310380
"heartbeatDetails": {
1035410381
"$ref": "#/definitions/v1Payloads",
1035510382
"description": "Details provided in the last recorded activity heartbeat."
@@ -10383,6 +10410,11 @@
1038310410
"format": "date-time",
1038410411
"description": "Scheduled time + schedule to close timeout."
1038510412
},
10413+
"closeTime": {
10414+
"type": "string",
10415+
"format": "date-time",
10416+
"description": "Time when the activity transitioned to a closed state."
10417+
},
1038610418
"lastFailure": {
1038710419
"$ref": "#/definitions/apifailurev1Failure",
1038810420
"description": "Failure details from the last failed attempt."

openapi/openapiv3.yaml

Lines changed: 49 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7256,6 +7256,45 @@ components:
72567256
type: string
72577257
description: More detailed breakdown of ACTIVITY_EXECUTION_STATUS_RUNNING.
72587258
format: enum
7259+
taskQueue:
7260+
$ref: '#/components/schemas/TaskQueue'
7261+
scheduleToCloseTimeout:
7262+
pattern: ^-?(?:0|[1-9][0-9]{0,11})(?:\.[0-9]{1,9})?s$
7263+
type: string
7264+
description: |-
7265+
Indicates how long the caller is willing to wait for an activity completion. Limits how long
7266+
retries will be attempted.
7267+
7268+
(-- api-linter: core::0140::prepositions=disabled
7269+
aip.dev/not-precedent: "to" is used to indicate interval. --)
7270+
scheduleToStartTimeout:
7271+
pattern: ^-?(?:0|[1-9][0-9]{0,11})(?:\.[0-9]{1,9})?s$
7272+
type: string
7273+
description: |-
7274+
Limits time an activity task can stay in a task queue before a worker picks it up. This
7275+
timeout is always non retryable, as all a retry would achieve is to put it back into the same
7276+
queue. Defaults to `schedule_to_close_timeout` or workflow execution timeout if not
7277+
specified.
7278+
7279+
(-- api-linter: core::0140::prepositions=disabled
7280+
aip.dev/not-precedent: "to" is used to indicate interval. --)
7281+
startToCloseTimeout:
7282+
pattern: ^-?(?:0|[1-9][0-9]{0,11})(?:\.[0-9]{1,9})?s$
7283+
type: string
7284+
description: |-
7285+
Maximum time an activity is allowed to execute after being picked up by a worker. This
7286+
timeout is always retryable.
7287+
7288+
(-- api-linter: core::0140::prepositions=disabled
7289+
aip.dev/not-precedent: "to" is used to indicate interval. --)
7290+
heartbeatTimeout:
7291+
pattern: ^-?(?:0|[1-9][0-9]{0,11})(?:\.[0-9]{1,9})?s$
7292+
type: string
7293+
description: Maximum permitted time between successful worker heartbeats.
7294+
retryPolicy:
7295+
allOf:
7296+
- $ref: '#/components/schemas/RetryPolicy'
7297+
description: The retry policy for the activity. Will never exceed `schedule_to_close_timeout`.
72597298
heartbeatDetails:
72607299
allOf:
72617300
- $ref: '#/components/schemas/Payloads'
@@ -7286,6 +7325,10 @@ components:
72867325
type: string
72877326
description: Scheduled time + schedule to close timeout.
72887327
format: date-time
7328+
closeTime:
7329+
type: string
7330+
description: Time when the activity transitioned to a closed state.
7331+
format: date-time
72897332
lastFailure:
72907333
allOf:
72917334
- $ref: '#/components/schemas/Failure'
@@ -13748,12 +13791,15 @@ components:
1374813791
runId:
1374913792
type: string
1375013793
description: Activity run ID, targets the latest run if run_id is empty.
13751-
reason:
13752-
type: string
13753-
description: Reason for requesting the termination, recorded in in the activity's result failure outcome.
1375413794
identity:
1375513795
type: string
1375613796
description: The identity of the worker/client.
13797+
requestId:
13798+
type: string
13799+
description: Used to de-dupe cancellation requests.
13800+
reason:
13801+
type: string
13802+
description: Reason for requesting the termination, recorded in in the activity's result failure outcome.
1375713803
TerminateActivityExecutionResponse:
1375813804
type: object
1375913805
properties: {}

temporal/api/activity/v1/message.proto

Lines changed: 53 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -66,60 +66,93 @@ message ActivityExecutionInfo {
6666
temporal.api.enums.v1.ActivityExecutionStatus status = 4;
6767
// More detailed breakdown of ACTIVITY_EXECUTION_STATUS_RUNNING.
6868
temporal.api.enums.v1.PendingActivityState run_state = 5;
69+
70+
temporal.api.taskqueue.v1.TaskQueue task_queue = 6;
71+
72+
// Indicates how long the caller is willing to wait for an activity completion. Limits how long
73+
// retries will be attempted.
74+
//
75+
// (-- api-linter: core::0140::prepositions=disabled
76+
// aip.dev/not-precedent: "to" is used to indicate interval. --)
77+
google.protobuf.Duration schedule_to_close_timeout = 7;
78+
// Limits time an activity task can stay in a task queue before a worker picks it up. This
79+
// timeout is always non retryable, as all a retry would achieve is to put it back into the same
80+
// queue. Defaults to `schedule_to_close_timeout` or workflow execution timeout if not
81+
// specified.
82+
//
83+
// (-- api-linter: core::0140::prepositions=disabled
84+
// aip.dev/not-precedent: "to" is used to indicate interval. --)
85+
google.protobuf.Duration schedule_to_start_timeout = 8;
86+
// Maximum time an activity is allowed to execute after being picked up by a worker. This
87+
// timeout is always retryable.
88+
//
89+
// (-- api-linter: core::0140::prepositions=disabled
90+
// aip.dev/not-precedent: "to" is used to indicate interval. --)
91+
google.protobuf.Duration start_to_close_timeout = 9;
92+
93+
// Maximum permitted time between successful worker heartbeats.
94+
google.protobuf.Duration heartbeat_timeout = 10;
95+
96+
// The retry policy for the activity. Will never exceed `schedule_to_close_timeout`.
97+
temporal.api.common.v1.RetryPolicy retry_policy = 11;
98+
6999
// Details provided in the last recorded activity heartbeat.
70-
temporal.api.common.v1.Payloads heartbeat_details = 6;
100+
temporal.api.common.v1.Payloads heartbeat_details = 12;
71101
// Time the last heartbeat was recorded.
72-
google.protobuf.Timestamp last_heartbeat_time = 7;
102+
google.protobuf.Timestamp last_heartbeat_time = 13;
73103
// Time the last attempt was started.
74-
google.protobuf.Timestamp last_started_time = 8;
104+
google.protobuf.Timestamp last_started_time = 14;
75105
// The attempt this activity is currently on.
76106
// Incremented each time a new attempt is started.
77107
// TODO(dandavison): Confirm if this is on scheduled or started.
78-
int32 attempt = 9;
79-
int32 maximum_attempts = 10;
108+
int32 attempt = 15;
109+
int32 maximum_attempts = 16;
80110
// Time the activity was originally scheduled via a StartActivityExecution request.
81-
google.protobuf.Timestamp scheduled_time = 11;
111+
google.protobuf.Timestamp scheduled_time = 17;
82112
// Scheduled time + schedule to close timeout.
83-
google.protobuf.Timestamp expiration_time = 12;
113+
google.protobuf.Timestamp expiration_time = 18;
114+
// Time when the activity transitioned to a closed state.
115+
google.protobuf.Timestamp close_time = 19;
116+
84117
// Failure details from the last failed attempt.
85-
temporal.api.failure.v1.Failure last_failure = 13;
86-
string last_worker_identity = 14;
118+
temporal.api.failure.v1.Failure last_failure = 20;
119+
string last_worker_identity = 21;
87120

88121
// Time from the last attempt failure to the next activity retry.
89122
// If the activity is currently running, this represents the next retry interval in case the attempt fails.
90123
// If activity is currently backing off between attempt, this represents the current retry interval.
91124
// If there is no next retry allowed, this field will be null.
92125
// This interval is typically calculated from the specified retry policy, but may be modified if an activity fails
93126
// with a retryable application failure specifying a retry delay.
94-
google.protobuf.Duration current_retry_interval = 15;
127+
google.protobuf.Duration current_retry_interval = 22;
95128

96129
// The time when the last activity attempt completed. If activity has not been completed yet, it will be null.
97-
google.protobuf.Timestamp last_attempt_complete_time = 16;
130+
google.protobuf.Timestamp last_attempt_complete_time = 23;
98131

99132
// The time when the next activity attempt will be scheduled.
100133
// If activity is currently scheduled or started, this field will be null.
101-
google.protobuf.Timestamp next_attempt_schedule_time = 17;
134+
google.protobuf.Timestamp next_attempt_schedule_time = 24;
102135

103136
// The Worker Deployment Version this activity was dispatched to most recently.
104137
// If nil, the activity has not yet been dispatched or was last dispatched to an unversioned worker.
105-
temporal.api.deployment.v1.WorkerDeploymentVersion last_deployment_version = 18;
138+
temporal.api.deployment.v1.WorkerDeploymentVersion last_deployment_version = 25;
106139

107140
// Priority metadata.
108-
temporal.api.common.v1.Priority priority = 19;
141+
temporal.api.common.v1.Priority priority = 26;
109142

110143
// Current activity options. May be different from the one used to start the activity.
111-
temporal.api.activity.v1.ActivityOptions activity_options = 20;
144+
temporal.api.activity.v1.ActivityOptions activity_options = 27;
112145

113146
// Incremented each time the activity's state is mutated in persistence.
114-
int64 state_transition_count = 21;
147+
int64 state_transition_count = 28;
115148

116-
temporal.api.common.v1.SearchAttributes search_attributes = 22;
117-
temporal.api.common.v1.Header header = 23;
149+
temporal.api.common.v1.SearchAttributes search_attributes = 29;
150+
temporal.api.common.v1.Header header = 30;
118151
// Metadata for use by user interfaces to display the fixed as-of-start summary and details of the activity.
119-
temporal.api.sdk.v1.UserMetadata user_metadata = 24;
152+
temporal.api.sdk.v1.UserMetadata user_metadata = 31;
120153

121154
// Set if activity cancelation was requested.
122-
string canceled_reason = 25;
155+
string canceled_reason = 32;
123156
}
124157

125158
// Limited activity information returned in the list response.

temporal/api/workflowservice/v1/request_response.proto

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2844,10 +2844,12 @@ message TerminateActivityExecutionRequest {
28442844
string activity_id = 2;
28452845
// Activity run ID, targets the latest run if run_id is empty.
28462846
string run_id = 3;
2847-
// Reason for requesting the termination, recorded in in the activity's result failure outcome.
2848-
string reason = 4;
28492847
// The identity of the worker/client.
2850-
string identity = 5;
2848+
string identity = 4;
2849+
// Used to de-dupe cancellation requests.
2850+
string request_id = 5;
2851+
// Reason for requesting the termination, recorded in in the activity's result failure outcome.
2852+
string reason = 6;
28512853
}
28522854

28532855
message TerminateActivityExecutionResponse {

0 commit comments

Comments
 (0)