@temporalio/core-bridge 0.16.4 → 0.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Cargo.lock +339 -226
- package/Cargo.toml +7 -3
- package/common.js +50 -0
- package/index.d.ts +7 -0
- package/index.js +12 -0
- package/package.json +7 -4
- package/releases/aarch64-apple-darwin/index.node +0 -0
- package/releases/aarch64-unknown-linux-gnu/index.node +0 -0
- package/{index.node → releases/index.node} +0 -0
- package/releases/x86_64-apple-darwin/index.node +0 -0
- package/releases/x86_64-pc-windows-msvc/index.node +0 -0
- package/releases/x86_64-unknown-linux-gnu/index.node +0 -0
- package/scripts/build.js +10 -50
- package/sdk-core/.buildkite/docker/Dockerfile +1 -1
- package/sdk-core/.buildkite/docker/docker-compose.yaml +2 -2
- package/sdk-core/.buildkite/pipeline.yml +2 -0
- package/sdk-core/Cargo.toml +1 -88
- package/sdk-core/README.md +30 -6
- package/sdk-core/bridge-ffi/Cargo.toml +24 -0
- package/sdk-core/bridge-ffi/LICENSE.txt +23 -0
- package/sdk-core/bridge-ffi/build.rs +25 -0
- package/sdk-core/bridge-ffi/include/sdk-core-bridge.h +216 -0
- package/sdk-core/bridge-ffi/src/lib.rs +829 -0
- package/sdk-core/bridge-ffi/src/wrappers.rs +193 -0
- package/sdk-core/client/Cargo.toml +32 -0
- package/sdk-core/{src/pollers/gateway.rs → client/src/lib.rs} +101 -195
- package/sdk-core/client/src/metrics.rs +89 -0
- package/sdk-core/client/src/mocks.rs +167 -0
- package/sdk-core/{src/pollers → client/src}/retry.rs +172 -14
- package/sdk-core/core/Cargo.toml +96 -0
- package/sdk-core/{src → core/src}/core_tests/activity_tasks.rs +193 -37
- package/sdk-core/{src → core/src}/core_tests/child_workflows.rs +14 -14
- package/sdk-core/{src → core/src}/core_tests/determinism.rs +8 -8
- package/sdk-core/core/src/core_tests/local_activities.rs +328 -0
- package/sdk-core/{src → core/src}/core_tests/mod.rs +6 -9
- package/sdk-core/{src → core/src}/core_tests/queries.rs +54 -54
- package/sdk-core/{src → core/src}/core_tests/replay_flag.rs +8 -12
- package/sdk-core/{src → core/src}/core_tests/workers.rs +120 -33
- package/sdk-core/{src → core/src}/core_tests/workflow_cancels.rs +16 -26
- package/sdk-core/{src → core/src}/core_tests/workflow_tasks.rs +280 -292
- package/sdk-core/core/src/lib.rs +374 -0
- package/sdk-core/{src → core/src}/log_export.rs +3 -27
- package/sdk-core/core/src/pending_activations.rs +162 -0
- package/sdk-core/{src → core/src}/pollers/mod.rs +4 -22
- package/sdk-core/{src → core/src}/pollers/poll_buffer.rs +1 -1
- package/sdk-core/core/src/protosext/mod.rs +396 -0
- package/sdk-core/core/src/replay/mod.rs +210 -0
- package/sdk-core/core/src/retry_logic.rs +144 -0
- package/sdk-core/{src → core/src}/telemetry/metrics.rs +3 -58
- package/sdk-core/{src → core/src}/telemetry/mod.rs +8 -8
- package/sdk-core/{src → core/src}/telemetry/prometheus_server.rs +0 -0
- package/sdk-core/{src → core/src}/test_help/mod.rs +35 -83
- package/sdk-core/{src → core/src}/worker/activities/activity_heartbeat_manager.rs +95 -42
- package/sdk-core/core/src/worker/activities/local_activities.rs +973 -0
- package/sdk-core/{src → core/src}/worker/activities.rs +52 -33
- package/sdk-core/{src → core/src}/worker/dispatcher.rs +8 -6
- package/sdk-core/{src → core/src}/worker/mod.rs +347 -221
- package/sdk-core/core/src/worker/wft_delivery.rs +81 -0
- package/sdk-core/{src → core/src}/workflow/bridge.rs +5 -2
- package/sdk-core/{src → core/src}/workflow/driven_workflow.rs +17 -7
- package/sdk-core/{src → core/src}/workflow/history_update.rs +33 -7
- package/sdk-core/{src → core/src/workflow}/machines/activity_state_machine.rs +26 -26
- package/sdk-core/{src → core/src/workflow}/machines/cancel_external_state_machine.rs +8 -11
- package/sdk-core/{src → core/src/workflow}/machines/cancel_workflow_state_machine.rs +19 -21
- package/sdk-core/{src → core/src/workflow}/machines/child_workflow_state_machine.rs +20 -31
- package/sdk-core/{src → core/src/workflow}/machines/complete_workflow_state_machine.rs +3 -5
- package/sdk-core/{src → core/src/workflow}/machines/continue_as_new_workflow_state_machine.rs +18 -18
- package/sdk-core/{src → core/src/workflow}/machines/fail_workflow_state_machine.rs +5 -6
- package/sdk-core/core/src/workflow/machines/local_activity_state_machine.rs +1451 -0
- package/sdk-core/{src → core/src/workflow}/machines/mod.rs +54 -107
- package/sdk-core/{src → core/src/workflow}/machines/mutable_side_effect_state_machine.rs +0 -0
- package/sdk-core/{src → core/src/workflow}/machines/patch_state_machine.rs +29 -30
- package/sdk-core/{src → core/src/workflow}/machines/side_effect_state_machine.rs +0 -0
- package/sdk-core/{src → core/src/workflow}/machines/signal_external_state_machine.rs +17 -19
- package/sdk-core/{src → core/src/workflow}/machines/timer_state_machine.rs +20 -21
- package/sdk-core/{src → core/src/workflow}/machines/transition_coverage.rs +5 -2
- package/sdk-core/{src → core/src/workflow}/machines/upsert_search_attributes_state_machine.rs +0 -0
- package/sdk-core/core/src/workflow/machines/workflow_machines/local_acts.rs +96 -0
- package/sdk-core/{src → core/src/workflow}/machines/workflow_machines.rs +357 -171
- package/sdk-core/{src → core/src/workflow}/machines/workflow_task_state_machine.rs +1 -1
- package/sdk-core/{src → core/src}/workflow/mod.rs +200 -39
- package/sdk-core/{src → core/src}/workflow/workflow_tasks/cache_manager.rs +0 -0
- package/sdk-core/{src → core/src}/workflow/workflow_tasks/concurrency_manager.rs +38 -5
- package/sdk-core/{src → core/src}/workflow/workflow_tasks/mod.rs +317 -103
- package/sdk-core/{test_utils → core-api}/Cargo.toml +10 -7
- package/sdk-core/{src → core-api/src}/errors.rs +42 -92
- package/sdk-core/core-api/src/lib.rs +158 -0
- package/sdk-core/{src/worker/config.rs → core-api/src/worker.rs} +18 -23
- package/sdk-core/etc/deps.svg +156 -0
- package/sdk-core/fsm/rustfsm_procmacro/src/lib.rs +5 -5
- package/sdk-core/fsm/rustfsm_procmacro/tests/trybuild/no_handle_conversions_require_into_fail.stderr +3 -5
- package/sdk-core/fsm/rustfsm_trait/src/lib.rs +7 -1
- package/sdk-core/histories/fail_wf_task.bin +0 -0
- package/sdk-core/histories/timer_workflow_history.bin +0 -0
- package/sdk-core/protos/api_upstream/temporal/api/command/v1/message.proto +44 -13
- package/sdk-core/protos/api_upstream/temporal/api/common/v1/message.proto +19 -1
- package/sdk-core/protos/api_upstream/temporal/api/enums/v1/common.proto +1 -1
- package/sdk-core/protos/api_upstream/temporal/api/enums/v1/failed_cause.proto +9 -0
- package/sdk-core/protos/api_upstream/temporal/api/enums/v1/namespace.proto +1 -0
- package/sdk-core/protos/api_upstream/temporal/api/enums/v1/reset.proto +1 -0
- package/sdk-core/protos/api_upstream/temporal/api/enums/v1/task_queue.proto +13 -0
- package/sdk-core/protos/api_upstream/temporal/api/enums/v1/workflow.proto +14 -7
- package/sdk-core/protos/api_upstream/temporal/api/history/v1/message.proto +176 -18
- package/sdk-core/protos/api_upstream/temporal/api/namespace/v1/message.proto +6 -0
- package/sdk-core/protos/api_upstream/temporal/api/query/v1/message.proto +11 -0
- package/sdk-core/protos/api_upstream/temporal/api/taskqueue/v1/message.proto +3 -0
- package/sdk-core/protos/api_upstream/temporal/api/workflowservice/v1/request_response.proto +156 -7
- package/sdk-core/protos/api_upstream/temporal/api/workflowservice/v1/service.proto +135 -104
- package/sdk-core/protos/local/temporal/sdk/core/activity_result/activity_result.proto +78 -0
- package/sdk-core/protos/local/temporal/sdk/core/activity_task/activity_task.proto +78 -0
- package/sdk-core/protos/local/temporal/sdk/core/bridge/bridge.proto +205 -0
- package/sdk-core/protos/local/temporal/sdk/core/bridge/service.proto +61 -0
- package/sdk-core/protos/local/{child_workflow.proto → temporal/sdk/core/child_workflow/child_workflow.proto} +1 -1
- package/sdk-core/protos/local/{common.proto → temporal/sdk/core/common/common.proto} +5 -3
- package/sdk-core/protos/local/{core_interface.proto → temporal/sdk/core/core_interface.proto} +10 -10
- package/sdk-core/protos/local/temporal/sdk/core/external_data/external_data.proto +30 -0
- package/sdk-core/protos/local/{workflow_activation.proto → temporal/sdk/core/workflow_activation/workflow_activation.proto} +35 -11
- package/sdk-core/protos/local/{workflow_commands.proto → temporal/sdk/core/workflow_commands/workflow_commands.proto} +55 -4
- package/sdk-core/protos/local/{workflow_completion.proto → temporal/sdk/core/workflow_completion/workflow_completion.proto} +3 -3
- package/sdk-core/sdk/Cargo.toml +32 -0
- package/sdk-core/{src/prototype_rust_sdk → sdk/src}/conversions.rs +0 -0
- package/sdk-core/sdk/src/lib.rs +699 -0
- package/sdk-core/sdk/src/payload_converter.rs +11 -0
- package/sdk-core/sdk/src/workflow_context/options.rs +180 -0
- package/sdk-core/{src/prototype_rust_sdk → sdk/src}/workflow_context.rs +201 -124
- package/sdk-core/{src/prototype_rust_sdk → sdk/src}/workflow_future.rs +63 -30
- package/sdk-core/sdk-core-protos/Cargo.toml +10 -0
- package/sdk-core/sdk-core-protos/build.rs +28 -6
- package/sdk-core/sdk-core-protos/src/constants.rs +7 -0
- package/sdk-core/{src/test_help → sdk-core-protos/src}/history_builder.rs +134 -49
- package/sdk-core/sdk-core-protos/src/history_info.rs +216 -0
- package/sdk-core/sdk-core-protos/src/lib.rs +601 -168
- package/sdk-core/sdk-core-protos/src/task_token.rs +38 -0
- package/sdk-core/sdk-core-protos/src/utilities.rs +14 -0
- package/sdk-core/test-utils/Cargo.toml +32 -0
- package/sdk-core/{src/test_help → test-utils/src}/canned_histories.rs +59 -78
- package/sdk-core/test-utils/src/histfetch.rs +28 -0
- package/sdk-core/{test_utils → test-utils}/src/lib.rs +131 -68
- package/sdk-core/tests/integ_tests/client_tests.rs +1 -1
- package/sdk-core/tests/integ_tests/heartbeat_tests.rs +11 -7
- package/sdk-core/tests/integ_tests/polling_tests.rs +12 -11
- package/sdk-core/tests/integ_tests/queries_tests.rs +82 -78
- package/sdk-core/tests/integ_tests/workflow_tests/activities.rs +91 -71
- package/sdk-core/tests/integ_tests/workflow_tests/cancel_external.rs +3 -4
- package/sdk-core/tests/integ_tests/workflow_tests/cancel_wf.rs +2 -4
- package/sdk-core/tests/integ_tests/workflow_tests/child_workflows.rs +4 -6
- package/sdk-core/tests/integ_tests/workflow_tests/continue_as_new.rs +4 -6
- package/sdk-core/tests/integ_tests/workflow_tests/determinism.rs +3 -4
- package/sdk-core/tests/integ_tests/workflow_tests/local_activities.rs +496 -0
- package/sdk-core/tests/integ_tests/workflow_tests/patches.rs +5 -8
- package/sdk-core/tests/integ_tests/workflow_tests/replay.rs +125 -0
- package/sdk-core/tests/integ_tests/workflow_tests/signals.rs +7 -13
- package/sdk-core/tests/integ_tests/workflow_tests/stickyness.rs +33 -5
- package/sdk-core/tests/integ_tests/workflow_tests/timers.rs +12 -16
- package/sdk-core/tests/integ_tests/workflow_tests.rs +85 -82
- package/sdk-core/tests/load_tests.rs +6 -6
- package/sdk-core/tests/main.rs +2 -2
- package/src/conversions.rs +24 -21
- package/src/errors.rs +8 -0
- package/src/lib.rs +323 -211
- package/sdk-core/protos/local/activity_result.proto +0 -46
- package/sdk-core/protos/local/activity_task.proto +0 -66
- package/sdk-core/src/core_tests/retry.rs +0 -147
- package/sdk-core/src/lib.rs +0 -403
- package/sdk-core/src/machines/local_activity_state_machine.rs +0 -117
- package/sdk-core/src/pending_activations.rs +0 -249
- package/sdk-core/src/protosext/mod.rs +0 -160
- package/sdk-core/src/prototype_rust_sdk.rs +0 -412
- package/sdk-core/src/task_token.rs +0 -20
- package/sdk-core/src/test_help/history_info.rs +0 -157
|
@@ -111,6 +111,8 @@ message UpdateNamespaceRequest {
|
|
|
111
111
|
temporal.api.replication.v1.NamespaceReplicationConfig replication_config = 4;
|
|
112
112
|
string security_token = 5;
|
|
113
113
|
string delete_bad_binary = 6;
|
|
114
|
+
// promote local namespace to global namespace. Ignored if namespace is already global namespace.
|
|
115
|
+
bool promote_namespace = 7;
|
|
114
116
|
}
|
|
115
117
|
|
|
116
118
|
message UpdateNamespaceResponse {
|
|
@@ -121,11 +123,13 @@ message UpdateNamespaceResponse {
|
|
|
121
123
|
bool is_global_namespace = 5;
|
|
122
124
|
}
|
|
123
125
|
|
|
126
|
+
// Deprecated.
|
|
124
127
|
message DeprecateNamespaceRequest {
|
|
125
128
|
string namespace = 1;
|
|
126
129
|
string security_token = 2;
|
|
127
130
|
}
|
|
128
131
|
|
|
132
|
+
// Deprecated.
|
|
129
133
|
message DeprecateNamespaceResponse {
|
|
130
134
|
}
|
|
131
135
|
|
|
@@ -134,6 +138,7 @@ message StartWorkflowExecutionRequest {
|
|
|
134
138
|
string workflow_id = 2;
|
|
135
139
|
temporal.api.common.v1.WorkflowType workflow_type = 3;
|
|
136
140
|
temporal.api.taskqueue.v1.TaskQueue task_queue = 4;
|
|
141
|
+
// Serialized arguments to the workflow. These are passed as arguments to the workflow function.
|
|
137
142
|
temporal.api.common.v1.Payloads input = 5;
|
|
138
143
|
// Total workflow execution timeout including retries and continue as new.
|
|
139
144
|
google.protobuf.Duration workflow_execution_timeout = 6 [(gogoproto.stdduration) = true];
|
|
@@ -141,12 +146,15 @@ message StartWorkflowExecutionRequest {
|
|
|
141
146
|
google.protobuf.Duration workflow_run_timeout = 7 [(gogoproto.stdduration) = true];
|
|
142
147
|
// Timeout of a single workflow task.
|
|
143
148
|
google.protobuf.Duration workflow_task_timeout = 8 [(gogoproto.stdduration) = true];
|
|
149
|
+
// The identity of the client who initiated this request
|
|
144
150
|
string identity = 9;
|
|
151
|
+
// A unique identifier for this start request. Typically UUIDv4.
|
|
145
152
|
string request_id = 10;
|
|
146
153
|
// Default: WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE.
|
|
147
154
|
temporal.api.enums.v1.WorkflowIdReusePolicy workflow_id_reuse_policy = 11;
|
|
148
|
-
//
|
|
155
|
+
// The retry policy for the workflow. Will never exceed `workflow_execution_timeout`.
|
|
149
156
|
temporal.api.common.v1.RetryPolicy retry_policy = 12;
|
|
157
|
+
// See https://docs.temporal.io/docs/content/what-is-a-temporal-cron-job/
|
|
150
158
|
string cron_schedule = 13;
|
|
151
159
|
temporal.api.common.v1.Memo memo = 14;
|
|
152
160
|
temporal.api.common.v1.SearchAttributes search_attributes = 15;
|
|
@@ -161,8 +169,13 @@ message GetWorkflowExecutionHistoryRequest {
|
|
|
161
169
|
string namespace = 1;
|
|
162
170
|
temporal.api.common.v1.WorkflowExecution execution = 2;
|
|
163
171
|
int32 maximum_page_size = 3;
|
|
172
|
+
// If a `GetWorkflowExecutionHistoryResponse` or a `PollWorkflowTaskQueueResponse` had one of
|
|
173
|
+
// these, it should be passed here to fetch the next page.
|
|
164
174
|
bytes next_page_token = 4;
|
|
175
|
+
// If set to true, the RPC call will not resolve until there is a new event which matches
|
|
176
|
+
// the `history_event_filter_type`, or a timeout is hit.
|
|
165
177
|
bool wait_new_event = 5;
|
|
178
|
+
// Filter returned events such that they match the specified filter type.
|
|
166
179
|
// Default: HISTORY_EVENT_FILTER_TYPE_ALL_EVENT.
|
|
167
180
|
temporal.api.enums.v1.HistoryEventFilterType history_event_filter_type = 6;
|
|
168
181
|
bool skip_archival = 7;
|
|
@@ -170,7 +183,10 @@ message GetWorkflowExecutionHistoryRequest {
|
|
|
170
183
|
|
|
171
184
|
message GetWorkflowExecutionHistoryResponse {
|
|
172
185
|
temporal.api.history.v1.History history = 1;
|
|
186
|
+
// Raw history is an alternate representation of history that may be returned if configured on
|
|
187
|
+
// the frontend. This is not supported by all SDKs. Either this or `history` will be set.
|
|
173
188
|
repeated temporal.api.common.v1.DataBlob raw_history = 2;
|
|
189
|
+
// Will be set if there are more history events than were included in this response
|
|
174
190
|
bytes next_page_token = 3;
|
|
175
191
|
bool archived = 4;
|
|
176
192
|
}
|
|
@@ -178,48 +194,93 @@ message GetWorkflowExecutionHistoryResponse {
|
|
|
178
194
|
message PollWorkflowTaskQueueRequest {
|
|
179
195
|
string namespace = 1;
|
|
180
196
|
temporal.api.taskqueue.v1.TaskQueue task_queue = 2;
|
|
197
|
+
// The identity of the worker/client who is polling this task queue
|
|
181
198
|
string identity = 3;
|
|
199
|
+
// Each worker process should provide an ID unique to the specific set of code it is running
|
|
182
200
|
string binary_checksum = 4;
|
|
183
201
|
}
|
|
184
202
|
|
|
185
203
|
message PollWorkflowTaskQueueResponse {
|
|
204
|
+
// A unique identifier for this task
|
|
186
205
|
bytes task_token = 1;
|
|
187
206
|
temporal.api.common.v1.WorkflowExecution workflow_execution = 2;
|
|
188
207
|
temporal.api.common.v1.WorkflowType workflow_type = 3;
|
|
208
|
+
// The last workflow task started event which was processed by some worker for this execution.
|
|
209
|
+
// Will be zero if no task has ever started.
|
|
189
210
|
int64 previous_started_event_id = 4;
|
|
211
|
+
// The id of the most recent workflow task started event, which will have been generated as a
|
|
212
|
+
// result of this poll request being served.
|
|
190
213
|
int64 started_event_id = 5;
|
|
214
|
+
// Starting at 1, the number of attempts to complete this task by any worker.
|
|
191
215
|
int32 attempt = 6;
|
|
216
|
+
// A hint that there are more tasks already present in this task queue. Can be used to
|
|
217
|
+
// prioritize draining a sticky queue before polling from a normal queue.
|
|
192
218
|
int64 backlog_count_hint = 7;
|
|
219
|
+
// The history for this workflow, which will either be complete or partial. Partial histories
|
|
220
|
+
// are sent to workers who have signaled that they are using a sticky queue when completing
|
|
221
|
+
// a workflow task.
|
|
193
222
|
temporal.api.history.v1.History history = 8;
|
|
223
|
+
// Will be set if there are more history events than were included in this response. Such events
|
|
224
|
+
// should be fetched via `GetWorkflowExecutionHistory`.
|
|
194
225
|
bytes next_page_token = 9;
|
|
226
|
+
// Legacy queries appear in this field. The query must be responded to via
|
|
227
|
+
// `RespondQueryTaskCompleted`. If the workflow is already closed (queries are permitted on
|
|
228
|
+
// closed workflows) then the `history` field will be populated with the entire history. It
|
|
229
|
+
// may also be populated if this task originates on a non-sticky queue.
|
|
195
230
|
temporal.api.query.v1.WorkflowQuery query = 10;
|
|
231
|
+
// The task queue this task originated from, which will always be the original non-sticky name
|
|
232
|
+
// for the queue, even if this response came from polling a sticky queue.
|
|
196
233
|
temporal.api.taskqueue.v1.TaskQueue workflow_execution_task_queue = 11;
|
|
234
|
+
// When this task was scheduled by the server
|
|
197
235
|
google.protobuf.Timestamp scheduled_time = 12 [(gogoproto.stdtime) = true];
|
|
236
|
+
// When the current workflow task started event was generated, meaning the current attempt.
|
|
198
237
|
google.protobuf.Timestamp started_time = 13 [(gogoproto.stdtime) = true];
|
|
238
|
+
// Queries that should be executed after applying the history in this task. Responses should be
|
|
239
|
+
// attached to `RespondWorkflowTaskCompletedRequest::query_results`
|
|
199
240
|
map<string, temporal.api.query.v1.WorkflowQuery> queries = 14;
|
|
200
241
|
}
|
|
201
242
|
|
|
202
243
|
message RespondWorkflowTaskCompletedRequest {
|
|
244
|
+
// The task token as received in `PollWorkflowTaskQueueResponse`
|
|
203
245
|
bytes task_token = 1;
|
|
246
|
+
// A list of commands generated when driving the workflow code in response to the new task
|
|
204
247
|
repeated temporal.api.command.v1.Command commands = 2;
|
|
248
|
+
// The identity of the worker/client
|
|
205
249
|
string identity = 3;
|
|
250
|
+
// May be set by workers to indicate that the worker desires future tasks to be provided with
|
|
251
|
+
// incremental history on a sticky queue.
|
|
206
252
|
temporal.api.taskqueue.v1.StickyExecutionAttributes sticky_attributes = 4;
|
|
253
|
+
// If set, the worker wishes to immediately receive the next workflow task as a response to
|
|
254
|
+
// this completion. This can save on polling round-trips.
|
|
207
255
|
bool return_new_workflow_task = 5;
|
|
256
|
+
// Can be used to *force* creation of a new workflow task, even if no commands have resolved or
|
|
257
|
+
// one would not otherwise have been generated. This is used when the worker knows it is doing
|
|
258
|
+
// something useful, but cannot complete it within the workflow task timeout. Local activities
|
|
259
|
+
// which run for longer than the task timeout being the prime example.
|
|
208
260
|
bool force_create_new_workflow_task = 6;
|
|
261
|
+
// Worker process' unique binary id
|
|
209
262
|
string binary_checksum = 7;
|
|
263
|
+
// Responses to the `queries` field in the task being responded to
|
|
210
264
|
map<string, temporal.api.query.v1.WorkflowQueryResult> query_results = 8;
|
|
211
265
|
string namespace = 9;
|
|
212
266
|
}
|
|
213
267
|
|
|
214
268
|
message RespondWorkflowTaskCompletedResponse {
|
|
269
|
+
// See `RespondWorkflowTaskCompletedResponse::return_new_workflow_task`
|
|
215
270
|
PollWorkflowTaskQueueResponse workflow_task = 1;
|
|
216
271
|
}
|
|
217
272
|
|
|
218
273
|
message RespondWorkflowTaskFailedRequest {
|
|
274
|
+
// The task token as received in `PollWorkflowTaskQueueResponse`
|
|
219
275
|
bytes task_token = 1;
|
|
276
|
+
// Why did the task fail? It's important to note that many of the variants in this enum cannot
|
|
277
|
+
// apply to worker responses. See the type's doc for more.
|
|
220
278
|
temporal.api.enums.v1.WorkflowTaskFailedCause cause = 2;
|
|
279
|
+
// Failure details
|
|
221
280
|
temporal.api.failure.v1.Failure failure = 3;
|
|
281
|
+
// The identity of the worker/client
|
|
222
282
|
string identity = 4;
|
|
283
|
+
// Worker process' unique binary id
|
|
223
284
|
string binary_checksum = 5;
|
|
224
285
|
string namespace = 6;
|
|
225
286
|
}
|
|
@@ -230,65 +291,102 @@ message RespondWorkflowTaskFailedResponse {
|
|
|
230
291
|
message PollActivityTaskQueueRequest {
|
|
231
292
|
string namespace = 1;
|
|
232
293
|
temporal.api.taskqueue.v1.TaskQueue task_queue = 2;
|
|
294
|
+
// The identity of the worker/client
|
|
233
295
|
string identity = 3;
|
|
234
296
|
temporal.api.taskqueue.v1.TaskQueueMetadata task_queue_metadata = 4;
|
|
235
297
|
}
|
|
236
298
|
|
|
237
299
|
message PollActivityTaskQueueResponse {
|
|
300
|
+
// A unique identifier for this task
|
|
238
301
|
bytes task_token = 1;
|
|
302
|
+
// The namespace the workflow which requested this activity lives in
|
|
239
303
|
string workflow_namespace = 2;
|
|
304
|
+
// Type of the requesting workflow
|
|
240
305
|
temporal.api.common.v1.WorkflowType workflow_type = 3;
|
|
306
|
+
// Execution info of the requesting workflow
|
|
241
307
|
temporal.api.common.v1.WorkflowExecution workflow_execution = 4;
|
|
242
308
|
temporal.api.common.v1.ActivityType activity_type = 5;
|
|
309
|
+
// The autogenerated or user specified identifier of this activity. Can be used to complete the
|
|
310
|
+
// activity via `RespondActivityTaskCompletedById`. May be re-used as long as the last usage
|
|
311
|
+
// has resolved, but unique IDs for every activity invocation is a good idea.
|
|
243
312
|
string activity_id = 6;
|
|
313
|
+
// Headers specified by the scheduling workflow. Commonly used to propagate contextual info
|
|
314
|
+
// from the workflow to its activities. For example, tracing contexts.
|
|
244
315
|
temporal.api.common.v1.Header header = 7;
|
|
316
|
+
// Arguments to the activity invocation
|
|
245
317
|
temporal.api.common.v1.Payloads input = 8;
|
|
318
|
+
// Details of the last heartbeat that was recorded for this activity as of the time this task
|
|
319
|
+
// was delivered.
|
|
246
320
|
temporal.api.common.v1.Payloads heartbeat_details = 9;
|
|
321
|
+
// When was this task first scheduled
|
|
247
322
|
google.protobuf.Timestamp scheduled_time = 10 [(gogoproto.stdtime) = true];
|
|
323
|
+
// When was this task attempt scheduled
|
|
248
324
|
google.protobuf.Timestamp current_attempt_scheduled_time = 11 [(gogoproto.stdtime) = true];
|
|
325
|
+
// When was this task started (this attempt)
|
|
249
326
|
google.protobuf.Timestamp started_time = 12 [(gogoproto.stdtime) = true];
|
|
327
|
+
// Starting at 1, the number of attempts to perform this activity
|
|
250
328
|
int32 attempt = 13;
|
|
329
|
+
// First scheduled -> final result reported timeout
|
|
330
|
+
//
|
|
251
331
|
// (-- api-linter: core::0140::prepositions=disabled
|
|
252
332
|
// aip.dev/not-precedent: "to" is used to indicate interval. --)
|
|
253
333
|
google.protobuf.Duration schedule_to_close_timeout = 14 [(gogoproto.stdduration) = true];
|
|
334
|
+
// Current attempt start -> final result reported timeout
|
|
335
|
+
//
|
|
254
336
|
// (-- api-linter: core::0140::prepositions=disabled
|
|
255
337
|
// aip.dev/not-precedent: "to" is used to indicate interval. --)
|
|
256
338
|
google.protobuf.Duration start_to_close_timeout = 15 [(gogoproto.stdduration) = true];
|
|
339
|
+
// Window within which the activity must report a heartbeat, or be timed out.
|
|
257
340
|
google.protobuf.Duration heartbeat_timeout = 16 [(gogoproto.stdduration) = true];
|
|
258
|
-
// This is
|
|
259
|
-
//
|
|
260
|
-
//
|
|
261
|
-
// or exceed configured system limits.
|
|
341
|
+
// This is the retry policy the service uses which may be different from the one provided
|
|
342
|
+
// (or not) during activity scheduling. The service can override the provided one if some
|
|
343
|
+
// values are not specified or exceed configured system limits.
|
|
262
344
|
temporal.api.common.v1.RetryPolicy retry_policy = 17;
|
|
263
345
|
}
|
|
264
346
|
|
|
265
347
|
message RecordActivityTaskHeartbeatRequest {
|
|
348
|
+
// The task token as received in `PollActivityTaskQueueResponse`
|
|
266
349
|
bytes task_token = 1;
|
|
350
|
+
// Arbitrary data, of which the most recent call is kept, to store for this activity
|
|
267
351
|
temporal.api.common.v1.Payloads details = 2;
|
|
352
|
+
// The identity of the worker/client
|
|
268
353
|
string identity = 3;
|
|
269
354
|
string namespace = 4;
|
|
270
355
|
}
|
|
271
356
|
|
|
272
357
|
message RecordActivityTaskHeartbeatResponse {
|
|
358
|
+
// Will be set to true if the activity has been asked to cancel itself. The SDK should then
|
|
359
|
+
// notify the activity of cancellation if it is still running.
|
|
273
360
|
bool cancel_requested = 1;
|
|
274
361
|
}
|
|
275
362
|
|
|
276
363
|
message RecordActivityTaskHeartbeatByIdRequest {
|
|
364
|
+
// Namespace of the workflow which scheduled this activity
|
|
277
365
|
string namespace = 1;
|
|
366
|
+
// Id of the workflow which scheduled this activity
|
|
278
367
|
string workflow_id = 2;
|
|
368
|
+
// Run Id of the workflow which scheduled this activity
|
|
279
369
|
string run_id = 3;
|
|
370
|
+
// Id of the activity we're heartbeating
|
|
280
371
|
string activity_id = 4;
|
|
372
|
+
// Arbitrary data, of which the most recent call is kept, to store for this activity
|
|
281
373
|
temporal.api.common.v1.Payloads details = 5;
|
|
374
|
+
// The identity of the worker/client
|
|
282
375
|
string identity = 6;
|
|
283
376
|
}
|
|
284
377
|
|
|
285
378
|
message RecordActivityTaskHeartbeatByIdResponse {
|
|
379
|
+
// Will be set to true if the activity has been asked to cancel itself. The SDK should then
|
|
380
|
+
// notify the activity of cancellation if it is still running.
|
|
286
381
|
bool cancel_requested = 1;
|
|
287
382
|
}
|
|
288
383
|
|
|
289
384
|
message RespondActivityTaskCompletedRequest {
|
|
385
|
+
// The task token as received in `PollActivityTaskQueueResponse`
|
|
290
386
|
bytes task_token = 1;
|
|
387
|
+
// The result of successfully executing the activity
|
|
291
388
|
temporal.api.common.v1.Payloads result = 2;
|
|
389
|
+
// The identity of the worker/client
|
|
292
390
|
string identity = 3;
|
|
293
391
|
string namespace = 4;
|
|
294
392
|
}
|
|
@@ -297,11 +395,17 @@ message RespondActivityTaskCompletedResponse {
|
|
|
297
395
|
}
|
|
298
396
|
|
|
299
397
|
message RespondActivityTaskCompletedByIdRequest {
|
|
398
|
+
// Namespace of the workflow which scheduled this activity
|
|
300
399
|
string namespace = 1;
|
|
400
|
+
// Id of the workflow which scheduled this activity
|
|
301
401
|
string workflow_id = 2;
|
|
402
|
+
// Run Id of the workflow which scheduled this activity
|
|
302
403
|
string run_id = 3;
|
|
404
|
+
// Id of the activity to complete
|
|
303
405
|
string activity_id = 4;
|
|
406
|
+
// The serialized result of activity execution
|
|
304
407
|
temporal.api.common.v1.Payloads result = 5;
|
|
408
|
+
// The identity of the worker/client
|
|
305
409
|
string identity = 6;
|
|
306
410
|
}
|
|
307
411
|
|
|
@@ -309,8 +413,11 @@ message RespondActivityTaskCompletedByIdResponse {
|
|
|
309
413
|
}
|
|
310
414
|
|
|
311
415
|
message RespondActivityTaskFailedRequest {
|
|
416
|
+
// The task token as received in `PollActivityTaskQueueResponse`
|
|
312
417
|
bytes task_token = 1;
|
|
418
|
+
// Detailed failure information
|
|
313
419
|
temporal.api.failure.v1.Failure failure = 2;
|
|
420
|
+
// The identity of the worker/client
|
|
314
421
|
string identity = 3;
|
|
315
422
|
string namespace = 4;
|
|
316
423
|
}
|
|
@@ -319,11 +426,17 @@ message RespondActivityTaskFailedResponse {
|
|
|
319
426
|
}
|
|
320
427
|
|
|
321
428
|
message RespondActivityTaskFailedByIdRequest {
|
|
429
|
+
// Namespace of the workflow which scheduled this activity
|
|
322
430
|
string namespace = 1;
|
|
431
|
+
// Id of the workflow which scheduled this activity
|
|
323
432
|
string workflow_id = 2;
|
|
433
|
+
// Run Id of the workflow which scheduled this activity
|
|
324
434
|
string run_id = 3;
|
|
435
|
+
// Id of the activity to fail
|
|
325
436
|
string activity_id = 4;
|
|
437
|
+
// Detailed failure information
|
|
326
438
|
temporal.api.failure.v1.Failure failure = 5;
|
|
439
|
+
// The identity of the worker/client
|
|
327
440
|
string identity = 6;
|
|
328
441
|
}
|
|
329
442
|
|
|
@@ -331,8 +444,11 @@ message RespondActivityTaskFailedByIdResponse {
|
|
|
331
444
|
}
|
|
332
445
|
|
|
333
446
|
message RespondActivityTaskCanceledRequest {
|
|
447
|
+
// The task token as received in `PollActivityTaskQueueResponse`
|
|
334
448
|
bytes task_token = 1;
|
|
449
|
+
// Serialized additional information to attach to the cancellation
|
|
335
450
|
temporal.api.common.v1.Payloads details = 2;
|
|
451
|
+
// The identity of the worker/client
|
|
336
452
|
string identity = 3;
|
|
337
453
|
string namespace = 4;
|
|
338
454
|
}
|
|
@@ -341,11 +457,17 @@ message RespondActivityTaskCanceledResponse {
|
|
|
341
457
|
}
|
|
342
458
|
|
|
343
459
|
message RespondActivityTaskCanceledByIdRequest {
|
|
460
|
+
// Namespace of the workflow which scheduled this activity
|
|
344
461
|
string namespace = 1;
|
|
462
|
+
// Id of the workflow which scheduled this activity
|
|
345
463
|
string workflow_id = 2;
|
|
464
|
+
// Run Id of the workflow which scheduled this activity
|
|
346
465
|
string run_id = 3;
|
|
466
|
+
// Id of the activity to confirm is cancelled
|
|
347
467
|
string activity_id = 4;
|
|
468
|
+
// Serialized additional information to attach to the cancellation
|
|
348
469
|
temporal.api.common.v1.Payloads details = 5;
|
|
470
|
+
// The identity of the worker/client
|
|
349
471
|
string identity = 6;
|
|
350
472
|
}
|
|
351
473
|
|
|
@@ -355,8 +477,11 @@ message RespondActivityTaskCanceledByIdResponse {
|
|
|
355
477
|
message RequestCancelWorkflowExecutionRequest {
|
|
356
478
|
string namespace = 1;
|
|
357
479
|
temporal.api.common.v1.WorkflowExecution workflow_execution = 2;
|
|
480
|
+
// The identity of the worker/client
|
|
358
481
|
string identity = 3;
|
|
482
|
+
// Used to de-dupe cancellation requests
|
|
359
483
|
string request_id = 4;
|
|
484
|
+
// Should be removed. Appears unused.
|
|
360
485
|
string first_execution_run_id = 5;
|
|
361
486
|
}
|
|
362
487
|
|
|
@@ -366,11 +491,19 @@ message RequestCancelWorkflowExecutionResponse {
|
|
|
366
491
|
message SignalWorkflowExecutionRequest {
|
|
367
492
|
string namespace = 1;
|
|
368
493
|
temporal.api.common.v1.WorkflowExecution workflow_execution = 2;
|
|
494
|
+
// The workflow author-defined name of the signal to send to the workflow
|
|
369
495
|
string signal_name = 3;
|
|
496
|
+
// Serialized value(s) to provide with the signal
|
|
370
497
|
temporal.api.common.v1.Payloads input = 4;
|
|
498
|
+
// The identity of the worker/client
|
|
371
499
|
string identity = 5;
|
|
500
|
+
// Used to de-dupe sent signals
|
|
372
501
|
string request_id = 6;
|
|
502
|
+
// Deprecated
|
|
373
503
|
string control = 7;
|
|
504
|
+
// Headers that are passed with the signal to the processing workflow.
|
|
505
|
+
// These can include things like auth or tracing tokens.
|
|
506
|
+
temporal.api.common.v1.Header header = 8;
|
|
374
507
|
}
|
|
375
508
|
|
|
376
509
|
message SignalWorkflowExecutionResponse {
|
|
@@ -380,7 +513,9 @@ message SignalWithStartWorkflowExecutionRequest {
|
|
|
380
513
|
string namespace = 1;
|
|
381
514
|
string workflow_id = 2;
|
|
382
515
|
temporal.api.common.v1.WorkflowType workflow_type = 3;
|
|
516
|
+
// The task queue to start this workflow on, if it will be started
|
|
383
517
|
temporal.api.taskqueue.v1.TaskQueue task_queue = 4;
|
|
518
|
+
// Serialized arguments to the workflow. These are passed as arguments to the workflow function.
|
|
384
519
|
temporal.api.common.v1.Payloads input = 5;
|
|
385
520
|
// Total workflow execution timeout including retries and continue as new
|
|
386
521
|
google.protobuf.Duration workflow_execution_timeout = 6 [(gogoproto.stdduration) = true];
|
|
@@ -388,14 +523,20 @@ message SignalWithStartWorkflowExecutionRequest {
|
|
|
388
523
|
google.protobuf.Duration workflow_run_timeout = 7 [(gogoproto.stdduration) = true];
|
|
389
524
|
// Timeout of a single workflow task
|
|
390
525
|
google.protobuf.Duration workflow_task_timeout = 8 [(gogoproto.stdduration) = true];
|
|
526
|
+
// The identity of the worker/client
|
|
391
527
|
string identity = 9;
|
|
528
|
+
// Used to de-dupe signal w/ start requests
|
|
392
529
|
string request_id = 10;
|
|
393
530
|
temporal.api.enums.v1.WorkflowIdReusePolicy workflow_id_reuse_policy = 11;
|
|
531
|
+
// The workflow author-defined name of the signal to send to the workflow
|
|
394
532
|
string signal_name = 12;
|
|
533
|
+
// Serialized value(s) to provide with the signal
|
|
395
534
|
temporal.api.common.v1.Payloads signal_input = 13;
|
|
535
|
+
// Deprecated
|
|
396
536
|
string control = 14;
|
|
397
|
-
// Default: WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE.
|
|
537
|
+
// Retry policy for the workflow Default: WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE.
|
|
398
538
|
temporal.api.common.v1.RetryPolicy retry_policy = 15;
|
|
539
|
+
// See https://docs.temporal.io/docs/content/what-is-a-temporal-cron-job/
|
|
399
540
|
string cron_schedule = 16;
|
|
400
541
|
temporal.api.common.v1.Memo memo = 17;
|
|
401
542
|
temporal.api.common.v1.SearchAttributes search_attributes = 18;
|
|
@@ -410,8 +551,12 @@ message ResetWorkflowExecutionRequest {
|
|
|
410
551
|
string namespace = 1;
|
|
411
552
|
temporal.api.common.v1.WorkflowExecution workflow_execution = 2;
|
|
412
553
|
string reason = 3;
|
|
554
|
+
// The id of a `WORKFLOW_TASK_COMPLETED`,`WORKFLOW_TASK_TIMED_OUT`, `WORKFLOW_TASK_FAILED`, or
|
|
555
|
+
// `WORKFLOW_TASK_STARTED` event to reset to.
|
|
413
556
|
int64 workflow_task_finish_event_id = 4;
|
|
557
|
+
// Used to de-dupe reset requests
|
|
414
558
|
string request_id = 5;
|
|
559
|
+
// Should be removed. Appears unused.
|
|
415
560
|
temporal.api.enums.v1.ResetReapplyType reset_reapply_type = 6;
|
|
416
561
|
}
|
|
417
562
|
|
|
@@ -423,8 +568,11 @@ message TerminateWorkflowExecutionRequest {
|
|
|
423
568
|
string namespace = 1;
|
|
424
569
|
temporal.api.common.v1.WorkflowExecution workflow_execution = 2;
|
|
425
570
|
string reason = 3;
|
|
571
|
+
// Serialized additional information to attach to the termination event
|
|
426
572
|
temporal.api.common.v1.Payloads details = 4;
|
|
573
|
+
// The identity of the worker/client
|
|
427
574
|
string identity = 5;
|
|
575
|
+
// Should be removed. Appears unused.
|
|
428
576
|
string first_execution_run_id = 6;
|
|
429
577
|
}
|
|
430
578
|
|
|
@@ -516,7 +664,6 @@ message GetSearchAttributesResponse {
|
|
|
516
664
|
map<string, temporal.api.enums.v1.IndexedValueType> keys = 1;
|
|
517
665
|
}
|
|
518
666
|
|
|
519
|
-
// TODO: deprecated APIs
|
|
520
667
|
message RespondQueryTaskCompletedRequest {
|
|
521
668
|
bytes task_token = 1;
|
|
522
669
|
temporal.api.enums.v1.QueryResultType completed_type = 2;
|
|
@@ -588,6 +735,8 @@ message GetClusterInfoResponse {
|
|
|
588
735
|
temporal.api.version.v1.VersionInfo version_info = 4;
|
|
589
736
|
string cluster_name = 5;
|
|
590
737
|
int32 history_shard_count = 6;
|
|
738
|
+
string persistence_store = 7;
|
|
739
|
+
string visibility_store = 8;
|
|
591
740
|
}
|
|
592
741
|
|
|
593
742
|
message ListTaskQueuePartitionsRequest {
|