Skip to content

Commit b16c5d9

Browse files
bergundydandavison
authored andcommitted
[Standalone activity] Cleanup for pre-release scope (#674)
NOTE the base branch is **not master**, it's standalone-activity.
1 parent e5811d5 commit b16c5d9

File tree

7 files changed

+449
-3150
lines changed

7 files changed

+449
-3150
lines changed

openapi/openapiv2.json

Lines changed: 273 additions & 1320 deletions
Large diffs are not rendered by default.

openapi/openapiv3.yaml

Lines changed: 152 additions & 1424 deletions
Large diffs are not rendered by default.

temporal/api/activity/v1/message.proto

Lines changed: 3 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,6 @@ import "temporal/api/failure/v1/message.proto";
2020
import "temporal/api/taskqueue/v1/message.proto";
2121
import "temporal/api/sdk/v1/user_metadata.proto";
2222

23-
// When StartActivityExecution uses the ACTIVITY_ID_CONFLICT_POLICY_USE_EXISTING and there is already an existing running
24-
// activity, OnConflictOptions defines actions to be taken on the existing running activity, updating its state.
25-
message OnConflictOptions {
26-
// Attaches the request ID to the running activity.
27-
bool attach_request_id = 1;
28-
// Attaches the completion callbacks to the running activity.
29-
bool attach_completion_callbacks = 2;
30-
// Attaches the links to the running activity.
31-
bool attach_links = 3;
32-
}
33-
3423
message ActivityOptions {
3524
temporal.api.taskqueue.v1.TaskQueue task_queue = 1;
3625

@@ -85,7 +74,7 @@ message ActivityExecutionInfo {
8574
google.protobuf.Timestamp last_started_time = 8;
8675
// The attempt this activity is currently on.
8776
// Incremented each time a new attempt is started.
88-
// TODO: Confirm if this is on scheduled or started.
77+
// TODO(dandavison): Confirm if this is on scheduled or started.
8978
int32 attempt = 9;
9079
int32 maximum_attempts = 10;
9180
// Time the activity was originally scheduled via a StartActivityExecution request.
@@ -126,40 +115,11 @@ message ActivityExecutionInfo {
126115

127116
temporal.api.common.v1.SearchAttributes search_attributes = 22;
128117
temporal.api.common.v1.Header header = 23;
129-
// Whether the activity was started with a request_eager_execution flag set to `true`, indicating that the first
130-
// task was delivered inline in the start response, bypassing matching.
131-
bool eager_execution_requested = 24;
132-
133-
// Callbacks to be called by the server when this activity reaches a terminal status.
134-
// Callback addresses must be whitelisted in the server's dynamic configuration.
135-
repeated temporal.api.common.v1.Callback completion_callbacks = 25;
136118
// Metadata for use by user interfaces to display the fixed as-of-start summary and details of the activity.
137-
temporal.api.sdk.v1.UserMetadata user_metadata = 26;
138-
// Links to be associated with the activity.
139-
repeated temporal.api.common.v1.Link links = 27;
119+
temporal.api.sdk.v1.UserMetadata user_metadata = 24;
140120

141121
// Set if activity cancelation was requested.
142-
string canceled_reason = 28;
143-
144-
// TODO: Move this to a common package?
145-
message PauseInfo {
146-
// The time when the activity was paused.
147-
google.protobuf.Timestamp pause_time = 1;
148-
149-
message Manual {
150-
// The identity of the actor that paused the activity.
151-
string identity = 1;
152-
// Reason for pausing the activity.
153-
string reason = 2;
154-
}
155-
156-
oneof paused_by {
157-
// The activity was paused by direct API invocation.
158-
Manual manual = 2;
159-
}
160-
}
161-
162-
PauseInfo pause_info = 29;
122+
string canceled_reason = 25;
163123
}
164124

165125
// Limited activity information returned in the list response.
@@ -197,6 +157,4 @@ message ActivityExecutionListInfo {
197157
// The difference between close time and scheduled time.
198158
// This field is only populated if the activity is closed.
199159
google.protobuf.Duration execution_duration = 12;
200-
201-
// TODO: pause_info
202160
}

temporal/api/enums/v1/activity.proto

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,4 @@ enum ActivityIdConflictPolicy {
6565
ACTIVITY_ID_CONFLICT_POLICY_FAIL = 1;
6666
// Don't start a new activity; instead return a handle for the running activity.
6767
ACTIVITY_ID_CONFLICT_POLICY_USE_EXISTING = 2;
68-
// Terminate the running activity before starting a new one.
69-
ACTIVITY_ID_CONFLICT_POLICY_TERMINATE_EXISTING = 3;
7068
}

temporal/api/errordetails/v1/message.proto

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,3 +121,11 @@ message MultiOperationExecutionFailure {
121121
repeated google.protobuf.Any details = 3;
122122
}
123123
}
124+
125+
// An error indicating that an activity execution failed to start. Returned when there is an existing activity with the
126+
// given activity ID, and the given ID reuse and conflict policies do not permit starting a new one or attaching to an
127+
// existing one.
128+
message ActivityExecutionAlreadyStartedFailure {
129+
string start_request_id = 1;
130+
string run_id = 2;
131+
}

0 commit comments

Comments
 (0)