@temporalio/core-bridge 1.11.8 → 1.12.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 +219 -193
- package/Cargo.toml +27 -8
- package/README.md +5 -0
- package/index.js +72 -12
- package/lib/errors.d.ts +25 -0
- package/lib/errors.js +76 -1
- package/lib/errors.js.map +1 -1
- package/lib/index.d.ts +11 -478
- package/lib/index.js +28 -5
- package/lib/index.js.map +1 -1
- package/lib/native.d.ts +330 -0
- package/lib/{worker-tuner.js → native.js} +1 -1
- package/lib/native.js.map +1 -0
- package/package.json +7 -3
- package/releases/aarch64-apple-darwin/index.node +0 -0
- package/releases/aarch64-unknown-linux-gnu/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/sdk-core/.cargo/config.toml +8 -2
- package/sdk-core/.cargo/multi-worker-manual-test +15 -0
- package/sdk-core/.github/workflows/per-pr.yml +40 -11
- package/sdk-core/AGENTS.md +73 -0
- package/sdk-core/ARCHITECTURE.md +71 -23
- package/sdk-core/Cargo.toml +1 -1
- package/sdk-core/README.md +4 -4
- package/sdk-core/arch_docs/workflow_task_chunking.md +51 -0
- package/sdk-core/client/Cargo.toml +1 -1
- package/sdk-core/client/src/lib.rs +49 -13
- package/sdk-core/client/src/metrics.rs +15 -16
- package/sdk-core/client/src/proxy.rs +2 -2
- package/sdk-core/client/src/raw.rs +54 -8
- package/sdk-core/client/src/retry.rs +109 -13
- package/sdk-core/client/src/worker_registry/mod.rs +4 -4
- package/sdk-core/client/src/workflow_handle/mod.rs +1 -1
- package/sdk-core/core/Cargo.toml +28 -8
- package/sdk-core/core/src/abstractions.rs +62 -10
- package/sdk-core/core/src/core_tests/activity_tasks.rs +180 -8
- package/sdk-core/core/src/core_tests/mod.rs +4 -4
- package/sdk-core/core/src/core_tests/queries.rs +18 -4
- package/sdk-core/core/src/core_tests/workers.rs +3 -3
- package/sdk-core/core/src/core_tests/workflow_tasks.rs +191 -25
- package/sdk-core/core/src/ephemeral_server/mod.rs +10 -3
- package/sdk-core/core/src/internal_flags.rs +14 -14
- package/sdk-core/core/src/lib.rs +5 -2
- package/sdk-core/core/src/pollers/mod.rs +1 -1
- package/sdk-core/core/src/pollers/poll_buffer.rs +495 -164
- package/sdk-core/core/src/protosext/mod.rs +3 -3
- package/sdk-core/core/src/replay/mod.rs +3 -3
- package/sdk-core/core/src/telemetry/metrics.rs +13 -4
- package/sdk-core/core/src/telemetry/mod.rs +72 -70
- package/sdk-core/core/src/telemetry/otel.rs +51 -54
- package/sdk-core/core/src/test_help/mod.rs +9 -3
- package/sdk-core/core/src/worker/activities/activity_heartbeat_manager.rs +31 -11
- package/sdk-core/core/src/worker/activities/local_activities.rs +35 -28
- package/sdk-core/core/src/worker/activities.rs +58 -30
- package/sdk-core/core/src/worker/client/mocks.rs +3 -3
- package/sdk-core/core/src/worker/client.rs +155 -53
- package/sdk-core/core/src/worker/mod.rs +103 -95
- package/sdk-core/core/src/worker/nexus.rs +100 -73
- package/sdk-core/core/src/worker/tuner/resource_based.rs +14 -6
- package/sdk-core/core/src/worker/tuner.rs +4 -13
- package/sdk-core/core/src/worker/workflow/history_update.rs +47 -51
- package/sdk-core/core/src/worker/workflow/machines/child_workflow_state_machine.rs +1 -4
- package/sdk-core/core/src/worker/workflow/machines/nexus_operation_state_machine.rs +127 -32
- package/sdk-core/core/src/worker/workflow/machines/transition_coverage.rs +1 -2
- package/sdk-core/core/src/worker/workflow/machines/update_state_machine.rs +1 -1
- package/sdk-core/core/src/worker/workflow/machines/workflow_machines.rs +55 -42
- package/sdk-core/core/src/worker/workflow/managed_run.rs +45 -35
- package/sdk-core/core/src/worker/workflow/mod.rs +200 -97
- package/sdk-core/core/src/worker/workflow/wft_poller.rs +175 -4
- package/sdk-core/core/src/worker/workflow/workflow_stream.rs +38 -36
- package/sdk-core/core-api/Cargo.toml +8 -0
- package/sdk-core/core-api/src/envconfig.rs +1544 -0
- package/sdk-core/core-api/src/lib.rs +2 -0
- package/sdk-core/core-api/src/telemetry/metrics.rs +8 -0
- package/sdk-core/core-api/src/telemetry.rs +36 -3
- package/sdk-core/core-api/src/worker.rs +301 -75
- package/sdk-core/docker/docker-compose-telem.yaml +1 -0
- package/sdk-core/etc/prometheus.yaml +6 -2
- package/sdk-core/histories/long_local_activity_with_update-0_history.bin +0 -0
- package/sdk-core/histories/long_local_activity_with_update-1_history.bin +0 -0
- package/sdk-core/histories/long_local_activity_with_update-2_history.bin +0 -0
- package/sdk-core/histories/long_local_activity_with_update-3_history.bin +0 -0
- package/sdk-core/sdk/src/activity_context.rs +5 -0
- package/sdk-core/sdk/src/interceptors.rs +73 -3
- package/sdk-core/sdk/src/lib.rs +15 -16
- package/sdk-core/sdk/src/workflow_context/options.rs +10 -0
- package/sdk-core/sdk/src/workflow_context.rs +48 -29
- package/sdk-core/sdk/src/workflow_future.rs +5 -6
- package/sdk-core/sdk-core-protos/protos/api_cloud_upstream/.github/workflows/push-to-buf.yml +20 -0
- package/sdk-core/sdk-core-protos/protos/api_cloud_upstream/CODEOWNERS +6 -0
- package/sdk-core/sdk-core-protos/protos/api_cloud_upstream/README.md +17 -6
- package/sdk-core/sdk-core-protos/protos/api_cloud_upstream/VERSION +1 -1
- package/sdk-core/sdk-core-protos/protos/api_cloud_upstream/buf.lock +7 -2
- package/sdk-core/sdk-core-protos/protos/api_cloud_upstream/buf.yaml +2 -0
- package/sdk-core/sdk-core-protos/protos/api_cloud_upstream/temporal/api/cloud/cloudservice/v1/request_response.proto +78 -0
- package/sdk-core/sdk-core-protos/protos/api_cloud_upstream/temporal/api/cloud/cloudservice/v1/service.proto +29 -0
- package/sdk-core/sdk-core-protos/protos/api_cloud_upstream/temporal/api/cloud/identity/v1/message.proto +74 -32
- package/sdk-core/sdk-core-protos/protos/api_cloud_upstream/temporal/api/cloud/namespace/v1/message.proto +45 -15
- package/sdk-core/sdk-core-protos/protos/api_cloud_upstream/temporal/api/cloud/nexus/v1/message.proto +7 -1
- package/sdk-core/sdk-core-protos/protos/api_cloud_upstream/temporal/api/cloud/operation/v1/message.proto +3 -3
- package/sdk-core/sdk-core-protos/protos/api_cloud_upstream/temporal/api/cloud/region/v1/message.proto +3 -3
- package/sdk-core/sdk-core-protos/protos/api_upstream/LICENSE +1 -1
- package/sdk-core/sdk-core-protos/protos/api_upstream/buf.yaml +2 -0
- package/sdk-core/sdk-core-protos/protos/api_upstream/openapi/openapiv2.json +1103 -88
- package/sdk-core/sdk-core-protos/protos/api_upstream/openapi/openapiv3.yaml +1233 -151
- package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/activity/v1/message.proto +0 -22
- package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/batch/v1/message.proto +19 -24
- package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/command/v1/message.proto +0 -22
- package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/common/v1/message.proto +12 -22
- package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/deployment/v1/message.proto +45 -45
- package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/enums/v1/batch_operation.proto +0 -22
- package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/enums/v1/command_type.proto +0 -22
- package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/enums/v1/common.proto +15 -22
- package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/enums/v1/deployment.proto +0 -22
- package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/enums/v1/event_type.proto +4 -22
- package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/enums/v1/failed_cause.proto +0 -22
- package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/enums/v1/namespace.proto +0 -22
- package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/enums/v1/nexus.proto +0 -20
- package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/enums/v1/query.proto +0 -22
- package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/enums/v1/reset.proto +0 -22
- package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/enums/v1/schedule.proto +0 -22
- package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/enums/v1/task_queue.proto +0 -22
- package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/enums/v1/update.proto +0 -22
- package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/enums/v1/workflow.proto +4 -22
- package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/errordetails/v1/message.proto +0 -22
- package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/export/v1/message.proto +0 -22
- package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/failure/v1/message.proto +2 -22
- package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/filter/v1/message.proto +0 -22
- package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/history/v1/message.proto +75 -49
- package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/namespace/v1/message.proto +0 -22
- package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/nexus/v1/message.proto +0 -20
- package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/operatorservice/v1/request_response.proto +0 -22
- package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/operatorservice/v1/service.proto +0 -22
- package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/protocol/v1/message.proto +0 -22
- package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/query/v1/message.proto +0 -22
- package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/replication/v1/message.proto +0 -22
- package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/rules/v1/message.proto +90 -0
- package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/schedule/v1/message.proto +0 -22
- package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/sdk/v1/enhanced_stack_trace.proto +0 -22
- package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/sdk/v1/task_complete_metadata.proto +0 -22
- package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/sdk/v1/user_metadata.proto +0 -22
- package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/sdk/v1/workflow_metadata.proto +0 -22
- package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/taskqueue/v1/message.proto +17 -38
- package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/update/v1/message.proto +0 -22
- package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/version/v1/message.proto +0 -22
- package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/workflow/v1/message.proto +151 -44
- package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/workflowservice/v1/request_response.proto +172 -65
- package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/workflowservice/v1/service.proto +69 -28
- package/sdk-core/sdk-core-protos/protos/local/temporal/sdk/core/activity_task/activity_task.proto +18 -0
- package/sdk-core/sdk-core-protos/protos/local/temporal/sdk/core/common/common.proto +5 -0
- package/sdk-core/sdk-core-protos/protos/local/temporal/sdk/core/nexus/nexus.proto +16 -1
- package/sdk-core/sdk-core-protos/protos/local/temporal/sdk/core/workflow_activation/workflow_activation.proto +21 -15
- package/sdk-core/sdk-core-protos/protos/local/temporal/sdk/core/workflow_commands/workflow_commands.proto +3 -0
- package/sdk-core/sdk-core-protos/protos/local/temporal/sdk/core/workflow_completion/workflow_completion.proto +3 -0
- package/sdk-core/sdk-core-protos/src/lib.rs +60 -16
- package/sdk-core/test-utils/src/lib.rs +157 -39
- package/sdk-core/tests/cloud_tests.rs +86 -0
- package/sdk-core/tests/fuzzy_workflow.rs +23 -26
- package/sdk-core/tests/global_metric_tests.rs +116 -0
- package/sdk-core/tests/heavy_tests.rs +127 -7
- package/sdk-core/tests/integ_tests/client_tests.rs +2 -8
- package/sdk-core/tests/integ_tests/metrics_tests.rs +100 -106
- package/sdk-core/tests/integ_tests/polling_tests.rs +94 -8
- package/sdk-core/tests/integ_tests/update_tests.rs +75 -6
- package/sdk-core/tests/integ_tests/worker_tests.rs +54 -5
- package/sdk-core/tests/integ_tests/worker_versioning_tests.rs +240 -0
- package/sdk-core/tests/integ_tests/workflow_tests/determinism.rs +41 -3
- package/sdk-core/tests/integ_tests/workflow_tests/local_activities.rs +168 -8
- package/sdk-core/tests/integ_tests/workflow_tests/nexus.rs +285 -15
- package/sdk-core/tests/integ_tests/workflow_tests/priority.rs +12 -4
- package/sdk-core/tests/integ_tests/workflow_tests/stickyness.rs +3 -2
- package/sdk-core/tests/integ_tests/workflow_tests.rs +124 -74
- package/sdk-core/tests/main.rs +3 -51
- package/sdk-core/tests/manual_tests.rs +430 -0
- package/sdk-core/tests/runner.rs +28 -2
- package/src/client.rs +565 -0
- package/src/helpers/abort_controller.rs +204 -0
- package/src/helpers/callbacks.rs +299 -0
- package/src/helpers/errors.rs +302 -0
- package/src/helpers/future.rs +44 -0
- package/src/helpers/handles.rs +191 -0
- package/src/helpers/inspect.rs +18 -0
- package/src/helpers/json_string.rs +58 -0
- package/src/helpers/mod.rs +20 -0
- package/src/helpers/properties.rs +71 -0
- package/src/helpers/try_from_js.rs +213 -0
- package/src/helpers/try_into_js.rs +129 -0
- package/src/lib.rs +28 -40
- package/src/logs.rs +111 -0
- package/src/metrics.rs +325 -0
- package/src/runtime.rs +409 -498
- package/src/testing.rs +315 -57
- package/src/worker.rs +907 -378
- package/ts/errors.ts +57 -0
- package/ts/index.ts +10 -596
- package/ts/native.ts +496 -0
- package/lib/worker-tuner.d.ts +0 -167
- package/lib/worker-tuner.js.map +0 -1
- package/src/conversions/slot_supplier_bridge.rs +0 -291
- package/src/conversions.rs +0 -618
- package/src/errors.rs +0 -38
- package/src/helpers.rs +0 -297
- package/ts/worker-tuner.ts +0 -193
|
@@ -1,25 +1,3 @@
|
|
|
1
|
-
// The MIT License
|
|
2
|
-
//
|
|
3
|
-
// Copyright (c) 2020 Temporal Technologies Inc. All rights reserved.
|
|
4
|
-
//
|
|
5
|
-
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
// of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
// in the Software without restriction, including without limitation the rights
|
|
8
|
-
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
// copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
// furnished to do so, subject to the following conditions:
|
|
11
|
-
//
|
|
12
|
-
// The above copyright notice and this permission notice shall be included in
|
|
13
|
-
// all copies or substantial portions of the Software.
|
|
14
|
-
//
|
|
15
|
-
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
-
// THE SOFTWARE.
|
|
22
|
-
|
|
23
1
|
syntax = "proto3";
|
|
24
2
|
|
|
25
3
|
package temporal.api.workflowservice.v1;
|
|
@@ -53,6 +31,7 @@ import "temporal/api/protocol/v1/message.proto";
|
|
|
53
31
|
import "temporal/api/namespace/v1/message.proto";
|
|
54
32
|
import "temporal/api/query/v1/message.proto";
|
|
55
33
|
import "temporal/api/replication/v1/message.proto";
|
|
34
|
+
import "temporal/api/rules/v1/message.proto";
|
|
56
35
|
import "temporal/api/schedule/v1/message.proto";
|
|
57
36
|
import "temporal/api/taskqueue/v1/message.proto";
|
|
58
37
|
import "temporal/api/update/v1/message.proto";
|
|
@@ -220,10 +199,15 @@ message StartWorkflowExecutionResponse {
|
|
|
220
199
|
string run_id = 1;
|
|
221
200
|
// If true, a new workflow was started.
|
|
222
201
|
bool started = 3;
|
|
202
|
+
// Current execution status of the workflow. Typically remains WORKFLOW_EXECUTION_STATUS_RUNNING
|
|
203
|
+
// unless a de-dupe occurs or in specific scenarios handled within the ExecuteMultiOperation (refer to its docs).
|
|
204
|
+
temporal.api.enums.v1.WorkflowExecutionStatus status = 5;
|
|
223
205
|
// When `request_eager_execution` is set on the `StartWorkflowExecutionRequest`, the server - if supported - will
|
|
224
206
|
// return the first workflow task to be eagerly executed.
|
|
225
207
|
// The caller is expected to have a worker available to process the task.
|
|
226
208
|
PollWorkflowTaskQueueResponse eager_workflow_task = 2;
|
|
209
|
+
// Link to the workflow event.
|
|
210
|
+
temporal.api.common.v1.Link link = 4;
|
|
227
211
|
}
|
|
228
212
|
|
|
229
213
|
message GetWorkflowExecutionHistoryRequest {
|
|
@@ -270,10 +254,10 @@ message PollWorkflowTaskQueueRequest {
|
|
|
270
254
|
temporal.api.taskqueue.v1.TaskQueue task_queue = 2;
|
|
271
255
|
// The identity of the worker/client who is polling this task queue
|
|
272
256
|
string identity = 3;
|
|
273
|
-
// DEPRECATED since 1.21 - use `
|
|
257
|
+
// DEPRECATED since 1.21 - use `deployment_options` instead.
|
|
274
258
|
// Each worker process should provide an ID unique to the specific set of code it is running
|
|
275
259
|
// "checksum" in this field name isn't very accurate, it should be though of as an id.
|
|
276
|
-
string binary_checksum = 4;
|
|
260
|
+
string binary_checksum = 4 [deprecated = true];
|
|
277
261
|
// Information about this worker's build identifier and if it is choosing to use the versioning
|
|
278
262
|
// feature. See the `WorkerVersionCapabilities` docstring for more.
|
|
279
263
|
// Deprecated. Replaced by deployment_options.
|
|
@@ -355,16 +339,16 @@ message RespondWorkflowTaskCompletedRequest {
|
|
|
355
339
|
// something useful, but cannot complete it within the workflow task timeout. Local activities
|
|
356
340
|
// which run for longer than the task timeout being the prime example.
|
|
357
341
|
bool force_create_new_workflow_task = 6;
|
|
358
|
-
// DEPRECATED since 1.21 - use `
|
|
342
|
+
// DEPRECATED since 1.21 - use `deployment_options` instead.
|
|
359
343
|
// Worker process' unique binary id
|
|
360
|
-
string binary_checksum = 7;
|
|
344
|
+
string binary_checksum = 7 [deprecated = true];
|
|
361
345
|
// Responses to the `queries` field in the task being responded to
|
|
362
346
|
map<string, temporal.api.query.v1.WorkflowQueryResult> query_results = 8;
|
|
363
347
|
string namespace = 9;
|
|
364
348
|
// Version info of the worker who processed this task. This message's `build_id` field should
|
|
365
349
|
// always be set by SDKs. Workers opting into versioning will also set the `use_versioning`
|
|
366
350
|
// field to true. See message docstrings for more.
|
|
367
|
-
// Deprecated. Use `
|
|
351
|
+
// Deprecated. Use `deployment_options` and `versioning_behavior` instead.
|
|
368
352
|
temporal.api.common.v1.WorkerVersionStamp worker_version_stamp = 10 [deprecated = true];
|
|
369
353
|
// Protocol messages piggybacking on a WFT as a transport
|
|
370
354
|
repeated temporal.api.protocol.v1.Message messages = 11;
|
|
@@ -418,21 +402,21 @@ message RespondWorkflowTaskFailedRequest {
|
|
|
418
402
|
temporal.api.failure.v1.Failure failure = 3;
|
|
419
403
|
// The identity of the worker/client
|
|
420
404
|
string identity = 4;
|
|
421
|
-
// DEPRECATED since 1.21 - use `
|
|
405
|
+
// DEPRECATED since 1.21 - use `deployment_options` instead.
|
|
422
406
|
// Worker process' unique binary id
|
|
423
|
-
string binary_checksum = 5;
|
|
407
|
+
string binary_checksum = 5 [deprecated = true];
|
|
424
408
|
string namespace = 6;
|
|
425
409
|
// Protocol messages piggybacking on a WFT as a transport
|
|
426
410
|
repeated temporal.api.protocol.v1.Message messages = 7;
|
|
427
411
|
// Version info of the worker who processed this task. This message's `build_id` field should
|
|
428
412
|
// always be set by SDKs. Workers opting into versioning will also set the `use_versioning`
|
|
429
413
|
// field to true. See message docstrings for more.
|
|
430
|
-
// Deprecated. Use `
|
|
414
|
+
// Deprecated. Use `deployment_options` instead.
|
|
431
415
|
temporal.api.common.v1.WorkerVersionStamp worker_version = 8 [deprecated = true];
|
|
432
416
|
// Deployment info of the worker that completed this task. Must be present if user has set
|
|
433
417
|
// `WorkerDeploymentOptions` regardless of versioning being enabled or not.
|
|
434
418
|
// Deprecated. Replaced with `deployment_options`.
|
|
435
|
-
temporal.api.deployment.v1.Deployment deployment = 9;
|
|
419
|
+
temporal.api.deployment.v1.Deployment deployment = 9 [deprecated = true];
|
|
436
420
|
// Worker deployment options that user has set in the worker.
|
|
437
421
|
temporal.api.deployment.v1.WorkerDeploymentOptions deployment_options = 10;
|
|
438
422
|
}
|
|
@@ -523,6 +507,10 @@ message RecordActivityTaskHeartbeatResponse {
|
|
|
523
507
|
|
|
524
508
|
// Will be set to true if the activity is paused.
|
|
525
509
|
bool activity_paused = 2;
|
|
510
|
+
|
|
511
|
+
// Will be set to true if the activity was reset.
|
|
512
|
+
// Applies only to the current run.
|
|
513
|
+
bool activity_reset = 3;
|
|
526
514
|
}
|
|
527
515
|
|
|
528
516
|
message RecordActivityTaskHeartbeatByIdRequest {
|
|
@@ -547,6 +535,10 @@ message RecordActivityTaskHeartbeatByIdResponse {
|
|
|
547
535
|
|
|
548
536
|
// Will be set to true if the activity is paused.
|
|
549
537
|
bool activity_paused = 2;
|
|
538
|
+
|
|
539
|
+
// Will be set to true if the activity was reset.
|
|
540
|
+
// Applies only to the current run.
|
|
541
|
+
bool activity_reset = 3;
|
|
550
542
|
}
|
|
551
543
|
|
|
552
544
|
message RespondActivityTaskCompletedRequest {
|
|
@@ -560,7 +552,7 @@ message RespondActivityTaskCompletedRequest {
|
|
|
560
552
|
// Version info of the worker who processed this task. This message's `build_id` field should
|
|
561
553
|
// always be set by SDKs. Workers opting into versioning will also set the `use_versioning`
|
|
562
554
|
// field to true. See message docstrings for more.
|
|
563
|
-
// Deprecated. Use `
|
|
555
|
+
// Deprecated. Use `deployment_options` instead.
|
|
564
556
|
temporal.api.common.v1.WorkerVersionStamp worker_version = 5 [deprecated = true];
|
|
565
557
|
// Deployment info of the worker that completed this task. Must be present if user has set
|
|
566
558
|
// `WorkerDeploymentOptions` regardless of versioning being enabled or not.
|
|
@@ -604,7 +596,7 @@ message RespondActivityTaskFailedRequest {
|
|
|
604
596
|
// Version info of the worker who processed this task. This message's `build_id` field should
|
|
605
597
|
// always be set by SDKs. Workers opting into versioning will also set the `use_versioning`
|
|
606
598
|
// field to true. See message docstrings for more.
|
|
607
|
-
// Deprecated. Use `
|
|
599
|
+
// Deprecated. Use `deployment_options` instead.
|
|
608
600
|
temporal.api.common.v1.WorkerVersionStamp worker_version = 6 [deprecated = true];
|
|
609
601
|
// Deployment info of the worker that completed this task. Must be present if user has set
|
|
610
602
|
// `WorkerDeploymentOptions` regardless of versioning being enabled or not.
|
|
@@ -654,7 +646,7 @@ message RespondActivityTaskCanceledRequest {
|
|
|
654
646
|
// Version info of the worker who processed this task. This message's `build_id` field should
|
|
655
647
|
// always be set by SDKs. Workers opting into versioning will also set the `use_versioning`
|
|
656
648
|
// field to true. See message docstrings for more.
|
|
657
|
-
// Deprecated. Use `
|
|
649
|
+
// Deprecated. Use `deployment_options` instead.
|
|
658
650
|
temporal.api.common.v1.WorkerVersionStamp worker_version = 5 [deprecated = true];
|
|
659
651
|
// Deployment info of the worker that completed this task. Must be present if user has set
|
|
660
652
|
// `WorkerDeploymentOptions` regardless of versioning being enabled or not.
|
|
@@ -680,6 +672,8 @@ message RespondActivityTaskCanceledByIdRequest {
|
|
|
680
672
|
temporal.api.common.v1.Payloads details = 5;
|
|
681
673
|
// The identity of the worker/client
|
|
682
674
|
string identity = 6;
|
|
675
|
+
// Worker deployment options that user has set in the worker.
|
|
676
|
+
temporal.api.deployment.v1.WorkerDeploymentOptions deployment_options = 7;
|
|
683
677
|
}
|
|
684
678
|
|
|
685
679
|
message RespondActivityTaskCanceledByIdResponse {
|
|
@@ -705,6 +699,9 @@ message RequestCancelWorkflowExecutionRequest {
|
|
|
705
699
|
message RequestCancelWorkflowExecutionResponse {
|
|
706
700
|
}
|
|
707
701
|
|
|
702
|
+
// Keep the parameters in sync with:
|
|
703
|
+
// - temporal.api.batch.v1.BatchOperationSignal.
|
|
704
|
+
// - temporal.api.workflow.v1.PostResetOperation.SignalWorkflow.
|
|
708
705
|
message SignalWorkflowExecutionRequest {
|
|
709
706
|
string namespace = 1;
|
|
710
707
|
temporal.api.common.v1.WorkflowExecution workflow_execution = 2;
|
|
@@ -817,6 +814,10 @@ message ResetWorkflowExecutionRequest {
|
|
|
817
814
|
temporal.api.enums.v1.ResetReapplyType reset_reapply_type = 6;
|
|
818
815
|
// Event types not to be reapplied
|
|
819
816
|
repeated temporal.api.enums.v1.ResetReapplyExcludeType reset_reapply_exclude_types = 7;
|
|
817
|
+
// Operations to perform after the workflow has been reset. These operations will be applied
|
|
818
|
+
// to the *new* run of the workflow execution in the order they are provided.
|
|
819
|
+
// All operations are applied to the workflow before the first new workflow task is generated
|
|
820
|
+
repeated temporal.api.workflow.v1.PostResetOperation post_reset_operations = 8;
|
|
820
821
|
}
|
|
821
822
|
|
|
822
823
|
message ResetWorkflowExecutionResponse {
|
|
@@ -1802,6 +1803,12 @@ message ExecuteMultiOperationRequest {
|
|
|
1802
1803
|
}
|
|
1803
1804
|
}
|
|
1804
1805
|
|
|
1806
|
+
// IMPORTANT: For [StartWorkflow, UpdateWorkflow] combination ("Update-with-Start") when both
|
|
1807
|
+
// 1. the workflow update for the requested update ID has already completed, and
|
|
1808
|
+
// 2. the workflow for the requested workflow ID has already been closed,
|
|
1809
|
+
// then you'll receive
|
|
1810
|
+
// - an update response containing the update's outcome, and
|
|
1811
|
+
// - a start response with a `status` field that reflects the workflow's current state.
|
|
1805
1812
|
message ExecuteMultiOperationResponse {
|
|
1806
1813
|
repeated Response responses = 1;
|
|
1807
1814
|
|
|
@@ -1828,13 +1835,13 @@ message UpdateActivityOptionsRequest {
|
|
|
1828
1835
|
// Controls which fields from `activity_options` will be applied
|
|
1829
1836
|
google.protobuf.FieldMask update_mask = 5;
|
|
1830
1837
|
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
+
// either activity id or activity type must be provided
|
|
1839
|
+
oneof activity {
|
|
1840
|
+
// Only activity with this ID will be updated.
|
|
1841
|
+
string id = 6;
|
|
1842
|
+
// Update all running activities of this type.
|
|
1843
|
+
string type = 7;
|
|
1844
|
+
}
|
|
1838
1845
|
}
|
|
1839
1846
|
|
|
1840
1847
|
message UpdateActivityOptionsResponse {
|
|
@@ -1859,6 +1866,8 @@ message PauseActivityRequest {
|
|
|
1859
1866
|
string type = 5;
|
|
1860
1867
|
}
|
|
1861
1868
|
|
|
1869
|
+
// Reason to pause the activity.
|
|
1870
|
+
string reason = 6;
|
|
1862
1871
|
}
|
|
1863
1872
|
|
|
1864
1873
|
message PauseActivityResponse {
|
|
@@ -1928,6 +1937,9 @@ message ResetActivityRequest {
|
|
|
1928
1937
|
message ResetActivityResponse {
|
|
1929
1938
|
}
|
|
1930
1939
|
|
|
1940
|
+
// Keep the parameters in sync with:
|
|
1941
|
+
// - temporal.api.batch.v1.BatchOperationUpdateWorkflowExecutionOptions.
|
|
1942
|
+
// - temporal.api.workflow.v1.PostResetOperation.UpdateWorkflowOptions.
|
|
1931
1943
|
message UpdateWorkflowExecutionOptionsRequest {
|
|
1932
1944
|
// The namespace name of the target Workflow.
|
|
1933
1945
|
string namespace = 1;
|
|
@@ -1960,9 +1972,11 @@ message DescribeDeploymentResponse {
|
|
|
1960
1972
|
}
|
|
1961
1973
|
|
|
1962
1974
|
message DescribeWorkerDeploymentVersionRequest {
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1975
|
+
string namespace = 1;
|
|
1976
|
+
// Deprecated. Use `deployment_version`.
|
|
1977
|
+
string version = 2 [deprecated = true];
|
|
1978
|
+
// Required.
|
|
1979
|
+
temporal.api.deployment.v1.WorkerDeploymentVersion deployment_version = 3;
|
|
1966
1980
|
}
|
|
1967
1981
|
|
|
1968
1982
|
message DescribeWorkerDeploymentVersionResponse {
|
|
@@ -2019,11 +2033,14 @@ message SetCurrentDeploymentResponse {
|
|
|
2019
2033
|
message SetWorkerDeploymentCurrentVersionRequest {
|
|
2020
2034
|
string namespace = 1;
|
|
2021
2035
|
string deployment_name = 2;
|
|
2022
|
-
//
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
//
|
|
2026
|
-
|
|
2036
|
+
// Deprecated. Use `build_id`.
|
|
2037
|
+
string version = 3 [deprecated = true];
|
|
2038
|
+
|
|
2039
|
+
// The build id of the Version that you want to set as Current.
|
|
2040
|
+
// Pass an empty value to set the Current Version to nil.
|
|
2041
|
+
// A nil Current Version represents all the unversioned workers (those with `UNVERSIONED` (or unspecified) `WorkerVersioningMode`.)
|
|
2042
|
+
string build_id = 7;
|
|
2043
|
+
|
|
2027
2044
|
// Optional. This can be the value of conflict_token from a Describe, or another Worker
|
|
2028
2045
|
// Deployment API. Passing a non-nil conflict token will cause this request to fail if the
|
|
2029
2046
|
// Deployment's configuration has been modified between the API call that generated the
|
|
@@ -2052,21 +2069,24 @@ message SetWorkerDeploymentCurrentVersionResponse {
|
|
|
2052
2069
|
// that write to the Worker Deployment state to ensure that the state
|
|
2053
2070
|
// did not change between this API call and a future write.
|
|
2054
2071
|
bytes conflict_token = 1;
|
|
2055
|
-
//
|
|
2056
|
-
|
|
2057
|
-
|
|
2072
|
+
// Deprecated. Use `previous_deployment_version`.
|
|
2073
|
+
string previous_version = 2 [deprecated = true];
|
|
2074
|
+
// The version that was current before executing this operation.
|
|
2075
|
+
temporal.api.deployment.v1.WorkerDeploymentVersion previous_deployment_version = 3;
|
|
2058
2076
|
}
|
|
2059
2077
|
|
|
2060
2078
|
// Set/unset the Ramping Version of a Worker Deployment and its ramp percentage.
|
|
2061
2079
|
message SetWorkerDeploymentRampingVersionRequest {
|
|
2062
2080
|
string namespace = 1;
|
|
2063
2081
|
string deployment_name = 2;
|
|
2064
|
-
//
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
//
|
|
2068
|
-
//
|
|
2069
|
-
|
|
2082
|
+
// Deprecated. Use `build_id`.
|
|
2083
|
+
string version = 3 [deprecated = true];
|
|
2084
|
+
|
|
2085
|
+
// The build id of the Version that you want to ramp traffic to.
|
|
2086
|
+
// Pass an empty value to set the Ramping Version to nil.
|
|
2087
|
+
// A nil Ramping Version represents all the unversioned workers (those with `UNVERSIONED` (or unspecified) `WorkerVersioningMode`.)
|
|
2088
|
+
string build_id = 8;
|
|
2089
|
+
|
|
2070
2090
|
// Ramp percentage to set. Valid range: [0,100].
|
|
2071
2091
|
float percentage = 4;
|
|
2072
2092
|
|
|
@@ -2101,9 +2121,10 @@ message SetWorkerDeploymentRampingVersionResponse {
|
|
|
2101
2121
|
// that write to the Worker Deployment state to ensure that the state
|
|
2102
2122
|
// did not change between this API call and a future write.
|
|
2103
2123
|
bytes conflict_token = 1;
|
|
2104
|
-
//
|
|
2105
|
-
|
|
2106
|
-
|
|
2124
|
+
// Deprecated. Use `previous_deployment_version`.
|
|
2125
|
+
string previous_version = 2 [deprecated = true];
|
|
2126
|
+
// The version that was ramping before executing this operation.
|
|
2127
|
+
temporal.api.deployment.v1.WorkerDeploymentVersion previous_deployment_version = 4;
|
|
2107
2128
|
// The ramping version percentage before executing this operation.
|
|
2108
2129
|
float previous_percentage = 3;
|
|
2109
2130
|
}
|
|
@@ -2136,8 +2157,10 @@ message ListWorkerDeploymentsResponse {
|
|
|
2136
2157
|
// can be skipped by passing `skip-drainage=true`.
|
|
2137
2158
|
message DeleteWorkerDeploymentVersionRequest {
|
|
2138
2159
|
string namespace = 1;
|
|
2139
|
-
//
|
|
2140
|
-
string version = 2;
|
|
2160
|
+
// Deprecated. Use `deployment_version`.
|
|
2161
|
+
string version = 2 [deprecated = true];
|
|
2162
|
+
// Required.
|
|
2163
|
+
temporal.api.deployment.v1.WorkerDeploymentVersion deployment_version = 5;
|
|
2141
2164
|
// Pass to force deletion even if the Version is draining. In this case the open pinned
|
|
2142
2165
|
// workflows will be stuck until manually moved to another version by UpdateWorkflowExecutionOptions.
|
|
2143
2166
|
bool skip_drainage = 3;
|
|
@@ -2163,8 +2186,10 @@ message DeleteWorkerDeploymentResponse {
|
|
|
2163
2186
|
// Used to update the user-defined metadata of a Worker Deployment Version.
|
|
2164
2187
|
message UpdateWorkerDeploymentVersionMetadataRequest {
|
|
2165
2188
|
string namespace = 1;
|
|
2166
|
-
//
|
|
2167
|
-
string version = 2;
|
|
2189
|
+
// Deprecated. Use `deployment_version`.
|
|
2190
|
+
string version = 2 [deprecated = true];
|
|
2191
|
+
// Required.
|
|
2192
|
+
temporal.api.deployment.v1.WorkerDeploymentVersion deployment_version = 5;
|
|
2168
2193
|
map<string, temporal.api.common.v1.Payload> upsert_entries = 3;
|
|
2169
2194
|
// List of keys to remove from the metadata.
|
|
2170
2195
|
repeated string remove_entries = 4;
|
|
@@ -2201,3 +2226,85 @@ message GetDeploymentReachabilityResponse {
|
|
|
2201
2226
|
// was actually calculated.
|
|
2202
2227
|
google.protobuf.Timestamp last_update_time = 3;
|
|
2203
2228
|
}
|
|
2229
|
+
|
|
2230
|
+
message CreateWorkflowRuleRequest {
|
|
2231
|
+
string namespace = 1;
|
|
2232
|
+
|
|
2233
|
+
// The rule specification .
|
|
2234
|
+
temporal.api.rules.v1.WorkflowRuleSpec spec = 2;
|
|
2235
|
+
|
|
2236
|
+
// If true, the rule will be applied to the currently running workflows via batch job.
|
|
2237
|
+
// If not set , the rule will only be applied when triggering condition is satisfied.
|
|
2238
|
+
// visibility_query in the rule will be used to select the workflows to apply the rule to.
|
|
2239
|
+
bool force_scan = 3;
|
|
2240
|
+
|
|
2241
|
+
// Used to de-dupe requests. Typically should be UUID.
|
|
2242
|
+
string request_id = 4;
|
|
2243
|
+
|
|
2244
|
+
// Identity of the actor who created the rule. Will be stored with the rule.
|
|
2245
|
+
string identity = 5;
|
|
2246
|
+
|
|
2247
|
+
// Rule description.Will be stored with the rule.
|
|
2248
|
+
string description = 6;
|
|
2249
|
+
}
|
|
2250
|
+
|
|
2251
|
+
message CreateWorkflowRuleResponse {
|
|
2252
|
+
// Created rule.
|
|
2253
|
+
temporal.api.rules.v1.WorkflowRule rule = 1;
|
|
2254
|
+
|
|
2255
|
+
// Batch Job ID if force-scan flag was provided. Otherwise empty.
|
|
2256
|
+
string job_id = 2;
|
|
2257
|
+
}
|
|
2258
|
+
|
|
2259
|
+
message DescribeWorkflowRuleRequest {
|
|
2260
|
+
string namespace = 1;
|
|
2261
|
+
// User-specified ID of the rule to read. Unique within the namespace.
|
|
2262
|
+
string rule_id = 2;
|
|
2263
|
+
}
|
|
2264
|
+
|
|
2265
|
+
message DescribeWorkflowRuleResponse {
|
|
2266
|
+
// The rule that was read.
|
|
2267
|
+
temporal.api.rules.v1.WorkflowRule rule = 1;
|
|
2268
|
+
}
|
|
2269
|
+
|
|
2270
|
+
message DeleteWorkflowRuleRequest {
|
|
2271
|
+
string namespace = 1;
|
|
2272
|
+
|
|
2273
|
+
// ID of the rule to delete. Unique within the namespace.
|
|
2274
|
+
string rule_id = 2;
|
|
2275
|
+
}
|
|
2276
|
+
|
|
2277
|
+
message DeleteWorkflowRuleResponse {
|
|
2278
|
+
}
|
|
2279
|
+
|
|
2280
|
+
message ListWorkflowRulesRequest {
|
|
2281
|
+
string namespace = 1;
|
|
2282
|
+
bytes next_page_token = 2;
|
|
2283
|
+
}
|
|
2284
|
+
|
|
2285
|
+
message ListWorkflowRulesResponse {
|
|
2286
|
+
repeated temporal.api.rules.v1.WorkflowRule rules = 1;
|
|
2287
|
+
bytes next_page_token = 2;
|
|
2288
|
+
}
|
|
2289
|
+
|
|
2290
|
+
message TriggerWorkflowRuleRequest {
|
|
2291
|
+
string namespace = 1;
|
|
2292
|
+
|
|
2293
|
+
// Execution info of the workflow which scheduled this activity
|
|
2294
|
+
temporal.api.common.v1.WorkflowExecution execution = 2;
|
|
2295
|
+
|
|
2296
|
+
// Either provide id of existing rule, or rule specification
|
|
2297
|
+
oneof rule {
|
|
2298
|
+
string id = 4;
|
|
2299
|
+
// Note: Rule ID and expiration date are not used in the trigger request.
|
|
2300
|
+
temporal.api.rules.v1.WorkflowRuleSpec spec = 5;
|
|
2301
|
+
}
|
|
2302
|
+
|
|
2303
|
+
// The identity of the client who initiated this request
|
|
2304
|
+
string identity = 3;
|
|
2305
|
+
}
|
|
2306
|
+
|
|
2307
|
+
message TriggerWorkflowRuleResponse {
|
|
2308
|
+
// True is the rule was applied, based on the rule conditions (predicate/visibility_query).
|
|
2309
|
+
bool applied = 1;
|
|
2310
|
+
}
|
package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/workflowservice/v1/service.proto
CHANGED
|
@@ -1,25 +1,3 @@
|
|
|
1
|
-
// The MIT License
|
|
2
|
-
//
|
|
3
|
-
// Copyright (c) 2020 Temporal Technologies Inc. All rights reserved.
|
|
4
|
-
//
|
|
5
|
-
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
// of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
// in the Software without restriction, including without limitation the rights
|
|
8
|
-
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
// copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
// furnished to do so, subject to the following conditions:
|
|
11
|
-
//
|
|
12
|
-
// The above copyright notice and this permission notice shall be included in
|
|
13
|
-
// all copies or substantial portions of the Software.
|
|
14
|
-
//
|
|
15
|
-
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
-
// THE SOFTWARE.
|
|
22
|
-
|
|
23
1
|
syntax = "proto3";
|
|
24
2
|
|
|
25
3
|
package temporal.api.workflowservice.v1;
|
|
@@ -789,9 +767,9 @@ service WorkflowService {
|
|
|
789
767
|
// Experimental. This API might significantly change or be removed in a future release.
|
|
790
768
|
rpc DescribeWorkerDeploymentVersion (DescribeWorkerDeploymentVersionRequest) returns (DescribeWorkerDeploymentVersionResponse) {
|
|
791
769
|
option (google.api.http) = {
|
|
792
|
-
get: "/namespaces/{namespace}/worker-deployment-versions/{
|
|
770
|
+
get: "/namespaces/{namespace}/worker-deployment-versions/{deployment_version.deployment_name}/{deployment_version.build_id}"
|
|
793
771
|
additional_bindings {
|
|
794
|
-
get: "/api/v1/namespaces/{namespace}/worker-deployment-versions/{
|
|
772
|
+
get: "/api/v1/namespaces/{namespace}/worker-deployment-versions/{deployment_version.deployment_name}/{deployment_version.build_id}"
|
|
795
773
|
}
|
|
796
774
|
};
|
|
797
775
|
}
|
|
@@ -900,9 +878,9 @@ service WorkflowService {
|
|
|
900
878
|
// Experimental. This API might significantly change or be removed in a future release.
|
|
901
879
|
rpc DeleteWorkerDeploymentVersion (DeleteWorkerDeploymentVersionRequest) returns (DeleteWorkerDeploymentVersionResponse) {
|
|
902
880
|
option (google.api.http) = {
|
|
903
|
-
delete: "/namespaces/{namespace}/worker-deployment-versions/{
|
|
881
|
+
delete: "/namespaces/{namespace}/worker-deployment-versions/{deployment_version.deployment_name}/{deployment_version.build_id}"
|
|
904
882
|
additional_bindings {
|
|
905
|
-
delete: "/api/v1/namespaces/{namespace}/worker-deployment-versions/{
|
|
883
|
+
delete: "/api/v1/namespaces/{namespace}/worker-deployment-versions/{deployment_version.deployment_name}/{deployment_version.build_id}"
|
|
906
884
|
}
|
|
907
885
|
};
|
|
908
886
|
}
|
|
@@ -936,10 +914,10 @@ service WorkflowService {
|
|
|
936
914
|
// Experimental. This API might significantly change or be removed in a future release.
|
|
937
915
|
rpc UpdateWorkerDeploymentVersionMetadata (UpdateWorkerDeploymentVersionMetadataRequest) returns (UpdateWorkerDeploymentVersionMetadataResponse) {
|
|
938
916
|
option (google.api.http) = {
|
|
939
|
-
post: "/namespaces/{namespace}/worker-deployment-versions/{
|
|
917
|
+
post: "/namespaces/{namespace}/worker-deployment-versions/{deployment_version.deployment_name}/{deployment_version.build_id}/update-metadata"
|
|
940
918
|
body: "*"
|
|
941
919
|
additional_bindings {
|
|
942
|
-
post: "/api/v1/namespaces/{namespace}/worker-deployment-versions/{
|
|
920
|
+
post: "/api/v1/namespaces/{namespace}/worker-deployment-versions/{deployment_version.deployment_name}/{deployment_version.build_id}/update-metadata"
|
|
943
921
|
body: "*"
|
|
944
922
|
}
|
|
945
923
|
};
|
|
@@ -1132,4 +1110,67 @@ service WorkflowService {
|
|
|
1132
1110
|
}
|
|
1133
1111
|
};
|
|
1134
1112
|
}
|
|
1113
|
+
|
|
1114
|
+
// Create a new workflow rule. The rules are used to control the workflow execution.
|
|
1115
|
+
// The rule will be applied to all running and new workflows in the namespace.
|
|
1116
|
+
// If the rule with such ID already exist this call will fail
|
|
1117
|
+
// Note: the rules are part of namespace configuration and will be stored in the namespace config.
|
|
1118
|
+
// Namespace config is eventually consistent.
|
|
1119
|
+
rpc CreateWorkflowRule (CreateWorkflowRuleRequest) returns (CreateWorkflowRuleResponse) {
|
|
1120
|
+
option (google.api.http) = {
|
|
1121
|
+
post: "/namespaces/{namespace}/workflow-rules"
|
|
1122
|
+
body: "*"
|
|
1123
|
+
additional_bindings {
|
|
1124
|
+
post: "/api/v1/namespaces/{namespace}/workflow-rules"
|
|
1125
|
+
body: "*"
|
|
1126
|
+
}
|
|
1127
|
+
};
|
|
1128
|
+
}
|
|
1129
|
+
|
|
1130
|
+
// DescribeWorkflowRule return the rule specification for existing rule id.
|
|
1131
|
+
// If there is no rule with such id - NOT FOUND error will be returned.
|
|
1132
|
+
rpc DescribeWorkflowRule (DescribeWorkflowRuleRequest) returns (DescribeWorkflowRuleResponse) {
|
|
1133
|
+
option (google.api.http) = {
|
|
1134
|
+
get: "/namespaces/{namespace}/workflow-rules/{rule_id}"
|
|
1135
|
+
additional_bindings {
|
|
1136
|
+
get: "/api/v1/namespaces/{namespace}/workflow-rules/{rule_id}"
|
|
1137
|
+
}
|
|
1138
|
+
};
|
|
1139
|
+
}
|
|
1140
|
+
|
|
1141
|
+
// Delete rule by rule id
|
|
1142
|
+
rpc DeleteWorkflowRule (DeleteWorkflowRuleRequest) returns (DeleteWorkflowRuleResponse) {
|
|
1143
|
+
option (google.api.http) = {
|
|
1144
|
+
delete: "/namespaces/{namespace}/workflow-rules/{rule_id}"
|
|
1145
|
+
additional_bindings {
|
|
1146
|
+
delete: "/api/v1/namespaces/{namespace}/workflow-rules/{rule_id}"
|
|
1147
|
+
}
|
|
1148
|
+
};
|
|
1149
|
+
}
|
|
1150
|
+
|
|
1151
|
+
// Return all namespace workflow rules
|
|
1152
|
+
rpc ListWorkflowRules (ListWorkflowRulesRequest) returns (ListWorkflowRulesResponse) {
|
|
1153
|
+
option (google.api.http) = {
|
|
1154
|
+
get: "/namespaces/{namespace}/workflow-rules"
|
|
1155
|
+
additional_bindings {
|
|
1156
|
+
get: "/api/v1/namespaces/{namespace}/workflow-rules"
|
|
1157
|
+
}
|
|
1158
|
+
};
|
|
1159
|
+
}
|
|
1160
|
+
|
|
1161
|
+
// TriggerWorkflowRule allows to:
|
|
1162
|
+
// * trigger existing rule for a specific workflow execution;
|
|
1163
|
+
// * trigger rule for a specific workflow execution without creating a rule;
|
|
1164
|
+
// This is useful for one-off operations.
|
|
1165
|
+
rpc TriggerWorkflowRule (TriggerWorkflowRuleRequest) returns (TriggerWorkflowRuleResponse) {
|
|
1166
|
+
option (google.api.http) = {
|
|
1167
|
+
post: "/namespaces/{namespace}/workflows/{execution.workflow_id}/trigger-rule"
|
|
1168
|
+
body: "*"
|
|
1169
|
+
additional_bindings {
|
|
1170
|
+
post: "/api/v1/namespaces/{namespace}/workflows/{execution.workflow_id}/trigger-rule"
|
|
1171
|
+
body: "*"
|
|
1172
|
+
}
|
|
1173
|
+
};
|
|
1174
|
+
}
|
|
1175
|
+
|
|
1135
1176
|
}
|
package/sdk-core/sdk-core-protos/protos/local/temporal/sdk/core/activity_task/activity_task.proto
CHANGED
|
@@ -57,6 +57,8 @@ message Start {
|
|
|
57
57
|
// (or not) during activity scheduling as the service can override the provided one in case its
|
|
58
58
|
// values are not specified or exceed configured system limits.
|
|
59
59
|
temporal.api.common.v1.RetryPolicy retry_policy = 16;
|
|
60
|
+
// Priority of this activity. Local activities will always have this field set to the default.
|
|
61
|
+
temporal.api.common.v1.Priority priority = 18;
|
|
60
62
|
|
|
61
63
|
// Set to true if this is a local activity. Note that heartbeating does not apply to local
|
|
62
64
|
// activities.
|
|
@@ -65,7 +67,19 @@ message Start {
|
|
|
65
67
|
|
|
66
68
|
// Attempt to cancel a running activity
|
|
67
69
|
message Cancel {
|
|
70
|
+
// Primary cancellation reason
|
|
68
71
|
ActivityCancelReason reason = 1;
|
|
72
|
+
// Activity cancellation details, surfaces all cancellation reasons.
|
|
73
|
+
ActivityCancellationDetails details = 2;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
message ActivityCancellationDetails {
|
|
77
|
+
bool is_not_found = 1;
|
|
78
|
+
bool is_cancelled = 2;
|
|
79
|
+
bool is_paused = 3;
|
|
80
|
+
bool is_timed_out = 4;
|
|
81
|
+
bool is_worker_shutdown = 5;
|
|
82
|
+
bool is_reset = 6;
|
|
69
83
|
}
|
|
70
84
|
|
|
71
85
|
enum ActivityCancelReason {
|
|
@@ -77,6 +91,10 @@ enum ActivityCancelReason {
|
|
|
77
91
|
TIMED_OUT = 2;
|
|
78
92
|
// Core is shutting down and the graceful timeout has elapsed
|
|
79
93
|
WORKER_SHUTDOWN = 3;
|
|
94
|
+
// Activity was paused
|
|
95
|
+
PAUSED = 4;
|
|
96
|
+
// Activity was reset
|
|
97
|
+
RESET = 5;
|
|
80
98
|
}
|
|
81
99
|
|
|
82
100
|
|
|
@@ -68,4 +68,19 @@ enum NexusTaskCancelReason {
|
|
|
68
68
|
TIMED_OUT = 0;
|
|
69
69
|
// The worker is shutting down
|
|
70
70
|
WORKER_SHUTDOWN = 1;
|
|
71
|
-
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
// Controls at which point to report back to lang when a nexus operation is cancelled
|
|
74
|
+
enum NexusOperationCancellationType {
|
|
75
|
+
// Wait for operation cancellation completion. Default.
|
|
76
|
+
WAIT_CANCELLATION_COMPLETED = 0;
|
|
77
|
+
// Do not request cancellation of the nexus operation if already scheduled
|
|
78
|
+
ABANDON = 1;
|
|
79
|
+
|
|
80
|
+
// Initiate a cancellation request for the Nexus operation and immediately report cancellation
|
|
81
|
+
// to the caller. Note that it doesn't guarantee that cancellation is delivered to the operation if calling workflow exits before the delivery is done.
|
|
82
|
+
// If you want to ensure that cancellation is delivered to the operation, use WAIT_CANCELLATION_REQUESTED.
|
|
83
|
+
TRY_CANCEL = 2;
|
|
84
|
+
// Request cancellation of the operation and wait for confirmation that the request was received.
|
|
85
|
+
WAIT_CANCELLATION_REQUESTED = 3;
|
|
86
|
+
}
|