@temporalio/core-bridge 0.23.0 → 1.0.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 +118 -15
- package/Cargo.toml +2 -1
- package/LICENSE.md +1 -1
- package/README.md +1 -1
- package/index.d.ts +47 -18
- package/package.json +7 -7
- 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/.buildkite/docker/docker-compose.yaml +4 -2
- package/sdk-core/ARCHITECTURE.md +9 -7
- package/sdk-core/README.md +5 -1
- package/sdk-core/arch_docs/diagrams/workflow_internals.svg +1 -0
- package/sdk-core/bridge-ffi/src/wrappers.rs +0 -3
- package/sdk-core/client/src/lib.rs +26 -8
- package/sdk-core/client/src/raw.rs +166 -54
- package/sdk-core/client/src/retry.rs +9 -4
- package/sdk-core/client/src/workflow_handle/mod.rs +4 -2
- package/sdk-core/core/Cargo.toml +2 -0
- package/sdk-core/core/src/abstractions.rs +137 -16
- package/sdk-core/core/src/core_tests/activity_tasks.rs +258 -63
- package/sdk-core/core/src/core_tests/child_workflows.rs +1 -2
- package/sdk-core/core/src/core_tests/determinism.rs +2 -2
- package/sdk-core/core/src/core_tests/local_activities.rs +8 -7
- package/sdk-core/core/src/core_tests/queries.rs +146 -60
- package/sdk-core/core/src/core_tests/replay_flag.rs +1 -1
- package/sdk-core/core/src/core_tests/workers.rs +39 -23
- package/sdk-core/core/src/core_tests/workflow_cancels.rs +1 -1
- package/sdk-core/core/src/core_tests/workflow_tasks.rs +387 -280
- package/sdk-core/core/src/lib.rs +6 -4
- package/sdk-core/core/src/pollers/poll_buffer.rs +16 -10
- package/sdk-core/core/src/protosext/mod.rs +6 -6
- package/sdk-core/core/src/retry_logic.rs +1 -1
- package/sdk-core/core/src/telemetry/metrics.rs +21 -7
- package/sdk-core/core/src/telemetry/mod.rs +18 -4
- package/sdk-core/core/src/test_help/mod.rs +341 -109
- package/sdk-core/core/src/worker/activities/activity_heartbeat_manager.rs +18 -9
- package/sdk-core/core/src/worker/activities/local_activities.rs +19 -16
- package/sdk-core/core/src/worker/activities.rs +156 -29
- package/sdk-core/core/src/worker/client.rs +1 -0
- package/sdk-core/core/src/worker/mod.rs +132 -659
- package/sdk-core/core/src/{workflow → worker/workflow}/bridge.rs +1 -1
- package/sdk-core/core/src/{workflow → worker/workflow}/driven_workflow.rs +1 -1
- package/sdk-core/core/src/{workflow → worker/workflow}/history_update.rs +16 -2
- package/sdk-core/core/src/{workflow → worker/workflow}/machines/activity_state_machine.rs +39 -4
- package/sdk-core/core/src/{workflow → worker/workflow}/machines/cancel_external_state_machine.rs +5 -2
- package/sdk-core/core/src/{workflow → worker/workflow}/machines/cancel_workflow_state_machine.rs +1 -1
- package/sdk-core/core/src/{workflow → worker/workflow}/machines/child_workflow_state_machine.rs +2 -4
- package/sdk-core/core/src/{workflow → worker/workflow}/machines/complete_workflow_state_machine.rs +0 -0
- package/sdk-core/core/src/{workflow → worker/workflow}/machines/continue_as_new_workflow_state_machine.rs +1 -1
- package/sdk-core/core/src/{workflow → worker/workflow}/machines/fail_workflow_state_machine.rs +0 -0
- package/sdk-core/core/src/{workflow → worker/workflow}/machines/local_activity_state_machine.rs +2 -5
- package/sdk-core/core/src/{workflow → worker/workflow}/machines/mod.rs +1 -1
- package/sdk-core/core/src/{workflow → worker/workflow}/machines/mutable_side_effect_state_machine.rs +0 -0
- package/sdk-core/core/src/{workflow → worker/workflow}/machines/patch_state_machine.rs +1 -1
- package/sdk-core/core/src/{workflow → worker/workflow}/machines/side_effect_state_machine.rs +0 -0
- package/sdk-core/core/src/{workflow → worker/workflow}/machines/signal_external_state_machine.rs +4 -2
- package/sdk-core/core/src/{workflow → worker/workflow}/machines/timer_state_machine.rs +1 -2
- package/sdk-core/core/src/{workflow → worker/workflow}/machines/transition_coverage.rs +1 -1
- package/sdk-core/core/src/{workflow → worker/workflow}/machines/upsert_search_attributes_state_machine.rs +5 -7
- package/sdk-core/core/src/{workflow → worker/workflow}/machines/workflow_machines/local_acts.rs +2 -2
- package/sdk-core/core/src/{workflow → worker/workflow}/machines/workflow_machines.rs +40 -16
- package/sdk-core/core/src/{workflow → worker/workflow}/machines/workflow_task_state_machine.rs +0 -0
- package/sdk-core/core/src/worker/workflow/managed_run/managed_wf_test.rs +198 -0
- package/sdk-core/core/src/worker/workflow/managed_run.rs +627 -0
- package/sdk-core/core/src/worker/workflow/mod.rs +1115 -0
- package/sdk-core/core/src/worker/workflow/run_cache.rs +143 -0
- package/sdk-core/core/src/worker/workflow/wft_poller.rs +88 -0
- package/sdk-core/core/src/worker/workflow/workflow_stream.rs +936 -0
- package/sdk-core/core-api/src/errors.rs +3 -10
- package/sdk-core/core-api/src/lib.rs +2 -1
- package/sdk-core/core-api/src/worker.rs +26 -2
- package/sdk-core/etc/dynamic-config.yaml +2 -0
- package/sdk-core/integ-with-otel.sh +1 -1
- package/sdk-core/protos/api_upstream/Makefile +4 -4
- package/sdk-core/protos/api_upstream/api-linter.yaml +2 -0
- package/sdk-core/protos/api_upstream/buf.yaml +8 -9
- package/sdk-core/protos/api_upstream/temporal/api/cluster/v1/message.proto +83 -0
- package/sdk-core/protos/api_upstream/temporal/api/command/v1/message.proto +7 -1
- package/sdk-core/protos/api_upstream/temporal/api/enums/v1/cluster.proto +40 -0
- package/sdk-core/protos/api_upstream/temporal/api/enums/v1/failed_cause.proto +3 -0
- package/sdk-core/protos/api_upstream/temporal/api/enums/v1/reset.proto +3 -1
- package/sdk-core/protos/api_upstream/temporal/api/enums/v1/schedule.proto +60 -0
- package/sdk-core/protos/api_upstream/temporal/api/enums/v1/workflow.proto +3 -0
- package/sdk-core/protos/api_upstream/temporal/api/errordetails/v1/message.proto +32 -4
- package/sdk-core/protos/api_upstream/temporal/api/history/v1/message.proto +69 -19
- package/sdk-core/protos/api_upstream/temporal/api/namespace/v1/message.proto +13 -0
- package/sdk-core/protos/api_upstream/temporal/api/operatorservice/v1/request_response.proto +163 -0
- package/sdk-core/protos/api_upstream/temporal/api/operatorservice/v1/service.proto +97 -0
- package/sdk-core/protos/api_upstream/temporal/api/schedule/v1/message.proto +300 -0
- package/sdk-core/protos/api_upstream/temporal/api/workflow/v1/message.proto +25 -0
- package/sdk-core/protos/api_upstream/temporal/api/workflowservice/v1/request_response.proto +180 -3
- package/sdk-core/protos/api_upstream/temporal/api/workflowservice/v1/service.proto +53 -3
- package/sdk-core/protos/local/temporal/sdk/core/activity_result/activity_result.proto +2 -2
- package/sdk-core/protos/local/temporal/sdk/core/activity_task/activity_task.proto +6 -5
- package/sdk-core/protos/local/temporal/sdk/core/bridge/bridge.proto +0 -1
- package/sdk-core/protos/local/temporal/sdk/core/child_workflow/child_workflow.proto +2 -1
- package/sdk-core/protos/local/temporal/sdk/core/common/common.proto +0 -64
- package/sdk-core/protos/local/temporal/sdk/core/core_interface.proto +2 -1
- package/sdk-core/protos/local/temporal/sdk/core/workflow_activation/workflow_activation.proto +11 -8
- package/sdk-core/protos/local/temporal/sdk/core/workflow_commands/workflow_commands.proto +30 -25
- package/sdk-core/sdk/src/activity_context.rs +12 -5
- package/sdk-core/sdk/src/app_data.rs +37 -0
- package/sdk-core/sdk/src/lib.rs +76 -43
- package/sdk-core/sdk/src/workflow_context/options.rs +8 -6
- package/sdk-core/sdk/src/workflow_context.rs +14 -19
- package/sdk-core/sdk/src/workflow_future.rs +11 -6
- package/sdk-core/sdk-core-protos/src/history_builder.rs +19 -5
- package/sdk-core/sdk-core-protos/src/history_info.rs +11 -6
- package/sdk-core/sdk-core-protos/src/lib.rs +74 -176
- package/sdk-core/test-utils/src/lib.rs +85 -72
- package/sdk-core/tests/integ_tests/heartbeat_tests.rs +11 -9
- package/sdk-core/tests/integ_tests/polling_tests.rs +12 -0
- package/sdk-core/tests/integ_tests/queries_tests.rs +39 -22
- package/sdk-core/tests/integ_tests/workflow_tests/activities.rs +49 -4
- package/sdk-core/tests/integ_tests/workflow_tests/appdata_propagation.rs +61 -0
- package/sdk-core/tests/integ_tests/workflow_tests/cancel_wf.rs +1 -1
- package/sdk-core/tests/integ_tests/workflow_tests/local_activities.rs +74 -13
- package/sdk-core/tests/integ_tests/workflow_tests/replay.rs +19 -0
- package/sdk-core/tests/integ_tests/workflow_tests/resets.rs +1 -1
- package/sdk-core/tests/integ_tests/workflow_tests/upsert_search_attrs.rs +6 -3
- package/sdk-core/tests/integ_tests/workflow_tests.rs +10 -23
- package/sdk-core/tests/load_tests.rs +8 -3
- package/sdk-core/tests/main.rs +2 -1
- package/src/conversions.rs +47 -39
- package/src/errors.rs +10 -21
- package/src/lib.rs +342 -325
- package/sdk-core/core/src/pending_activations.rs +0 -173
- package/sdk-core/core/src/worker/wft_delivery.rs +0 -81
- package/sdk-core/core/src/workflow/mod.rs +0 -478
- package/sdk-core/core/src/workflow/workflow_tasks/cache_manager.rs +0 -194
- package/sdk-core/core/src/workflow/workflow_tasks/concurrency_manager.rs +0 -418
- package/sdk-core/core/src/workflow/workflow_tasks/mod.rs +0 -989
|
@@ -47,10 +47,14 @@ import "temporal/api/taskqueue/v1/message.proto";
|
|
|
47
47
|
// Always the first event in workflow history
|
|
48
48
|
message WorkflowExecutionStartedEventAttributes {
|
|
49
49
|
temporal.api.common.v1.WorkflowType workflow_type = 1;
|
|
50
|
-
// If this workflow is a child, the namespace our parent lives in
|
|
50
|
+
// If this workflow is a child, the namespace our parent lives in.
|
|
51
|
+
// SDKs and UI tools should use `parent_workflow_namespace` field but server must use `parent_workflow_namespace_id` only.
|
|
51
52
|
string parent_workflow_namespace = 2;
|
|
53
|
+
string parent_workflow_namespace_id = 27;
|
|
54
|
+
// Contains information about parent workflow execution that initiated the child workflow these attributes belong to.
|
|
55
|
+
// If the workflow these attributes belong to is not a child workflow of any other execution, this field will not be populated.
|
|
52
56
|
temporal.api.common.v1.WorkflowExecution parent_workflow_execution = 3;
|
|
53
|
-
//
|
|
57
|
+
// EventID of the child execution initiated event in parent workflow
|
|
54
58
|
int64 parent_initiated_event_id = 4;
|
|
55
59
|
temporal.api.taskqueue.v1.TaskQueue task_queue = 5;
|
|
56
60
|
// SDK will deserialize this and provide it as arguments to the workflow function
|
|
@@ -67,11 +71,13 @@ message WorkflowExecutionStartedEventAttributes {
|
|
|
67
71
|
temporal.api.enums.v1.ContinueAsNewInitiator initiator = 11;
|
|
68
72
|
temporal.api.failure.v1.Failure continued_failure = 12;
|
|
69
73
|
temporal.api.common.v1.Payloads last_completion_result = 13;
|
|
70
|
-
// This is the run id when the WorkflowExecutionStarted event was written
|
|
74
|
+
// This is the run id when the WorkflowExecutionStarted event was written.
|
|
75
|
+
// A workflow reset changes the execution run_id, but preserves this field.
|
|
71
76
|
string original_execution_run_id = 14;
|
|
72
77
|
// Identity of the client who requested this execution
|
|
73
78
|
string identity = 15;
|
|
74
|
-
// This is the very first runId along the chain of ContinueAsNew and Reset.
|
|
79
|
+
// This is the very first runId along the chain of ContinueAsNew, Retry, Cron and Reset.
|
|
80
|
+
// Used to identify a chain.
|
|
75
81
|
string first_execution_run_id = 16;
|
|
76
82
|
temporal.api.common.v1.RetryPolicy retry_policy = 17;
|
|
77
83
|
// Starting at 1, the number of times we have tried to execute this workflow
|
|
@@ -88,6 +94,10 @@ message WorkflowExecutionStartedEventAttributes {
|
|
|
88
94
|
temporal.api.common.v1.SearchAttributes search_attributes = 23;
|
|
89
95
|
temporal.api.workflow.v1.ResetPoints prev_auto_reset_points = 24;
|
|
90
96
|
temporal.api.common.v1.Header header = 25;
|
|
97
|
+
// Version of the child execution initiated event in parent workflow
|
|
98
|
+
// It should be used together with parent_initiated_event_id to identify
|
|
99
|
+
// a child initiated event for global namespace
|
|
100
|
+
int64 parent_initiated_event_version = 26;
|
|
91
101
|
}
|
|
92
102
|
|
|
93
103
|
message WorkflowExecutionCompletedEventAttributes {
|
|
@@ -163,6 +173,13 @@ message WorkflowTaskStartedEventAttributes {
|
|
|
163
173
|
string identity = 2;
|
|
164
174
|
// TODO: ? Appears unused?
|
|
165
175
|
string request_id = 3;
|
|
176
|
+
// True if this workflow should continue-as-new soon because its history size (in
|
|
177
|
+
// either event count or bytes) is getting large.
|
|
178
|
+
bool suggest_continue_as_new = 4;
|
|
179
|
+
// Total history size in bytes, which the workflow might use to decide when to
|
|
180
|
+
// continue-as-new regardless of the suggestion. Note that history event count is
|
|
181
|
+
// just the event id of this event, so we don't include it explicitly here.
|
|
182
|
+
int64 history_size_bytes = 5;
|
|
166
183
|
}
|
|
167
184
|
|
|
168
185
|
message WorkflowTaskCompletedEventAttributes {
|
|
@@ -208,7 +225,8 @@ message ActivityTaskScheduledEventAttributes {
|
|
|
208
225
|
// The worker/user assigned identifier for the activity
|
|
209
226
|
string activity_id = 1;
|
|
210
227
|
temporal.api.common.v1.ActivityType activity_type = 2;
|
|
211
|
-
|
|
228
|
+
// This used to be a `namespace` field which allowed to schedule activity in another namespace.
|
|
229
|
+
reserved 3;
|
|
212
230
|
temporal.api.taskqueue.v1.TaskQueue task_queue = 4;
|
|
213
231
|
temporal.api.common.v1.Header header = 5;
|
|
214
232
|
temporal.api.common.v1.Payloads input = 6;
|
|
@@ -344,7 +362,8 @@ message TimerCanceledEventAttributes {
|
|
|
344
362
|
|
|
345
363
|
message WorkflowExecutionCancelRequestedEventAttributes {
|
|
346
364
|
// User provided reason for requesting cancellation
|
|
347
|
-
|
|
365
|
+
// TODO: shall we create a new field with name "reason" and deprecate this one?
|
|
366
|
+
string cause = 1;
|
|
348
367
|
// TODO: Is this the ID of the event in the workflow which initiated this cancel, if there was one?
|
|
349
368
|
int64 external_initiated_event_id = 2;
|
|
350
369
|
temporal.api.common.v1.WorkflowExecution external_workflow_execution = 3;
|
|
@@ -393,22 +412,28 @@ message WorkflowExecutionTerminatedEventAttributes {
|
|
|
393
412
|
message RequestCancelExternalWorkflowExecutionInitiatedEventAttributes {
|
|
394
413
|
// The `WORKFLOW_TASK_COMPLETED` event which this command was reported with
|
|
395
414
|
int64 workflow_task_completed_event_id = 1;
|
|
396
|
-
// The namespace the workflow to be cancelled lives in
|
|
415
|
+
// The namespace the workflow to be cancelled lives in.
|
|
416
|
+
// SDKs and UI tools should use `namespace` field but server must use `namespace_id` only.
|
|
397
417
|
string namespace = 2;
|
|
418
|
+
string namespace_id = 7;
|
|
398
419
|
temporal.api.common.v1.WorkflowExecution workflow_execution = 3;
|
|
399
420
|
// Deprecated
|
|
400
421
|
string control = 4;
|
|
401
422
|
// Workers are expected to set this to true if the workflow they are requesting to cancel is
|
|
402
423
|
// a child of the workflow which issued the request
|
|
403
424
|
bool child_workflow_only = 5;
|
|
425
|
+
// Reason for requesting the cancellation
|
|
426
|
+
string reason = 6;
|
|
404
427
|
}
|
|
405
428
|
|
|
406
429
|
message RequestCancelExternalWorkflowExecutionFailedEventAttributes {
|
|
407
430
|
temporal.api.enums.v1.CancelExternalWorkflowExecutionFailedCause cause = 1;
|
|
408
431
|
// The `WORKFLOW_TASK_COMPLETED` event which this command was reported with
|
|
409
432
|
int64 workflow_task_completed_event_id = 2;
|
|
410
|
-
//
|
|
433
|
+
// Namespace of the workflow which failed to cancel.
|
|
434
|
+
// SDKs and UI tools should use `namespace` field but server must use `namespace_id` only.
|
|
411
435
|
string namespace = 3;
|
|
436
|
+
string namespace_id = 7;
|
|
412
437
|
temporal.api.common.v1.WorkflowExecution workflow_execution = 4;
|
|
413
438
|
// id of the `REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_INITIATED` event this failure
|
|
414
439
|
// corresponds to
|
|
@@ -421,16 +446,20 @@ message ExternalWorkflowExecutionCancelRequestedEventAttributes {
|
|
|
421
446
|
// id of the `REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_INITIATED` event this event corresponds
|
|
422
447
|
// to
|
|
423
448
|
int64 initiated_event_id = 1;
|
|
424
|
-
//
|
|
449
|
+
// Namespace of the to-be-cancelled workflow.
|
|
450
|
+
// SDKs and UI tools should use `namespace` field but server must use `namespace_id` only.
|
|
425
451
|
string namespace = 2;
|
|
452
|
+
string namespace_id = 4;
|
|
426
453
|
temporal.api.common.v1.WorkflowExecution workflow_execution = 3;
|
|
427
454
|
}
|
|
428
455
|
|
|
429
456
|
message SignalExternalWorkflowExecutionInitiatedEventAttributes {
|
|
430
457
|
// The `WORKFLOW_TASK_COMPLETED` event which this command was reported with
|
|
431
458
|
int64 workflow_task_completed_event_id = 1;
|
|
432
|
-
//
|
|
459
|
+
// Namespace of the to-be-signalled workflow.
|
|
460
|
+
// SDKs and UI tools should use `namespace` field but server must use `namespace_id` only.
|
|
433
461
|
string namespace = 2;
|
|
462
|
+
string namespace_id = 9;
|
|
434
463
|
temporal.api.common.v1.WorkflowExecution workflow_execution = 3;
|
|
435
464
|
// name/type of the signal to fire in the external workflow
|
|
436
465
|
string signal_name = 4;
|
|
@@ -448,7 +477,10 @@ message SignalExternalWorkflowExecutionFailedEventAttributes {
|
|
|
448
477
|
temporal.api.enums.v1.SignalExternalWorkflowExecutionFailedCause cause = 1;
|
|
449
478
|
// The `WORKFLOW_TASK_COMPLETED` event which this command was reported with
|
|
450
479
|
int64 workflow_task_completed_event_id = 2;
|
|
480
|
+
// Namespace of the workflow which failed the signal.
|
|
481
|
+
// SDKs and UI tools should use `namespace` field but server must use `namespace_id` only.
|
|
451
482
|
string namespace = 3;
|
|
483
|
+
string namespace_id = 7;
|
|
452
484
|
temporal.api.common.v1.WorkflowExecution workflow_execution = 4;
|
|
453
485
|
int64 initiated_event_id = 5;
|
|
454
486
|
// Deprecated
|
|
@@ -458,8 +490,10 @@ message SignalExternalWorkflowExecutionFailedEventAttributes {
|
|
|
458
490
|
message ExternalWorkflowExecutionSignaledEventAttributes {
|
|
459
491
|
// id of the `SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_INITIATED` event this event corresponds to
|
|
460
492
|
int64 initiated_event_id = 1;
|
|
461
|
-
//
|
|
493
|
+
// Namespace of the workflow which was signaled.
|
|
494
|
+
// SDKs and UI tools should use `namespace` field but server must use `namespace_id` only.
|
|
462
495
|
string namespace = 2;
|
|
496
|
+
string namespace_id = 5;
|
|
463
497
|
temporal.api.common.v1.WorkflowExecution workflow_execution = 3;
|
|
464
498
|
// Deprecated
|
|
465
499
|
string control = 4;
|
|
@@ -472,8 +506,10 @@ message UpsertWorkflowSearchAttributesEventAttributes {
|
|
|
472
506
|
}
|
|
473
507
|
|
|
474
508
|
message StartChildWorkflowExecutionInitiatedEventAttributes {
|
|
475
|
-
// Namespace of the child workflow
|
|
509
|
+
// Namespace of the child workflow.
|
|
510
|
+
// SDKs and UI tools should use `namespace` field but server must use `namespace_id` only.
|
|
476
511
|
string namespace = 1;
|
|
512
|
+
string namespace_id = 18;
|
|
477
513
|
string workflow_id = 2;
|
|
478
514
|
temporal.api.common.v1.WorkflowType workflow_type = 3;
|
|
479
515
|
temporal.api.taskqueue.v1.TaskQueue task_queue = 4;
|
|
@@ -501,8 +537,10 @@ message StartChildWorkflowExecutionInitiatedEventAttributes {
|
|
|
501
537
|
}
|
|
502
538
|
|
|
503
539
|
message StartChildWorkflowExecutionFailedEventAttributes {
|
|
504
|
-
// Namespace of the child workflow
|
|
540
|
+
// Namespace of the child workflow.
|
|
541
|
+
// SDKs and UI tools should use `namespace` field but server must use `namespace_id` only.
|
|
505
542
|
string namespace = 1;
|
|
543
|
+
string namespace_id = 8;
|
|
506
544
|
string workflow_id = 2;
|
|
507
545
|
temporal.api.common.v1.WorkflowType workflow_type = 3;
|
|
508
546
|
temporal.api.enums.v1.StartChildWorkflowExecutionFailedCause cause = 4;
|
|
@@ -515,8 +553,10 @@ message StartChildWorkflowExecutionFailedEventAttributes {
|
|
|
515
553
|
}
|
|
516
554
|
|
|
517
555
|
message ChildWorkflowExecutionStartedEventAttributes {
|
|
518
|
-
// Namespace of the child workflow
|
|
556
|
+
// Namespace of the child workflow.
|
|
557
|
+
// SDKs and UI tools should use `namespace` field but server must use `namespace_id` only.
|
|
519
558
|
string namespace = 1;
|
|
559
|
+
string namespace_id = 6;
|
|
520
560
|
// Id of the `START_CHILD_WORKFLOW_EXECUTION_INITIATED` event which this event corresponds to
|
|
521
561
|
int64 initiated_event_id = 2;
|
|
522
562
|
temporal.api.common.v1.WorkflowExecution workflow_execution = 3;
|
|
@@ -526,8 +566,10 @@ message ChildWorkflowExecutionStartedEventAttributes {
|
|
|
526
566
|
|
|
527
567
|
message ChildWorkflowExecutionCompletedEventAttributes {
|
|
528
568
|
temporal.api.common.v1.Payloads result = 1;
|
|
529
|
-
// Namespace of the child workflow
|
|
569
|
+
// Namespace of the child workflow.
|
|
570
|
+
// SDKs and UI tools should use `namespace` field but server must use `namespace_id` only.
|
|
530
571
|
string namespace = 2;
|
|
572
|
+
string namespace_id = 7;
|
|
531
573
|
temporal.api.common.v1.WorkflowExecution workflow_execution = 3;
|
|
532
574
|
temporal.api.common.v1.WorkflowType workflow_type = 4;
|
|
533
575
|
// Id of the `START_CHILD_WORKFLOW_EXECUTION_INITIATED` event which this event corresponds to
|
|
@@ -538,8 +580,10 @@ message ChildWorkflowExecutionCompletedEventAttributes {
|
|
|
538
580
|
|
|
539
581
|
message ChildWorkflowExecutionFailedEventAttributes {
|
|
540
582
|
temporal.api.failure.v1.Failure failure = 1;
|
|
541
|
-
// Namespace of the child workflow
|
|
583
|
+
// Namespace of the child workflow.
|
|
584
|
+
// SDKs and UI tools should use `namespace` field but server must use `namespace_id` only.
|
|
542
585
|
string namespace = 2;
|
|
586
|
+
string namespace_id = 8;
|
|
543
587
|
temporal.api.common.v1.WorkflowExecution workflow_execution = 3;
|
|
544
588
|
temporal.api.common.v1.WorkflowType workflow_type = 4;
|
|
545
589
|
// Id of the `START_CHILD_WORKFLOW_EXECUTION_INITIATED` event which this event corresponds to
|
|
@@ -551,8 +595,10 @@ message ChildWorkflowExecutionFailedEventAttributes {
|
|
|
551
595
|
|
|
552
596
|
message ChildWorkflowExecutionCanceledEventAttributes {
|
|
553
597
|
temporal.api.common.v1.Payloads details = 1;
|
|
554
|
-
// Namespace of the child workflow
|
|
598
|
+
// Namespace of the child workflow.
|
|
599
|
+
// SDKs and UI tools should use `namespace` field but server must use `namespace_id` only.
|
|
555
600
|
string namespace = 2;
|
|
601
|
+
string namespace_id = 7;
|
|
556
602
|
temporal.api.common.v1.WorkflowExecution workflow_execution = 3;
|
|
557
603
|
temporal.api.common.v1.WorkflowType workflow_type = 4;
|
|
558
604
|
// Id of the `START_CHILD_WORKFLOW_EXECUTION_INITIATED` event which this event corresponds to
|
|
@@ -562,8 +608,10 @@ message ChildWorkflowExecutionCanceledEventAttributes {
|
|
|
562
608
|
}
|
|
563
609
|
|
|
564
610
|
message ChildWorkflowExecutionTimedOutEventAttributes {
|
|
565
|
-
// Namespace of the child workflow
|
|
611
|
+
// Namespace of the child workflow.
|
|
612
|
+
// SDKs and UI tools should use `namespace` field but server must use `namespace_id` only.
|
|
566
613
|
string namespace = 1;
|
|
614
|
+
string namespace_id = 7;
|
|
567
615
|
temporal.api.common.v1.WorkflowExecution workflow_execution = 2;
|
|
568
616
|
temporal.api.common.v1.WorkflowType workflow_type = 3;
|
|
569
617
|
// Id of the `START_CHILD_WORKFLOW_EXECUTION_INITIATED` event which this event corresponds to
|
|
@@ -574,8 +622,10 @@ message ChildWorkflowExecutionTimedOutEventAttributes {
|
|
|
574
622
|
}
|
|
575
623
|
|
|
576
624
|
message ChildWorkflowExecutionTerminatedEventAttributes {
|
|
577
|
-
// Namespace of the child workflow
|
|
625
|
+
// Namespace of the child workflow.
|
|
626
|
+
// SDKs and UI tools should use `namespace` field but server must use `namespace_id` only.
|
|
578
627
|
string namespace = 1;
|
|
628
|
+
string namespace_id = 6;
|
|
579
629
|
temporal.api.common.v1.WorkflowExecution workflow_execution = 2;
|
|
580
630
|
temporal.api.common.v1.WorkflowType workflow_type = 3;
|
|
581
631
|
// Id of the `START_CHILD_WORKFLOW_EXECUTION_INITIATED` event which this event corresponds to
|
|
@@ -47,6 +47,10 @@ message NamespaceInfo {
|
|
|
47
47
|
// A key-value map for any customized purpose.
|
|
48
48
|
map<string, string> data = 5;
|
|
49
49
|
string id = 6;
|
|
50
|
+
|
|
51
|
+
// Whether scheduled workflows are supported on this namespace. This is only needed
|
|
52
|
+
// temporarily while the feature is experimental, so we can give it a high tag.
|
|
53
|
+
bool supports_schedules = 100;
|
|
50
54
|
}
|
|
51
55
|
|
|
52
56
|
message NamespaceConfig {
|
|
@@ -74,6 +78,8 @@ message UpdateNamespaceInfo {
|
|
|
74
78
|
string description = 1;
|
|
75
79
|
string owner_email = 2;
|
|
76
80
|
// A key-value map for any customized purpose.
|
|
81
|
+
// If data already exists on the namespace,
|
|
82
|
+
// this will merge with the existing key values.
|
|
77
83
|
map<string, string> data = 3;
|
|
78
84
|
// New namespace state, server will reject if transition is not allowed.
|
|
79
85
|
// Allowed transitions are:
|
|
@@ -82,3 +88,10 @@ message UpdateNamespaceInfo {
|
|
|
82
88
|
// Default is NAMESPACE_STATE_UNSPECIFIED which is do not change state.
|
|
83
89
|
temporal.api.enums.v1.NamespaceState state = 4;
|
|
84
90
|
}
|
|
91
|
+
|
|
92
|
+
message NamespaceFilter {
|
|
93
|
+
// By default namespaces in NAMESPACE_STATE_DELETED state are not included.
|
|
94
|
+
// Setting include_deleted to true will include deleted namespaces.
|
|
95
|
+
// Note: Namespace is in NAMESPACE_STATE_DELETED state when it was deleted from the system but associated data is not deleted yet.
|
|
96
|
+
bool include_deleted = 1;
|
|
97
|
+
}
|
|
@@ -0,0 +1,163 @@
|
|
|
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
|
+
syntax = "proto3";
|
|
24
|
+
|
|
25
|
+
package temporal.api.operatorservice.v1;
|
|
26
|
+
|
|
27
|
+
option go_package = "go.temporal.io/api/operatorservice/v1;operatorservice";
|
|
28
|
+
option java_package = "io.temporal.api.operatorservice.v1";
|
|
29
|
+
option java_multiple_files = true;
|
|
30
|
+
option java_outer_classname = "RequestResponseProto";
|
|
31
|
+
option ruby_package = "Temporal::Api::OperatorService::V1";
|
|
32
|
+
option csharp_namespace = "Temporal.Api.OperatorService.V1";
|
|
33
|
+
|
|
34
|
+
import "dependencies/gogoproto/gogo.proto";
|
|
35
|
+
import "google/protobuf/timestamp.proto";
|
|
36
|
+
import "google/protobuf/duration.proto";
|
|
37
|
+
|
|
38
|
+
import "temporal/api/cluster/v1/message.proto";
|
|
39
|
+
import "temporal/api/common/v1/message.proto";
|
|
40
|
+
import "temporal/api/enums/v1/cluster.proto";
|
|
41
|
+
import "temporal/api/enums/v1/common.proto";
|
|
42
|
+
import "temporal/api/version/v1/message.proto";
|
|
43
|
+
|
|
44
|
+
// (-- Search Attribute --)
|
|
45
|
+
|
|
46
|
+
message AddSearchAttributesRequest {
|
|
47
|
+
// Mapping between search attribute name and its IndexedValueType.
|
|
48
|
+
map<string, temporal.api.enums.v1.IndexedValueType> search_attributes = 1;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
message AddSearchAttributesResponse {
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
message RemoveSearchAttributesRequest {
|
|
55
|
+
// Search attribute names to delete.
|
|
56
|
+
repeated string search_attributes = 1;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
message RemoveSearchAttributesResponse {
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
message ListSearchAttributesRequest {
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
message ListSearchAttributesResponse {
|
|
66
|
+
// Mapping between custom (user-registered) search attribute name to its IndexedValueType.
|
|
67
|
+
map<string, temporal.api.enums.v1.IndexedValueType> custom_attributes = 1;
|
|
68
|
+
// Mapping between system (predefined) search attribute name to its IndexedValueType.
|
|
69
|
+
map<string, temporal.api.enums.v1.IndexedValueType> system_attributes = 2;
|
|
70
|
+
// Mapping from the attribute name to the visibility storage native type.
|
|
71
|
+
map<string, string> storage_schema = 3;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
// (-- api-linter: core::0135::request-unknown-fields=disabled
|
|
75
|
+
// aip.dev/not-precedent: DeleteNamespace RPC doesn't follow Google API format. --)
|
|
76
|
+
// (-- api-linter: core::0135::request-name-required=disabled
|
|
77
|
+
// aip.dev/not-precedent: DeleteNamespace RPC doesn't follow Google API format. --)
|
|
78
|
+
message DeleteNamespaceRequest {
|
|
79
|
+
string namespace = 1;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
message DeleteNamespaceResponse {
|
|
83
|
+
// Temporary namespace name that is used during reclaim resources step.
|
|
84
|
+
string deleted_namespace = 1;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
// This message is EXPERIMENTAL and may be changed or removed in a later release.
|
|
88
|
+
// (-- api-linter: core::0135::request-unknown-fields=disabled
|
|
89
|
+
// aip.dev/not-precedent: DeleteNamespace RPC doesn't follow Google API format. --)
|
|
90
|
+
// (-- api-linter: core::0135::request-name-required=disabled
|
|
91
|
+
// aip.dev/not-precedent: DeleteNamespace RPC doesn't follow Google API format. --)
|
|
92
|
+
message DeleteWorkflowExecutionRequest {
|
|
93
|
+
string namespace = 1;
|
|
94
|
+
// Workflow executions to delete. If run_id is not specified, last one is used.
|
|
95
|
+
temporal.api.common.v1.WorkflowExecution workflow_execution = 2;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
// This message is EXPERIMENTAL and may be changed or removed in a later release.
|
|
99
|
+
message DeleteWorkflowExecutionResponse {
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
message AddOrUpdateRemoteClusterRequest {
|
|
103
|
+
string frontend_address = 1;
|
|
104
|
+
bool enable_remote_cluster_connection = 2;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
message AddOrUpdateRemoteClusterResponse {
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
message RemoveRemoteClusterRequest {
|
|
111
|
+
string cluster_name = 1;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
message RemoveRemoteClusterResponse {
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
message DescribeClusterRequest {
|
|
118
|
+
string cluster_name = 1;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
message DescribeClusterResponse {
|
|
122
|
+
map<string,string> supported_clients = 1;
|
|
123
|
+
string server_version = 2;
|
|
124
|
+
temporal.api.cluster.v1.MembershipInfo membership_info = 3;
|
|
125
|
+
string cluster_id = 4;
|
|
126
|
+
string cluster_name = 5;
|
|
127
|
+
int32 history_shard_count = 6;
|
|
128
|
+
string persistence_store = 7;
|
|
129
|
+
string visibility_store = 8;
|
|
130
|
+
temporal.api.version.v1.VersionInfo version_info = 9;
|
|
131
|
+
int64 failover_version_increment = 10;
|
|
132
|
+
int64 initial_failover_version = 11;
|
|
133
|
+
bool is_global_namespace_enabled = 12;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
message ListClustersRequest {
|
|
137
|
+
int32 page_size = 1;
|
|
138
|
+
bytes next_page_token = 2;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
message ListClustersResponse {
|
|
142
|
+
repeated temporal.api.cluster.v1.ClusterMetadata clusters = 1;
|
|
143
|
+
bytes next_page_token = 2;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
message ListClusterMembersRequest {
|
|
147
|
+
// (-- api-linter: core::0140::prepositions=disabled
|
|
148
|
+
// aip.dev/not-precedent: "within" is used to indicate a time range. --)
|
|
149
|
+
google.protobuf.Duration last_heartbeat_within = 1 [(gogoproto.stdduration) = true];
|
|
150
|
+
string rpc_address = 2;
|
|
151
|
+
string host_id = 3;
|
|
152
|
+
temporal.api.enums.v1.ClusterMemberRole role = 4;
|
|
153
|
+
// (-- api-linter: core::0140::prepositions=disabled
|
|
154
|
+
// aip.dev/not-precedent: "after" is used to indicate a time range. --)
|
|
155
|
+
google.protobuf.Timestamp session_started_after_time = 5 [(gogoproto.stdtime) = true];
|
|
156
|
+
int32 page_size = 6;
|
|
157
|
+
bytes next_page_token = 7;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
message ListClusterMembersResponse {
|
|
161
|
+
repeated temporal.api.cluster.v1.ClusterMember active_members = 1;
|
|
162
|
+
bytes next_page_token = 2;
|
|
163
|
+
}
|
|
@@ -0,0 +1,97 @@
|
|
|
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
|
+
syntax = "proto3";
|
|
24
|
+
|
|
25
|
+
package temporal.api.operatorservice.v1;
|
|
26
|
+
|
|
27
|
+
option go_package = "go.temporal.io/api/operatorservice/v1;operatorservice";
|
|
28
|
+
option java_package = "io.temporal.api.operatorservice.v1";
|
|
29
|
+
option java_multiple_files = true;
|
|
30
|
+
option java_outer_classname = "ServiceProto";
|
|
31
|
+
option ruby_package = "Temporal::Api::OperatorService::V1";
|
|
32
|
+
option csharp_namespace = "Temporal.Api.OperatorService.V1";
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
import "temporal/api/operatorservice/v1/request_response.proto";
|
|
36
|
+
|
|
37
|
+
// OperatorService API defines how Temporal SDKs and other clients interact with the Temporal server
|
|
38
|
+
// to perform administrative functions like registering a search attribute or a namespace.
|
|
39
|
+
// APIs in this file could be not compatible with Temporal Cloud, hence it's usage in SDKs should be limited by
|
|
40
|
+
// designated APIs that clearly state that they shouldn't be used by the main Application (Workflows & Activities) framework.
|
|
41
|
+
service OperatorService {
|
|
42
|
+
// (-- Search Attribute --)
|
|
43
|
+
|
|
44
|
+
// AddSearchAttributes add custom search attributes.
|
|
45
|
+
//
|
|
46
|
+
// Returns ALREADY_EXISTS status code if a Search Attribute with any of the specified names already exists
|
|
47
|
+
// Returns INTERNAL status code with temporal.api.errordetails.v1.SystemWorkflowFailure in Error Details if registration process fails,
|
|
48
|
+
rpc AddSearchAttributes (AddSearchAttributesRequest) returns (AddSearchAttributesResponse) {
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// RemoveSearchAttributes removes custom search attributes.
|
|
52
|
+
//
|
|
53
|
+
// Returns NOT_FOUND status code if a Search Attribute with any of the specified names is not registered
|
|
54
|
+
rpc RemoveSearchAttributes (RemoveSearchAttributesRequest) returns (RemoveSearchAttributesResponse) {
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
// ListSearchAttributes returns comprehensive information about search attributes.
|
|
58
|
+
rpc ListSearchAttributes (ListSearchAttributesRequest) returns (ListSearchAttributesResponse) {
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
// DeleteNamespace synchronously deletes a namespace and asynchronously reclaims all namespace resources.
|
|
62
|
+
// (-- api-linter: core::0135::method-signature=disabled
|
|
63
|
+
// aip.dev/not-precedent: DeleteNamespace RPC doesn't follow Google API format. --)
|
|
64
|
+
// (-- api-linter: core::0135::response-message-name=disabled
|
|
65
|
+
// aip.dev/not-precedent: DeleteNamespace RPC doesn't follow Google API format. --)
|
|
66
|
+
rpc DeleteNamespace (DeleteNamespaceRequest) returns (DeleteNamespaceResponse) {
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
// DeleteWorkflowExecution deletes a closed workflow execution asynchronously (workflow must be completed or terminated before).
|
|
70
|
+
// This method is EXPERIMENTAL and may be changed or removed in a later release.
|
|
71
|
+
// (-- api-linter: core::0135::method-signature=disabled
|
|
72
|
+
// aip.dev/not-precedent: DeleteNamespace RPC doesn't follow Google API format. --)
|
|
73
|
+
// (-- api-linter: core::0135::response-message-name=disabled
|
|
74
|
+
// aip.dev/not-precedent: DeleteNamespace RPC doesn't follow Google API format. --)
|
|
75
|
+
rpc DeleteWorkflowExecution (DeleteWorkflowExecutionRequest) returns (DeleteWorkflowExecutionResponse) {
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
// AddOrUpdateRemoteCluster adds or updates remote cluster.
|
|
79
|
+
rpc AddOrUpdateRemoteCluster(AddOrUpdateRemoteClusterRequest) returns (AddOrUpdateRemoteClusterResponse) {
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
// RemoveRemoteCluster removes remote cluster.
|
|
83
|
+
rpc RemoveRemoteCluster(RemoveRemoteClusterRequest) returns (RemoveRemoteClusterResponse) {
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
// DescribeCluster returns information about Temporal cluster.
|
|
87
|
+
rpc DescribeCluster(DescribeClusterRequest) returns (DescribeClusterResponse) {
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
// ListClusters returns information about Temporal clusters.
|
|
91
|
+
rpc ListClusters(ListClustersRequest) returns (ListClustersResponse) {
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
// ListClusterMembers returns information about Temporal cluster members.
|
|
95
|
+
rpc ListClusterMembers(ListClusterMembersRequest) returns (ListClusterMembersResponse) {
|
|
96
|
+
}
|
|
97
|
+
}
|