@temporalio/core-bridge 1.14.1 → 1.15.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 +648 -606
- package/bridge-macros/src/derive_tryintojs.rs +40 -0
- package/lib/native.d.ts +23 -2
- package/package.json +12 -13
- 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/multi-worker-manual-test +0 -0
- package/sdk-core/AGENTS.md +2 -2
- package/sdk-core/Cargo.toml +1 -1
- package/sdk-core/README.md +5 -5
- package/sdk-core/crates/client/src/raw.rs +90 -0
- package/sdk-core/crates/client/src/worker/mod.rs +103 -28
- package/sdk-core/crates/common/Cargo.toml +1 -1
- package/sdk-core/crates/common/protos/api_upstream/.github/workflows/create-release.yml +0 -5
- package/sdk-core/crates/common/protos/api_upstream/README.md +8 -0
- package/sdk-core/crates/common/protos/api_upstream/buf.yaml +3 -0
- package/sdk-core/crates/common/protos/api_upstream/openapi/openapiv2.json +2738 -2452
- package/sdk-core/crates/common/protos/api_upstream/openapi/openapiv3.yaml +1657 -124
- package/sdk-core/crates/common/protos/api_upstream/temporal/api/activity/v1/message.proto +155 -3
- package/sdk-core/crates/common/protos/api_upstream/temporal/api/command/v1/message.proto +26 -0
- package/sdk-core/crates/common/protos/api_upstream/temporal/api/common/v1/message.proto +8 -1
- package/sdk-core/crates/common/protos/api_upstream/temporal/api/deployment/v1/message.proto +26 -0
- package/sdk-core/crates/common/protos/api_upstream/temporal/api/enums/v1/activity.proto +81 -0
- package/sdk-core/crates/common/protos/api_upstream/temporal/api/enums/v1/event_type.proto +4 -0
- package/sdk-core/crates/common/protos/api_upstream/temporal/api/enums/v1/failed_cause.proto +4 -0
- package/sdk-core/crates/common/protos/api_upstream/temporal/api/enums/v1/task_queue.proto +15 -0
- package/sdk-core/crates/common/protos/api_upstream/temporal/api/enums/v1/workflow.proto +62 -15
- package/sdk-core/crates/common/protos/api_upstream/temporal/api/errordetails/v1/message.proto +8 -0
- package/sdk-core/crates/common/protos/api_upstream/temporal/api/history/v1/message.proto +107 -17
- package/sdk-core/crates/common/protos/api_upstream/temporal/api/namespace/v1/message.proto +15 -0
- package/sdk-core/crates/common/protos/api_upstream/temporal/api/nexus/v1/message.proto +4 -0
- package/sdk-core/crates/common/protos/api_upstream/temporal/api/operatorservice/v1/request_response.proto +4 -0
- package/sdk-core/crates/common/protos/api_upstream/temporal/api/schedule/v1/message.proto +2 -2
- package/sdk-core/crates/common/protos/api_upstream/temporal/api/taskqueue/v1/message.proto +2 -0
- package/sdk-core/crates/common/protos/api_upstream/temporal/api/worker/v1/message.proto +4 -7
- package/sdk-core/crates/common/protos/api_upstream/temporal/api/workflow/v1/message.proto +80 -22
- package/sdk-core/crates/common/protos/api_upstream/temporal/api/workflowservice/v1/request_response.proto +285 -19
- package/sdk-core/crates/common/protos/api_upstream/temporal/api/workflowservice/v1/service.proto +154 -10
- package/sdk-core/crates/common/protos/local/temporal/sdk/core/core_interface.proto +15 -0
- package/sdk-core/crates/common/protos/local/temporal/sdk/core/nexus/nexus.proto +5 -0
- package/sdk-core/crates/common/protos/local/temporal/sdk/core/workflow_activation/workflow_activation.proto +4 -0
- package/sdk-core/crates/common/protos/local/temporal/sdk/core/workflow_commands/workflow_commands.proto +17 -0
- package/sdk-core/crates/common/src/lib.rs +3 -3
- package/sdk-core/crates/common/src/protos/canned_histories.rs +16 -0
- package/sdk-core/crates/common/src/protos/mod.rs +12 -0
- package/sdk-core/crates/common/src/telemetry/metrics.rs +6 -4
- package/sdk-core/crates/common/src/telemetry.rs +14 -15
- package/sdk-core/crates/common/src/worker.rs +66 -99
- package/sdk-core/crates/common/tests/worker_task_types_test.rs +9 -9
- package/sdk-core/crates/sdk/src/lib.rs +10 -8
- package/sdk-core/crates/sdk/src/workflow_context/options.rs +19 -0
- package/sdk-core/crates/sdk-core/Cargo.toml +2 -1
- package/sdk-core/crates/sdk-core/benches/workflow_replay_bench.rs +4 -19
- package/sdk-core/crates/sdk-core/src/core_tests/mod.rs +9 -6
- package/sdk-core/crates/sdk-core/src/core_tests/workers.rs +166 -13
- package/sdk-core/crates/sdk-core/src/core_tests/workflow_tasks.rs +42 -33
- package/sdk-core/crates/sdk-core/src/ephemeral_server/mod.rs +6 -9
- package/sdk-core/crates/sdk-core/src/lib.rs +20 -13
- package/sdk-core/crates/sdk-core/src/pollers/poll_buffer.rs +301 -21
- package/sdk-core/crates/sdk-core/src/telemetry/log_export.rs +7 -10
- package/sdk-core/crates/sdk-core/src/telemetry/metrics.rs +4 -2
- package/sdk-core/crates/sdk-core/src/telemetry/mod.rs +2 -3
- package/sdk-core/crates/sdk-core/src/test_help/integ_helpers.rs +30 -8
- package/sdk-core/crates/sdk-core/src/worker/activities/activity_heartbeat_manager.rs +1 -0
- package/sdk-core/crates/sdk-core/src/worker/client/mocks.rs +3 -1
- package/sdk-core/crates/sdk-core/src/worker/client.rs +2 -6
- package/sdk-core/crates/sdk-core/src/worker/heartbeat.rs +4 -4
- package/sdk-core/crates/sdk-core/src/worker/mod.rs +92 -53
- package/sdk-core/crates/sdk-core/src/worker/nexus.rs +5 -0
- package/sdk-core/crates/sdk-core/src/worker/tuner/resource_based.rs +12 -14
- package/sdk-core/crates/sdk-core/src/worker/tuner.rs +36 -36
- package/sdk-core/crates/sdk-core/src/worker/workflow/machines/patch_state_machine.rs +5 -8
- package/sdk-core/crates/sdk-core/src/worker/workflow/machines/workflow_machines.rs +12 -1
- package/sdk-core/crates/sdk-core/src/worker/workflow/managed_run.rs +6 -23
- package/sdk-core/crates/sdk-core/src/worker/workflow/mod.rs +46 -3
- package/sdk-core/crates/sdk-core/tests/common/mod.rs +45 -45
- package/sdk-core/crates/sdk-core/tests/global_metric_tests.rs +7 -10
- package/sdk-core/crates/sdk-core/tests/heavy_tests/fuzzy_workflow.rs +3 -5
- package/sdk-core/crates/sdk-core/tests/heavy_tests.rs +34 -42
- package/sdk-core/crates/sdk-core/tests/integ_tests/ephemeral_server_tests.rs +21 -26
- package/sdk-core/crates/sdk-core/tests/integ_tests/heartbeat_tests.rs +1 -0
- package/sdk-core/crates/sdk-core/tests/integ_tests/metrics_tests.rs +147 -72
- package/sdk-core/crates/sdk-core/tests/integ_tests/polling_tests.rs +27 -48
- package/sdk-core/crates/sdk-core/tests/integ_tests/update_tests.rs +5 -15
- package/sdk-core/crates/sdk-core/tests/integ_tests/worker_heartbeat_tests.rs +61 -66
- package/sdk-core/crates/sdk-core/tests/integ_tests/worker_tests.rs +16 -14
- package/sdk-core/crates/sdk-core/tests/integ_tests/worker_versioning_tests.rs +15 -21
- package/sdk-core/crates/sdk-core/tests/integ_tests/workflow_tests/activities.rs +16 -19
- package/sdk-core/crates/sdk-core/tests/integ_tests/workflow_tests/cancel_external.rs +1 -3
- package/sdk-core/crates/sdk-core/tests/integ_tests/workflow_tests/cancel_wf.rs +1 -3
- package/sdk-core/crates/sdk-core/tests/integ_tests/workflow_tests/child_workflows.rs +4 -12
- package/sdk-core/crates/sdk-core/tests/integ_tests/workflow_tests/continue_as_new.rs +14 -9
- package/sdk-core/crates/sdk-core/tests/integ_tests/workflow_tests/determinism.rs +1 -3
- package/sdk-core/crates/sdk-core/tests/integ_tests/workflow_tests/eager.rs +2 -6
- package/sdk-core/crates/sdk-core/tests/integ_tests/workflow_tests/local_activities.rs +4 -8
- package/sdk-core/crates/sdk-core/tests/integ_tests/workflow_tests/modify_wf_properties.rs +1 -3
- package/sdk-core/crates/sdk-core/tests/integ_tests/workflow_tests/nexus.rs +11 -13
- package/sdk-core/crates/sdk-core/tests/integ_tests/workflow_tests/patches.rs +11 -27
- package/sdk-core/crates/sdk-core/tests/integ_tests/workflow_tests/resets.rs +3 -5
- package/sdk-core/crates/sdk-core/tests/integ_tests/workflow_tests/signals.rs +4 -12
- package/sdk-core/crates/sdk-core/tests/integ_tests/workflow_tests/stickyness.rs +7 -13
- package/sdk-core/crates/sdk-core/tests/integ_tests/workflow_tests/timers.rs +4 -12
- package/sdk-core/crates/sdk-core/tests/integ_tests/workflow_tests/upsert_search_attrs.rs +1 -3
- package/sdk-core/crates/sdk-core/tests/integ_tests/workflow_tests.rs +16 -30
- package/sdk-core/crates/sdk-core/tests/main.rs +6 -2
- package/sdk-core/crates/sdk-core/tests/manual_tests.rs +40 -49
- package/sdk-core/crates/sdk-core/tests/runner.rs +4 -6
- package/sdk-core/crates/sdk-core/tests/shared_tests/mod.rs +28 -13
- package/sdk-core/crates/sdk-core-c-bridge/Cargo.toml +1 -0
- package/sdk-core/crates/sdk-core-c-bridge/include/temporal-sdk-core-c-bridge.h +24 -13
- package/sdk-core/crates/sdk-core-c-bridge/src/client.rs +103 -19
- package/sdk-core/crates/sdk-core-c-bridge/src/lib.rs +89 -5
- package/sdk-core/crates/sdk-core-c-bridge/src/metric.rs +1 -2
- package/sdk-core/crates/sdk-core-c-bridge/src/runtime.rs +59 -66
- package/sdk-core/crates/sdk-core-c-bridge/src/testing.rs +10 -10
- package/sdk-core/crates/sdk-core-c-bridge/src/tests/context.rs +46 -11
- package/sdk-core/crates/sdk-core-c-bridge/src/tests/mod.rs +103 -7
- package/sdk-core/crates/sdk-core-c-bridge/src/tests/utils.rs +6 -48
- package/sdk-core/crates/sdk-core-c-bridge/src/worker.rs +13 -17
- package/sdk-core/docker-cgroup-tests.sh +0 -0
- package/sdk-core/etc/cargo-tokio-console.sh +0 -0
- package/sdk-core/etc/integ-with-otel.sh +0 -0
- package/sdk-core/etc/regen-depgraph.sh +0 -0
- package/src/client.rs +30 -0
- package/src/helpers/try_into_js.rs +88 -2
- package/src/metrics.rs +272 -22
- package/src/runtime.rs +91 -41
- package/src/testing.rs +9 -16
- package/src/worker.rs +76 -55
- package/ts/native.ts +38 -2
- package/LICENSE +0 -21
- package/sdk-core/crates/macros/LICENSE.txt +0 -21
|
@@ -136,22 +136,50 @@ message WorkflowExecutionStartedEventAttributes {
|
|
|
136
136
|
reserved 36;
|
|
137
137
|
reserved "parent_pinned_deployment_version";
|
|
138
138
|
|
|
139
|
+
|
|
139
140
|
// If present, the new workflow should start on this version with pinned base behavior.
|
|
140
141
|
// Child of pinned parent will inherit the parent's version if the Child's Task Queue belongs to that version.
|
|
141
142
|
//
|
|
142
|
-
//
|
|
143
|
+
// A new run initiated by workflow ContinueAsNew of pinned run, will inherit the previous run's version if the
|
|
143
144
|
// new run's Task Queue belongs to that version.
|
|
144
145
|
//
|
|
145
|
-
//
|
|
146
|
+
// A new run initiated by workflow Cron will never inherit.
|
|
146
147
|
//
|
|
147
|
-
//
|
|
148
|
+
// A new run initiated by workflow Retry will only inherit if the retried run is effectively pinned at the time
|
|
148
149
|
// of retry, and the retried run inherited a pinned version when it started (ie. it is a child of a pinned
|
|
149
150
|
// parent, or a CaN of a pinned run, and is running on a Task Queue in the inherited version).
|
|
150
151
|
//
|
|
151
152
|
// Pinned override is inherited if Task Queue of new run is compatible with the override version.
|
|
152
153
|
// Override is inherited separately and takes precedence over inherited base version.
|
|
154
|
+
//
|
|
155
|
+
// Note: This field is mutually exclusive with inherited_auto_upgrade_info.
|
|
156
|
+
// Additionaly, versioning_override, if present, overrides this field during routing decisions.
|
|
153
157
|
temporal.api.deployment.v1.WorkerDeploymentVersion inherited_pinned_version = 37;
|
|
154
158
|
|
|
159
|
+
// If present, the new workflow begins with AutoUpgrade behavior. Before dispatching the
|
|
160
|
+
// first workflow task, this field is set to the deployment version on which the parent/
|
|
161
|
+
// previous run was operating. This inheritance only happens when the task queues belong to
|
|
162
|
+
// the same deployment version. The first workflow task will then be dispatched to either
|
|
163
|
+
// this inherited deployment version, or the current deployment version of the task queue's
|
|
164
|
+
// Deployment. After the first workflow task, the effective behavior depends on worker-sent
|
|
165
|
+
// values in subsequent workflow tasks.
|
|
166
|
+
//
|
|
167
|
+
// Inheritance rules:
|
|
168
|
+
// - ContinueAsNew and child workflows: inherit AutoUpgrade behavior and deployment version
|
|
169
|
+
// - Cron: never inherits
|
|
170
|
+
// - Retry: inherits only if the retried run is effectively AutoUpgrade at the time of
|
|
171
|
+
// retry, and inherited AutoUpgrade behavior when it started (i.e. it is a child of an
|
|
172
|
+
// AutoUpgrade parent or ContinueAsNew of an AutoUpgrade run, running on the same
|
|
173
|
+
// deployment as the parent/previous run)
|
|
174
|
+
//
|
|
175
|
+
// Additional notes:
|
|
176
|
+
// - This field is mutually exclusive with `inherited_pinned_version`.
|
|
177
|
+
// - `versioning_override`, if present, overrides this field during routing decisions.
|
|
178
|
+
// - SDK implementations do not interact with this field and is only used internally by
|
|
179
|
+
// the server to ensure task routing correctness.
|
|
180
|
+
temporal.api.deployment.v1.InheritedAutoUpgradeInfo inherited_auto_upgrade_info = 39;
|
|
181
|
+
|
|
182
|
+
|
|
155
183
|
// A boolean indicating whether the SDK has asked to eagerly execute the first workflow task for this workflow and
|
|
156
184
|
// eager execution was accepted by the server.
|
|
157
185
|
// Only populated by server with version >= 1.29.0.
|
|
@@ -195,15 +223,17 @@ message WorkflowExecutionContinuedAsNewEventAttributes {
|
|
|
195
223
|
google.protobuf.Duration workflow_task_timeout = 6;
|
|
196
224
|
// The `WORKFLOW_TASK_COMPLETED` event which this command was reported with
|
|
197
225
|
int64 workflow_task_completed_event_id = 7;
|
|
198
|
-
//
|
|
226
|
+
// How long the server will wait before scheduling the first workflow task for the new run.
|
|
227
|
+
// Used for cron, retry, and other continue-as-new cases that server may enforce some minimal
|
|
228
|
+
// delay between new runs for system protection purpose.
|
|
199
229
|
google.protobuf.Duration backoff_start_interval = 8;
|
|
200
230
|
temporal.api.enums.v1.ContinueAsNewInitiator initiator = 9;
|
|
201
|
-
// TODO: David are these right?
|
|
202
231
|
// Deprecated. If a workflow's retry policy would cause a new run to start when the current one
|
|
203
232
|
// has failed, this field would be populated with that failure. Now (when supported by server
|
|
204
233
|
// and sdk) the final event will be `WORKFLOW_EXECUTION_FAILED` with `new_execution_run_id` set.
|
|
205
234
|
temporal.api.failure.v1.Failure failure = 10 [deprecated = true];
|
|
206
|
-
//
|
|
235
|
+
// The result from the most recent completed run of this workflow. The SDK surfaces this to the
|
|
236
|
+
// new run via APIs such as `GetLastCompletionResult`.
|
|
207
237
|
temporal.api.common.v1.Payloads last_completion_result = 11;
|
|
208
238
|
temporal.api.common.v1.Header header = 12;
|
|
209
239
|
temporal.api.common.v1.Memo memo = 13;
|
|
@@ -213,6 +243,11 @@ message WorkflowExecutionContinuedAsNewEventAttributes {
|
|
|
213
243
|
// Deprecated. Only considered for versioning v0.2.
|
|
214
244
|
bool inherit_build_id = 15 [deprecated = true];
|
|
215
245
|
|
|
246
|
+
// Experimental. Optionally decide the versioning behavior that the first task of the new run should use.
|
|
247
|
+
// For example, choose to AutoUpgrade on continue-as-new instead of inheriting the pinned version
|
|
248
|
+
// of the previous run.
|
|
249
|
+
temporal.api.enums.v1.ContinueAsNewVersioningBehavior initial_versioning_behavior = 16;
|
|
250
|
+
|
|
216
251
|
// workflow_execution_timeout is omitted as it shouldn't be overridden from within a workflow.
|
|
217
252
|
}
|
|
218
253
|
|
|
@@ -233,11 +268,18 @@ message WorkflowTaskStartedEventAttributes {
|
|
|
233
268
|
int64 scheduled_event_id = 1;
|
|
234
269
|
// Identity of the worker who picked up this task
|
|
235
270
|
string identity = 2;
|
|
236
|
-
//
|
|
271
|
+
// This field is populated from the RecordWorkflowTaskStartedRequest. Matching service would
|
|
272
|
+
// set the request_id on the RecordWorkflowTaskStartedRequest to a new UUID. This is useful
|
|
273
|
+
// in case a RecordWorkflowTaskStarted call succeed but matching doesn't get that response,
|
|
274
|
+
// so matching could retry and history service would return success if the request_id matches.
|
|
275
|
+
// In that case, matching will continue to deliver the task to worker. Without this field, history
|
|
276
|
+
// service would return AlreadyStarted error, and matching would drop the task.
|
|
237
277
|
string request_id = 3;
|
|
238
|
-
// True if this workflow should continue-as-new soon
|
|
239
|
-
// either event count or bytes) is getting large.
|
|
278
|
+
// True if this workflow should continue-as-new soon. See `suggest_continue_as_new_reasons` for why.
|
|
240
279
|
bool suggest_continue_as_new = 4;
|
|
280
|
+
// The reason(s) that suggest_continue_as_new is true, if it is.
|
|
281
|
+
// Unset if suggest_continue_as_new is false.
|
|
282
|
+
repeated temporal.api.enums.v1.SuggestContinueAsNewReason suggest_continue_as_new_reasons = 8;
|
|
241
283
|
// Total history size in bytes, which the workflow might use to decide when to
|
|
242
284
|
// continue-as-new regardless of the suggestion. Note that history event count is
|
|
243
285
|
// just the event id of this event, so we don't include it explicitly here.
|
|
@@ -313,13 +355,15 @@ message WorkflowTaskFailedEventAttributes {
|
|
|
313
355
|
temporal.api.enums.v1.WorkflowTaskFailedCause cause = 3;
|
|
314
356
|
// The failure details
|
|
315
357
|
temporal.api.failure.v1.Failure failure = 4;
|
|
316
|
-
// If a worker explicitly failed this task,
|
|
358
|
+
// If a worker explicitly failed this task, this field contains the worker's identity.
|
|
359
|
+
// When the server generates the failure internally this field is set as 'history-service'.
|
|
317
360
|
string identity = 5;
|
|
318
361
|
// The original run id of the workflow. For reset workflow.
|
|
319
362
|
string base_run_id = 6;
|
|
320
363
|
// If the workflow is being reset, the new run id.
|
|
321
364
|
string new_run_id = 7;
|
|
322
|
-
//
|
|
365
|
+
// Version of the event where the history branch was forked. Used by multi-cluster replication
|
|
366
|
+
// during resets to identify the correct history branch.
|
|
323
367
|
int64 fork_event_version = 8;
|
|
324
368
|
// Deprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv]
|
|
325
369
|
// If a worker explicitly failed this task, its binary id
|
|
@@ -383,7 +427,12 @@ message ActivityTaskStartedEventAttributes {
|
|
|
383
427
|
int64 scheduled_event_id = 1;
|
|
384
428
|
// id of the worker that picked up this task
|
|
385
429
|
string identity = 2;
|
|
386
|
-
//
|
|
430
|
+
// This field is populated from the RecordActivityTaskStartedRequest. Matching service would
|
|
431
|
+
// set the request_id on the RecordActivityTaskStartedRequest to a new UUID. This is useful
|
|
432
|
+
// in case a RecordActivityTaskStarted call succeed but matching doesn't get that response,
|
|
433
|
+
// so matching could retry and history service would return success if the request_id matches.
|
|
434
|
+
// In that case, matching will continue to deliver the task to worker. Without this field, history
|
|
435
|
+
// service would return AlreadyStarted error, and matching would drop the task.
|
|
387
436
|
string request_id = 3;
|
|
388
437
|
// Starting at 1, the number of times this task has been attempted
|
|
389
438
|
int32 attempt = 4;
|
|
@@ -495,9 +544,9 @@ message TimerCanceledEventAttributes {
|
|
|
495
544
|
|
|
496
545
|
message WorkflowExecutionCancelRequestedEventAttributes {
|
|
497
546
|
// User provided reason for requesting cancellation
|
|
498
|
-
// TODO: shall we create a new field with name "reason" and deprecate this one?
|
|
499
547
|
string cause = 1;
|
|
500
|
-
//
|
|
548
|
+
// The ID of the `REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_INITIATED` event in the external
|
|
549
|
+
// workflow history when the cancellation was requested by another workflow.
|
|
501
550
|
int64 external_initiated_event_id = 2;
|
|
502
551
|
temporal.api.common.v1.WorkflowExecution external_workflow_execution = 3;
|
|
503
552
|
// id of the worker or client who requested this cancel
|
|
@@ -792,11 +841,16 @@ message WorkflowExecutionOptionsUpdatedEventAttributes {
|
|
|
792
841
|
temporal.api.workflow.v1.VersioningOverride versioning_override = 1;
|
|
793
842
|
// Versioning override removed in this event.
|
|
794
843
|
bool unset_versioning_override = 2;
|
|
795
|
-
// Request ID
|
|
844
|
+
// Request ID attached to the running workflow execution so that subsequent requests with same
|
|
796
845
|
// request ID will be deduped.
|
|
797
846
|
string attached_request_id = 3;
|
|
798
847
|
// Completion callbacks attached to the running workflow execution.
|
|
799
848
|
repeated temporal.api.common.v1.Callback attached_completion_callbacks = 4;
|
|
849
|
+
// Optional. The identity of the client who initiated the request that created this event.
|
|
850
|
+
string identity = 5;
|
|
851
|
+
// Priority override upserted in this event. Represents the full priority; not just partial fields.
|
|
852
|
+
// Ignored if nil.
|
|
853
|
+
temporal.api.common.v1.Priority priority = 6;
|
|
800
854
|
}
|
|
801
855
|
|
|
802
856
|
// Not used anywhere. Use case is replaced by WorkflowExecutionOptionsUpdatedEventAttributes
|
|
@@ -869,6 +923,26 @@ message WorkflowExecutionUpdateAdmittedEventAttributes {
|
|
|
869
923
|
temporal.api.enums.v1.UpdateAdmittedEventOrigin origin = 2;
|
|
870
924
|
}
|
|
871
925
|
|
|
926
|
+
// Attributes for an event marking that a workflow execution was paused.
|
|
927
|
+
message WorkflowExecutionPausedEventAttributes {
|
|
928
|
+
// The identity of the client who paused the workflow execution.
|
|
929
|
+
string identity = 1;
|
|
930
|
+
// The reason for pausing the workflow execution.
|
|
931
|
+
string reason = 2;
|
|
932
|
+
// The request ID of the request that paused the workflow execution.
|
|
933
|
+
string request_id = 3;
|
|
934
|
+
}
|
|
935
|
+
|
|
936
|
+
// Attributes for an event marking that a workflow execution was unpaused.
|
|
937
|
+
message WorkflowExecutionUnpausedEventAttributes {
|
|
938
|
+
// The identity of the client who unpaused the workflow execution.
|
|
939
|
+
string identity = 1;
|
|
940
|
+
// The reason for unpausing the workflow execution.
|
|
941
|
+
string reason = 2;
|
|
942
|
+
// The request ID of the request that unpaused the workflow execution.
|
|
943
|
+
string request_id = 3;
|
|
944
|
+
}
|
|
945
|
+
|
|
872
946
|
// Event marking that an operation was scheduled by a workflow via the ScheduleNexusOperation command.
|
|
873
947
|
message NexusOperationScheduledEventAttributes {
|
|
874
948
|
// Endpoint name, must exist in the endpoint registry.
|
|
@@ -901,6 +975,18 @@ message NexusOperationScheduledEventAttributes {
|
|
|
901
975
|
// This is stored on the event and used internally by the server in case the endpoint is renamed from the time the
|
|
902
976
|
// event was originally scheduled.
|
|
903
977
|
string endpoint_id = 9;
|
|
978
|
+
|
|
979
|
+
// Schedule-to-start timeout for this operation.
|
|
980
|
+
// See ScheduleNexusOperationCommandAttributes.schedule_to_start_timeout for details.
|
|
981
|
+
// (-- api-linter: core::0140::prepositions=disabled
|
|
982
|
+
// aip.dev/not-precedent: "to" is used to indicate interval. --)
|
|
983
|
+
google.protobuf.Duration schedule_to_start_timeout = 10;
|
|
984
|
+
|
|
985
|
+
// Start-to-close timeout for this operation.
|
|
986
|
+
// See ScheduleNexusOperationCommandAttributes.start_to_close_timeout for details.
|
|
987
|
+
// (-- api-linter: core::0140::prepositions=disabled
|
|
988
|
+
// aip.dev/not-precedent: "to" is used to indicate interval. --)
|
|
989
|
+
google.protobuf.Duration start_to_close_timeout = 11;
|
|
904
990
|
}
|
|
905
991
|
|
|
906
992
|
// Event marking an asynchronous operation was started by the responding Nexus handler.
|
|
@@ -1006,9 +1092,11 @@ message HistoryEvent {
|
|
|
1006
1092
|
int64 event_id = 1;
|
|
1007
1093
|
google.protobuf.Timestamp event_time = 2;
|
|
1008
1094
|
temporal.api.enums.v1.EventType event_type = 3;
|
|
1009
|
-
//
|
|
1095
|
+
// Failover version of the event, used by the server for multi-cluster replication and history
|
|
1096
|
+
// versioning. SDKs generally ignore this field.
|
|
1010
1097
|
int64 version = 4;
|
|
1011
|
-
//
|
|
1098
|
+
// Identifier used by the service to order replication and transfer tasks associated with this
|
|
1099
|
+
// event. SDKs generally ignore this field.
|
|
1012
1100
|
int64 task_id = 5;
|
|
1013
1101
|
// Set to true when the SDK may ignore the event as it does not impact workflow state or
|
|
1014
1102
|
// information in any way that the SDK need be concerned with. If an SDK encounters an event
|
|
@@ -1085,6 +1173,8 @@ message HistoryEvent {
|
|
|
1085
1173
|
WorkflowExecutionOptionsUpdatedEventAttributes workflow_execution_options_updated_event_attributes = 60;
|
|
1086
1174
|
NexusOperationCancelRequestCompletedEventAttributes nexus_operation_cancel_request_completed_event_attributes = 61;
|
|
1087
1175
|
NexusOperationCancelRequestFailedEventAttributes nexus_operation_cancel_request_failed_event_attributes = 62;
|
|
1176
|
+
WorkflowExecutionPausedEventAttributes workflow_execution_paused_event_attributes = 63;
|
|
1177
|
+
WorkflowExecutionUnpausedEventAttributes workflow_execution_unpaused_event_attributes = 64;
|
|
1088
1178
|
}
|
|
1089
1179
|
}
|
|
1090
1180
|
|
|
@@ -38,6 +38,21 @@ message NamespaceInfo {
|
|
|
38
38
|
bool worker_heartbeats = 4;
|
|
39
39
|
// True if the namespace supports reported problems search attribute
|
|
40
40
|
bool reported_problems_search_attribute = 5;
|
|
41
|
+
// True if the namespace supports pausing workflows
|
|
42
|
+
bool workflow_pause = 6;
|
|
43
|
+
// True if the namespace supports standalone activities
|
|
44
|
+
bool standalone_activities = 7;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
// Namespace configured limits
|
|
48
|
+
Limits limits = 8;
|
|
49
|
+
message Limits {
|
|
50
|
+
// Maximum size in bytes for payload fields in workflow history events
|
|
51
|
+
// (e.g., workflow/activity inputs and results, failure details, signal payloads).
|
|
52
|
+
// When exceeded, the server will reject the operation with an error.
|
|
53
|
+
int64 blob_size_limit_error = 1;
|
|
54
|
+
// Maximum total memo size in bytes per workflow execution.
|
|
55
|
+
int64 memo_size_limit_error = 2;
|
|
41
56
|
}
|
|
42
57
|
|
|
43
58
|
// Whether scheduled workflows are supported on this namespace. This is only needed
|
|
@@ -90,6 +90,10 @@ message Request {
|
|
|
90
90
|
StartOperationRequest start_operation = 3;
|
|
91
91
|
CancelOperationRequest cancel_operation = 4;
|
|
92
92
|
}
|
|
93
|
+
|
|
94
|
+
// The endpoint this request was addressed to before forwarding to the worker.
|
|
95
|
+
// Supported from server version 1.30.0.
|
|
96
|
+
string endpoint = 10;
|
|
93
97
|
}
|
|
94
98
|
|
|
95
99
|
// Response variant for StartOperationRequest.
|
|
@@ -68,6 +68,8 @@ message AddOrUpdateRemoteClusterRequest {
|
|
|
68
68
|
// Frontend HTTP Address is a cross cluster accessible address for HTTP traffic. This field is optional. If not provided
|
|
69
69
|
// on update, the existing HTTP address will be removed.
|
|
70
70
|
string frontend_http_address = 3;
|
|
71
|
+
// Controls whether replication streams are active.
|
|
72
|
+
bool enable_replication = 4;
|
|
71
73
|
}
|
|
72
74
|
|
|
73
75
|
message AddOrUpdateRemoteClusterResponse {
|
|
@@ -107,6 +109,8 @@ message ClusterMetadata {
|
|
|
107
109
|
int32 history_shard_count = 5;
|
|
108
110
|
// A flag to indicate if a connection is active.
|
|
109
111
|
bool is_connection_enabled = 6;
|
|
112
|
+
// A flag to indicate if replication is enabled.
|
|
113
|
+
bool is_replication_enabled = 8;
|
|
110
114
|
}
|
|
111
115
|
|
|
112
116
|
message GetNexusEndpointRequest {
|
|
@@ -81,8 +81,8 @@ message Range {
|
|
|
81
81
|
// corresponding fields of the timestamp, except for year: if year is missing,
|
|
82
82
|
// that means all years match. For all fields besides year, at least one Range
|
|
83
83
|
// must be present to match anything.
|
|
84
|
-
//
|
|
85
|
-
//
|
|
84
|
+
// Relative expressions such as "last day of the month" or "third Monday" are not currently
|
|
85
|
+
// representable; callers must enumerate the concrete days they require.
|
|
86
86
|
message StructuredCalendarSpec {
|
|
87
87
|
// Match seconds (0-59)
|
|
88
88
|
repeated Range second = 1;
|
|
@@ -343,4 +343,6 @@ message TaskQueueConfig {
|
|
|
343
343
|
RateLimitConfig queue_rate_limit = 1;
|
|
344
344
|
// If set, each individual fairness key will be limited to this rate, scaled by the weight of the fairness key.
|
|
345
345
|
RateLimitConfig fairness_keys_rate_limit_default = 2;
|
|
346
|
+
// If set, overrides the fairness weights for the corresponding fairness keys.
|
|
347
|
+
map<string, float> fairness_weight_overrides = 3;
|
|
346
348
|
}
|
|
@@ -54,15 +54,12 @@ message WorkerHostInfo {
|
|
|
54
54
|
// Worker host identifier.
|
|
55
55
|
string host_name = 1;
|
|
56
56
|
|
|
57
|
-
|
|
58
|
-
// Worker process identifier. This id should be unique for all _processes_
|
|
59
|
-
// running workers in the namespace, and should be shared by all workers
|
|
60
|
-
// in the same process.
|
|
57
|
+
// Worker grouping identifier. A key to group workers that share the same client+namespace+process.
|
|
61
58
|
// This will be used to build the worker command nexus task queue name:
|
|
62
|
-
// "temporal-sys/worker-commands/{
|
|
63
|
-
string
|
|
59
|
+
// "temporal-sys/worker-commands/{worker_grouping_key}"
|
|
60
|
+
string worker_grouping_key = 5;
|
|
64
61
|
|
|
65
|
-
// Worker process identifier.
|
|
62
|
+
// Worker process identifier. This id only needs to be unique
|
|
66
63
|
// within one host (so using e.g. a unix pid would be appropriate).
|
|
67
64
|
string process_id = 2;
|
|
68
65
|
|
|
@@ -98,6 +98,12 @@ message WorkflowExecutionInfo {
|
|
|
98
98
|
|
|
99
99
|
// Priority metadata
|
|
100
100
|
temporal.api.common.v1.Priority priority = 24;
|
|
101
|
+
|
|
102
|
+
// Total size in bytes of all external payloads referenced in workflow history.
|
|
103
|
+
int64 external_payload_size_bytes = 25;
|
|
104
|
+
|
|
105
|
+
// Count of external payloads referenced in workflow history.
|
|
106
|
+
int64 external_payload_count = 26;
|
|
101
107
|
}
|
|
102
108
|
|
|
103
109
|
// Holds all the extra information about workflow execution that is not part of Visibility.
|
|
@@ -126,6 +132,9 @@ message WorkflowExecutionExtendedInfo {
|
|
|
126
132
|
// calls (eg: if SignalWithStartWorkflowExecution starts a new workflow, then the request ID is
|
|
127
133
|
// used in the StartWorkflowExecution request).
|
|
128
134
|
map<string, RequestIdInfo> request_id_infos = 7;
|
|
135
|
+
|
|
136
|
+
// Information about the workflow execution pause operation.
|
|
137
|
+
WorkflowExecutionPauseInfo pause_info = 8;
|
|
129
138
|
}
|
|
130
139
|
|
|
131
140
|
// Holds all the information about worker versioning for a particular workflow execution.
|
|
@@ -135,12 +144,14 @@ message WorkflowExecutionVersioningInfo {
|
|
|
135
144
|
// upgraded. When present it means this workflow execution is versioned; UNSPECIFIED means
|
|
136
145
|
// unversioned. See the comments in `VersioningBehavior` enum for more info about different
|
|
137
146
|
// behaviors.
|
|
138
|
-
//
|
|
139
|
-
//
|
|
140
|
-
//
|
|
141
|
-
//
|
|
142
|
-
//
|
|
143
|
-
//
|
|
147
|
+
//
|
|
148
|
+
// Child workflows or CaN executions **inherit** their parent/previous run's effective Versioning
|
|
149
|
+
// Behavior and Version (except when the new execution runs on a task queue not belonging to the
|
|
150
|
+
// same deployment version as the parent/previous run's task queue). The first workflow task will
|
|
151
|
+
// be dispatched according to the inherited behavior (or to the current version of the task-queue's
|
|
152
|
+
// deployment in the case of AutoUpgrade.) After completion of their first workflow task the
|
|
153
|
+
// Deployment Version and Behavior of the execution will update according to configuration on the worker.
|
|
154
|
+
//
|
|
144
155
|
// Note that `behavior` is overridden by `versioning_override` if the latter is present.
|
|
145
156
|
temporal.api.enums.v1.VersioningBehavior behavior = 1;
|
|
146
157
|
// The worker deployment that completed the last workflow task of this workflow execution. Must
|
|
@@ -158,10 +169,15 @@ message WorkflowExecutionVersioningInfo {
|
|
|
158
169
|
// If present, and `behavior` is UNSPECIFIED, the last task of this workflow execution was completed
|
|
159
170
|
// by a worker that is not using versioning but _is_ passing Deployment Name and Build ID.
|
|
160
171
|
//
|
|
161
|
-
//
|
|
162
|
-
//
|
|
172
|
+
// Child workflows or CaN executions **inherit** their parent/previous run's effective Versioning
|
|
173
|
+
// Behavior and Version (except when the new execution runs on a task queue not belonging to the
|
|
174
|
+
// same deployment version as the parent/previous run's task queue). The first workflow task will
|
|
175
|
+
// be dispatched according to the inherited behavior (or to the current version of the task-queue's
|
|
176
|
+
// deployment in the case of AutoUpgrade.) After completion of their first workflow task the
|
|
177
|
+
// Deployment Version and Behavior of the execution will update according to configuration on the worker.
|
|
178
|
+
//
|
|
163
179
|
// Note that if `versioning_override.behavior` is PINNED then `versioning_override.pinned_version`
|
|
164
|
-
// will override this value.
|
|
180
|
+
// will override this value.
|
|
165
181
|
temporal.api.deployment.v1.WorkerDeploymentVersion deployment_version = 7;
|
|
166
182
|
// Present if user has set an execution-specific versioning override. This override takes
|
|
167
183
|
// precedence over SDK-sent `behavior` (and `version` when override is PINNED). An
|
|
@@ -208,6 +224,14 @@ message WorkflowExecutionVersioningInfo {
|
|
|
208
224
|
// Pending activities will not start new attempts during a transition. Once the transition is
|
|
209
225
|
// completed, pending activities will start their next attempt on the new version.
|
|
210
226
|
DeploymentVersionTransition version_transition = 6;
|
|
227
|
+
// Monotonic counter reflecting the latest routing decision for this workflow execution.
|
|
228
|
+
// Used for staleness detection between history and matching when dispatching tasks to workers.
|
|
229
|
+
// Incremented when a workflow execution routes to a new deployment version, which happens
|
|
230
|
+
// when a worker of the new deployment version completes a workflow task.
|
|
231
|
+
// Note: Pinned tasks and sticky tasks send a value of 0 for this field since these tasks do not
|
|
232
|
+
// face the problem of inconsistent dispatching that arises from eventual consistency between
|
|
233
|
+
// task queues and their partitions.
|
|
234
|
+
int64 revision_number = 8;
|
|
211
235
|
}
|
|
212
236
|
|
|
213
237
|
// Holds information about ongoing transition of a workflow execution from one deployment to another.
|
|
@@ -300,8 +324,8 @@ message PendingActivityInfo {
|
|
|
300
324
|
// If nil, the activity has not yet been dispatched or was last dispatched to an unversioned worker.
|
|
301
325
|
temporal.api.deployment.v1.WorkerDeploymentVersion last_deployment_version = 25;
|
|
302
326
|
|
|
303
|
-
|
|
304
|
-
//
|
|
327
|
+
// Priority metadata. If this message is not present, or any fields are not
|
|
328
|
+
// present, they inherit the values from the workflow.
|
|
305
329
|
temporal.api.common.v1.Priority priority = 22;
|
|
306
330
|
|
|
307
331
|
message PauseInfo {
|
|
@@ -502,6 +526,16 @@ message PendingNexusOperationInfo {
|
|
|
502
526
|
|
|
503
527
|
// Operation token. Only set for asynchronous operations after a successful StartOperation call.
|
|
504
528
|
string operation_token = 15;
|
|
529
|
+
|
|
530
|
+
// Schedule-to-start timeout for this operation.
|
|
531
|
+
// (-- api-linter: core::0140::prepositions=disabled
|
|
532
|
+
// aip.dev/not-precedent: "to" is used to indicate interval. --)
|
|
533
|
+
google.protobuf.Duration schedule_to_start_timeout = 16;
|
|
534
|
+
|
|
535
|
+
// Start-to-close timeout for this operation.
|
|
536
|
+
// (-- api-linter: core::0140::prepositions=disabled
|
|
537
|
+
// aip.dev/not-precedent: "to" is used to indicate interval. --)
|
|
538
|
+
google.protobuf.Duration start_to_close_timeout = 17;
|
|
505
539
|
}
|
|
506
540
|
|
|
507
541
|
// NexusOperationCancellationInfo contains the state of a nexus operation cancellation.
|
|
@@ -529,24 +563,30 @@ message NexusOperationCancellationInfo {
|
|
|
529
563
|
message WorkflowExecutionOptions {
|
|
530
564
|
// If set, takes precedence over the Versioning Behavior sent by the SDK on Workflow Task completion.
|
|
531
565
|
VersioningOverride versioning_override = 1;
|
|
566
|
+
|
|
567
|
+
// If set, overrides the workflow's priority sent by the SDK.
|
|
568
|
+
temporal.api.common.v1.Priority priority = 2;
|
|
532
569
|
}
|
|
533
570
|
|
|
534
571
|
// Used to override the versioning behavior (and pinned deployment version, if applicable) of a
|
|
535
|
-
// specific workflow execution. If set, takes precedence over
|
|
536
|
-
// `WorkflowExecutionInfo.VersioningInfo` for more information.
|
|
537
|
-
//
|
|
538
|
-
//
|
|
539
|
-
//
|
|
540
|
-
//
|
|
572
|
+
// specific workflow execution. If set, this override takes precedence over worker-sent values.
|
|
573
|
+
// See `WorkflowExecutionInfo.VersioningInfo` for more information.
|
|
574
|
+
//
|
|
575
|
+
// To remove the override, call `UpdateWorkflowExecutionOptions` with a null
|
|
576
|
+
// `VersioningOverride`, and use the `update_mask` to indicate that it should be mutated.
|
|
577
|
+
//
|
|
578
|
+
// Pinned behavior overrides are automatically inherited by child workflows, workflow retries, continue-as-new
|
|
579
|
+
// workflows, and cron workflows.
|
|
541
580
|
message VersioningOverride {
|
|
542
581
|
// Indicates whether to override the workflow to be AutoUpgrade or Pinned.
|
|
543
582
|
oneof override {
|
|
544
|
-
//
|
|
583
|
+
// Override the workflow to have Pinned behavior.
|
|
545
584
|
PinnedOverride pinned = 3;
|
|
546
|
-
|
|
547
|
-
//
|
|
585
|
+
|
|
586
|
+
// Override the workflow to have AutoUpgrade behavior.
|
|
548
587
|
bool auto_upgrade = 4;
|
|
549
588
|
}
|
|
589
|
+
|
|
550
590
|
// Required.
|
|
551
591
|
// Deprecated. Use `override`.
|
|
552
592
|
temporal.api.enums.v1.VersioningBehavior behavior = 1 [deprecated = true];
|
|
@@ -566,14 +606,22 @@ message VersioningOverride {
|
|
|
566
606
|
// Defaults to PINNED_OVERRIDE_BEHAVIOR_UNSPECIFIED.
|
|
567
607
|
// See `PinnedOverrideBehavior` for details.
|
|
568
608
|
PinnedOverrideBehavior behavior = 1;
|
|
569
|
-
|
|
609
|
+
|
|
610
|
+
// Specifies the Worker Deployment Version to pin this workflow to.
|
|
611
|
+
// Required if the target workflow is not already pinned to a version.
|
|
612
|
+
//
|
|
613
|
+
// If omitted and the target workflow is already pinned, the effective
|
|
614
|
+
// pinned version will be the existing pinned version.
|
|
615
|
+
//
|
|
616
|
+
// If omitted and the target workflow is not pinned, the override request
|
|
617
|
+
// will be rejected with a PreconditionFailed error.
|
|
570
618
|
temporal.api.deployment.v1.WorkerDeploymentVersion version = 2;
|
|
571
619
|
}
|
|
572
620
|
|
|
573
|
-
// Used to specify different sub-types of Pinned override that we plan to add in the future.
|
|
574
621
|
enum PinnedOverrideBehavior {
|
|
575
622
|
// Unspecified.
|
|
576
623
|
PINNED_OVERRIDE_BEHAVIOR_UNSPECIFIED = 0;
|
|
624
|
+
|
|
577
625
|
// Override workflow behavior to be Pinned.
|
|
578
626
|
PINNED_OVERRIDE_BEHAVIOR_PINNED = 1;
|
|
579
627
|
}
|
|
@@ -636,3 +684,13 @@ message PostResetOperation {
|
|
|
636
684
|
}
|
|
637
685
|
}
|
|
638
686
|
|
|
687
|
+
// WorkflowExecutionPauseInfo contains the information about a workflow execution pause.
|
|
688
|
+
message WorkflowExecutionPauseInfo {
|
|
689
|
+
// The identity of the client who paused the workflow execution.
|
|
690
|
+
string identity = 1;
|
|
691
|
+
// The time when the workflow execution was paused.
|
|
692
|
+
google.protobuf.Timestamp paused_time = 2;
|
|
693
|
+
// The reason for pausing the workflow execution.
|
|
694
|
+
string reason = 3;
|
|
695
|
+
}
|
|
696
|
+
|