@temporalio/core-bridge 1.11.6 → 1.11.8
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 +902 -468
- package/package.json +3 -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 +5 -0
- package/sdk-core/.github/workflows/per-pr.yml +59 -5
- package/sdk-core/Cargo.toml +3 -2
- package/sdk-core/client/Cargo.toml +3 -3
- package/sdk-core/client/src/lib.rs +154 -161
- package/sdk-core/client/src/metrics.rs +15 -8
- package/sdk-core/client/src/proxy.rs +1 -1
- package/sdk-core/client/src/raw.rs +176 -33
- package/sdk-core/client/src/retry.rs +102 -465
- package/sdk-core/client/src/worker_registry/mod.rs +2 -2
- package/sdk-core/client/src/workflow_handle/mod.rs +19 -1
- package/sdk-core/core/Cargo.toml +12 -14
- package/sdk-core/core/benches/workflow_replay.rs +1 -1
- package/sdk-core/core/src/abstractions.rs +2 -2
- package/sdk-core/core/src/core_tests/activity_tasks.rs +99 -46
- package/sdk-core/core/src/core_tests/child_workflows.rs +68 -9
- package/sdk-core/core/src/core_tests/determinism.rs +2 -2
- package/sdk-core/core/src/core_tests/local_activities.rs +20 -33
- package/sdk-core/core/src/core_tests/mod.rs +7 -8
- package/sdk-core/core/src/core_tests/queries.rs +79 -79
- package/sdk-core/core/src/core_tests/replay_flag.rs +5 -5
- package/sdk-core/core/src/core_tests/updates.rs +6 -6
- package/sdk-core/core/src/core_tests/workers.rs +19 -22
- package/sdk-core/core/src/core_tests/workflow_cancels.rs +3 -3
- package/sdk-core/core/src/core_tests/workflow_tasks.rs +154 -106
- package/sdk-core/core/src/ephemeral_server/mod.rs +66 -10
- package/sdk-core/core/src/internal_flags.rs +103 -12
- package/sdk-core/core/src/lib.rs +21 -13
- package/sdk-core/core/src/pollers/mod.rs +200 -6
- package/sdk-core/core/src/pollers/poll_buffer.rs +32 -8
- package/sdk-core/core/src/protosext/mod.rs +7 -7
- package/sdk-core/core/src/protosext/protocol_messages.rs +2 -2
- package/sdk-core/core/src/replay/mod.rs +8 -9
- package/sdk-core/core/src/retry_logic.rs +8 -6
- package/sdk-core/core/src/telemetry/log_export.rs +4 -4
- package/sdk-core/core/src/telemetry/metrics.rs +111 -25
- package/sdk-core/core/src/telemetry/mod.rs +11 -4
- package/sdk-core/core/src/telemetry/otel.rs +108 -144
- package/sdk-core/core/src/telemetry/prometheus_server.rs +1 -4
- package/sdk-core/core/src/test_help/mod.rs +27 -21
- package/sdk-core/core/src/worker/activities/activity_heartbeat_manager.rs +7 -5
- package/sdk-core/core/src/worker/activities/local_activities.rs +9 -9
- package/sdk-core/core/src/worker/activities.rs +34 -46
- package/sdk-core/core/src/worker/client/mocks.rs +24 -2
- package/sdk-core/core/src/worker/client.rs +169 -33
- package/sdk-core/core/src/worker/mod.rs +132 -56
- package/sdk-core/core/src/worker/nexus.rs +410 -0
- package/sdk-core/core/src/worker/tuner/resource_based.rs +27 -5
- package/sdk-core/core/src/worker/tuner.rs +29 -2
- package/sdk-core/core/src/worker/workflow/driven_workflow.rs +8 -3
- package/sdk-core/core/src/worker/workflow/history_update.rs +5 -8
- package/sdk-core/core/src/worker/workflow/machines/activity_state_machine.rs +83 -87
- package/sdk-core/core/src/worker/workflow/machines/cancel_external_state_machine.rs +38 -38
- package/sdk-core/core/src/worker/workflow/machines/cancel_nexus_op_state_machine.rs +117 -0
- package/sdk-core/core/src/worker/workflow/machines/cancel_workflow_state_machine.rs +8 -18
- package/sdk-core/core/src/worker/workflow/machines/child_workflow_state_machine.rs +114 -108
- package/sdk-core/core/src/worker/workflow/machines/complete_workflow_state_machine.rs +16 -31
- package/sdk-core/core/src/worker/workflow/machines/continue_as_new_workflow_state_machine.rs +7 -14
- package/sdk-core/core/src/worker/workflow/machines/fail_workflow_state_machine.rs +8 -15
- package/sdk-core/core/src/worker/workflow/machines/local_activity_state_machine.rs +34 -75
- package/sdk-core/core/src/worker/workflow/machines/mod.rs +26 -48
- package/sdk-core/core/src/worker/workflow/machines/modify_workflow_properties_state_machine.rs +10 -17
- package/sdk-core/core/src/worker/workflow/machines/nexus_operation_state_machine.rs +543 -0
- package/sdk-core/core/src/worker/workflow/machines/patch_state_machine.rs +22 -31
- package/sdk-core/core/src/worker/workflow/machines/signal_external_state_machine.rs +53 -51
- package/sdk-core/core/src/worker/workflow/machines/timer_state_machine.rs +40 -45
- package/sdk-core/core/src/worker/workflow/machines/transition_coverage.rs +2 -2
- package/sdk-core/core/src/worker/workflow/machines/update_state_machine.rs +8 -10
- package/sdk-core/core/src/worker/workflow/machines/upsert_search_attributes_state_machine.rs +24 -30
- package/sdk-core/core/src/worker/workflow/machines/workflow_machines.rs +182 -116
- package/sdk-core/core/src/worker/workflow/machines/workflow_task_state_machine.rs +4 -8
- package/sdk-core/core/src/worker/workflow/managed_run.rs +75 -45
- package/sdk-core/core/src/worker/workflow/mod.rs +104 -55
- package/sdk-core/core/src/worker/workflow/run_cache.rs +23 -4
- package/sdk-core/core/src/worker/workflow/wft_extraction.rs +4 -4
- package/sdk-core/core/src/worker/workflow/wft_poller.rs +3 -3
- package/sdk-core/core/src/worker/workflow/workflow_stream.rs +32 -13
- package/sdk-core/core-api/Cargo.toml +2 -3
- package/sdk-core/core-api/src/errors.rs +22 -20
- package/sdk-core/core-api/src/lib.rs +24 -5
- package/sdk-core/core-api/src/telemetry/metrics.rs +27 -1
- package/sdk-core/core-api/src/telemetry.rs +37 -3
- package/sdk-core/core-api/src/worker.rs +36 -3
- package/sdk-core/docker/docker-compose-ci.yaml +25 -0
- package/sdk-core/etc/otel-collector-ci.yaml +36 -0
- package/sdk-core/etc/otel-collector-config.yaml +3 -3
- package/sdk-core/etc/prometheus.yaml +1 -1
- package/sdk-core/fsm/Cargo.toml +1 -1
- package/sdk-core/fsm/rustfsm_procmacro/Cargo.toml +1 -1
- package/sdk-core/fsm/rustfsm_procmacro/src/lib.rs +3 -4
- package/sdk-core/fsm/rustfsm_procmacro/tests/trybuild/no_handle_conversions_require_into_fail.stderr +1 -1
- package/sdk-core/fsm/rustfsm_trait/Cargo.toml +1 -1
- package/sdk-core/sdk/Cargo.toml +1 -2
- package/sdk-core/sdk/src/activity_context.rs +1 -1
- package/sdk-core/sdk/src/interceptors.rs +1 -1
- package/sdk-core/sdk/src/lib.rs +126 -54
- package/sdk-core/sdk/src/workflow_context/options.rs +184 -74
- package/sdk-core/sdk/src/workflow_context.rs +193 -79
- package/sdk-core/sdk/src/workflow_future.rs +151 -131
- package/sdk-core/sdk-core-protos/Cargo.toml +3 -4
- package/sdk-core/sdk-core-protos/protos/api_cloud_upstream/VERSION +1 -1
- package/sdk-core/sdk-core-protos/protos/api_cloud_upstream/temporal/api/cloud/account/v1/message.proto +46 -0
- package/sdk-core/sdk-core-protos/protos/api_cloud_upstream/temporal/api/cloud/cloudservice/v1/request_response.proto +254 -5
- package/sdk-core/sdk-core-protos/protos/api_cloud_upstream/temporal/api/cloud/cloudservice/v1/service.proto +108 -2
- package/sdk-core/sdk-core-protos/protos/api_cloud_upstream/temporal/api/cloud/identity/v1/message.proto +94 -15
- package/sdk-core/sdk-core-protos/protos/api_cloud_upstream/temporal/api/cloud/namespace/v1/message.proto +102 -4
- package/sdk-core/sdk-core-protos/protos/api_cloud_upstream/temporal/api/cloud/nexus/v1/message.proto +84 -0
- package/sdk-core/sdk-core-protos/protos/api_cloud_upstream/temporal/api/cloud/operation/v1/message.proto +25 -10
- package/sdk-core/sdk-core-protos/protos/api_cloud_upstream/temporal/api/cloud/region/v1/message.proto +14 -1
- package/sdk-core/sdk-core-protos/protos/api_cloud_upstream/temporal/api/cloud/resource/v1/message.proto +25 -0
- package/sdk-core/sdk-core-protos/protos/api_cloud_upstream/temporal/api/cloud/sink/v1/message.proto +41 -0
- package/sdk-core/sdk-core-protos/protos/api_cloud_upstream/temporal/api/cloud/usage/v1/message.proto +59 -0
- package/sdk-core/sdk-core-protos/protos/api_upstream/.github/PULL_REQUEST_TEMPLATE.md +2 -0
- package/sdk-core/sdk-core-protos/protos/api_upstream/.github/workflows/create-release.yml +135 -0
- package/sdk-core/sdk-core-protos/protos/api_upstream/.github/workflows/push-to-buf.yml +20 -0
- package/sdk-core/sdk-core-protos/protos/api_upstream/.github/workflows/trigger-api-go-delete-release.yml +13 -0
- package/sdk-core/sdk-core-protos/protos/api_upstream/.github/workflows/trigger-api-go-publish-release.yml +13 -0
- package/sdk-core/sdk-core-protos/protos/api_upstream/.github/workflows/trigger-api-go-update.yml +13 -21
- package/sdk-core/sdk-core-protos/protos/api_upstream/Makefile +2 -2
- package/sdk-core/sdk-core-protos/protos/api_upstream/buf.yaml +1 -0
- package/sdk-core/sdk-core-protos/protos/api_upstream/openapi/openapiv2.json +3386 -1047
- package/sdk-core/sdk-core-protos/protos/api_upstream/openapi/openapiv3.yaml +3529 -1144
- package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/batch/v1/message.proto +39 -1
- package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/command/v1/message.proto +6 -0
- package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/common/v1/message.proto +39 -1
- package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/deployment/v1/message.proto +252 -0
- package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/enums/v1/batch_operation.proto +1 -0
- package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/enums/v1/common.proto +6 -0
- package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/enums/v1/deployment.proto +96 -0
- package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/enums/v1/event_type.proto +2 -0
- package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/enums/v1/failed_cause.proto +2 -0
- package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/enums/v1/nexus.proto +42 -0
- package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/enums/v1/reset.proto +2 -0
- package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/enums/v1/workflow.proto +43 -2
- package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/errordetails/v1/message.proto +13 -1
- package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/failure/v1/message.proto +14 -0
- package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/history/v1/message.proto +70 -12
- package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/nexus/v1/message.proto +12 -0
- package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/query/v1/message.proto +9 -2
- package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/taskqueue/v1/message.proto +46 -2
- package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/workflow/v1/message.proto +206 -0
- package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/workflowservice/v1/request_response.proto +482 -97
- package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/workflowservice/v1/service.proto +230 -43
- package/sdk-core/sdk-core-protos/protos/local/temporal/sdk/core/core_interface.proto +6 -0
- package/sdk-core/sdk-core-protos/protos/local/temporal/sdk/core/nexus/nexus.proto +71 -0
- package/sdk-core/sdk-core-protos/protos/local/temporal/sdk/core/workflow_activation/workflow_activation.proto +46 -2
- package/sdk-core/sdk-core-protos/protos/local/temporal/sdk/core/workflow_commands/workflow_commands.proto +55 -9
- package/sdk-core/sdk-core-protos/src/history_builder.rs +5 -5
- package/sdk-core/sdk-core-protos/src/history_info.rs +5 -6
- package/sdk-core/sdk-core-protos/src/lib.rs +414 -34
- package/sdk-core/sdk-core-protos/src/task_token.rs +1 -1
- package/sdk-core/test-utils/Cargo.toml +3 -11
- package/sdk-core/test-utils/src/canned_histories.rs +1 -1
- package/sdk-core/test-utils/src/lib.rs +159 -85
- package/sdk-core/tests/fuzzy_workflow.rs +3 -3
- package/sdk-core/tests/heavy_tests.rs +3 -3
- package/sdk-core/tests/integ_tests/client_tests.rs +171 -20
- package/sdk-core/tests/integ_tests/ephemeral_server_tests.rs +45 -39
- package/sdk-core/tests/integ_tests/heartbeat_tests.rs +7 -6
- package/sdk-core/tests/integ_tests/metrics_tests.rs +492 -35
- package/sdk-core/tests/integ_tests/polling_tests.rs +7 -5
- package/sdk-core/tests/integ_tests/queries_tests.rs +14 -17
- package/sdk-core/tests/integ_tests/update_tests.rs +47 -44
- package/sdk-core/tests/integ_tests/visibility_tests.rs +4 -3
- package/sdk-core/tests/integ_tests/worker_tests.rs +5 -5
- package/sdk-core/tests/integ_tests/workflow_tests/activities.rs +15 -13
- package/sdk-core/tests/integ_tests/workflow_tests/cancel_external.rs +28 -14
- package/sdk-core/tests/integ_tests/workflow_tests/cancel_wf.rs +7 -1
- package/sdk-core/tests/integ_tests/workflow_tests/child_workflows.rs +57 -4
- package/sdk-core/tests/integ_tests/workflow_tests/eager.rs +1 -1
- package/sdk-core/tests/integ_tests/workflow_tests/local_activities.rs +24 -18
- package/sdk-core/tests/integ_tests/workflow_tests/nexus.rs +506 -0
- package/sdk-core/tests/integ_tests/workflow_tests/patches.rs +1 -1
- package/sdk-core/tests/integ_tests/workflow_tests/priority.rs +104 -0
- package/sdk-core/tests/integ_tests/workflow_tests/replay.rs +34 -31
- package/sdk-core/tests/integ_tests/workflow_tests/resets.rs +1 -1
- package/sdk-core/tests/integ_tests/workflow_tests/timers.rs +10 -7
- package/sdk-core/tests/integ_tests/workflow_tests.rs +152 -116
- package/sdk-core/tests/main.rs +36 -6
- package/sdk-core/tests/runner.rs +30 -9
- package/src/conversions/slot_supplier_bridge.rs +4 -0
- package/src/conversions.rs +1 -0
- package/src/worker.rs +5 -7
- package/sdk-core/core/src/worker/activities/activity_task_poller_stream.rs +0 -78
|
@@ -38,10 +38,14 @@ import "google/protobuf/timestamp.proto";
|
|
|
38
38
|
import "temporal/api/enums/v1/common.proto";
|
|
39
39
|
import "temporal/api/enums/v1/workflow.proto";
|
|
40
40
|
import "temporal/api/common/v1/message.proto";
|
|
41
|
+
import "temporal/api/deployment/v1/message.proto";
|
|
41
42
|
import "temporal/api/failure/v1/message.proto";
|
|
42
43
|
import "temporal/api/taskqueue/v1/message.proto";
|
|
43
44
|
import "temporal/api/sdk/v1/user_metadata.proto";
|
|
44
45
|
|
|
46
|
+
|
|
47
|
+
// Hold basic information about a workflow execution.
|
|
48
|
+
// This structure is a part of visibility, and thus contain a limited subset of information.
|
|
45
49
|
message WorkflowExecutionInfo {
|
|
46
50
|
temporal.api.common.v1.WorkflowExecution execution = 1;
|
|
47
51
|
temporal.api.common.v1.WorkflowType type = 2;
|
|
@@ -59,6 +63,7 @@ message WorkflowExecutionInfo {
|
|
|
59
63
|
int64 state_transition_count = 14;
|
|
60
64
|
int64 history_size_bytes = 15;
|
|
61
65
|
// If set, the most recent worker version stamp that appeared in a workflow task completion
|
|
66
|
+
// Deprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv]
|
|
62
67
|
temporal.api.common.v1.WorkerVersionStamp most_recent_worker_version_stamp = 16;
|
|
63
68
|
// Workflow execution duration is defined as difference between close time and execution time.
|
|
64
69
|
// This field is only populated if the workflow is closed.
|
|
@@ -87,9 +92,11 @@ message WorkflowExecutionInfo {
|
|
|
87
92
|
// again, the assigned build ID may change according to the latest versioning rules.
|
|
88
93
|
// Assigned build ID can also change in the middle of a execution if Compatible Redirect Rules are applied to
|
|
89
94
|
// this execution.
|
|
95
|
+
// Deprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv]
|
|
90
96
|
string assigned_build_id = 19;
|
|
91
97
|
// Build ID inherited from a previous/parent execution. If present, assigned_build_id will be set to this, instead
|
|
92
98
|
// of using the assignment rules.
|
|
99
|
+
// Deprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv]
|
|
93
100
|
string inherited_build_id = 20;
|
|
94
101
|
// The first run ID in the execution chain.
|
|
95
102
|
// Executions created via the following operations are considered to be in the same chain
|
|
@@ -98,6 +105,136 @@ message WorkflowExecutionInfo {
|
|
|
98
105
|
// - Workflow Reset
|
|
99
106
|
// - Cron Schedule
|
|
100
107
|
string first_run_id = 21;
|
|
108
|
+
|
|
109
|
+
// Absent value means the workflow execution is not versioned. When present, the execution might
|
|
110
|
+
// be versioned or unversioned, depending on `versioning_info.behavior` and `versioning_info.versioning_override`.
|
|
111
|
+
// Experimental. Versioning info is experimental and might change in the future.
|
|
112
|
+
WorkflowExecutionVersioningInfo versioning_info = 22;
|
|
113
|
+
|
|
114
|
+
// The name of Worker Deployment that completed the most recent workflow task.
|
|
115
|
+
// Experimental. Worker Deployments are experimental and might change in the future.
|
|
116
|
+
string worker_deployment_name = 23;
|
|
117
|
+
|
|
118
|
+
// Priority metadata
|
|
119
|
+
temporal.api.common.v1.Priority priority = 24;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
// Holds all the extra information about workflow execution that is not part of Visibility.
|
|
123
|
+
message WorkflowExecutionExtendedInfo {
|
|
124
|
+
// Workflow execution expiration time is defined as workflow start time plus expiration timeout.
|
|
125
|
+
// Workflow start time may change after workflow reset.
|
|
126
|
+
google.protobuf.Timestamp execution_expiration_time = 1;
|
|
127
|
+
|
|
128
|
+
// Workflow run expiration time is defined as current workflow run start time plus workflow run timeout.
|
|
129
|
+
google.protobuf.Timestamp run_expiration_time = 2;
|
|
130
|
+
|
|
131
|
+
// indicates if the workflow received a cancel request
|
|
132
|
+
bool cancel_requested = 3;
|
|
133
|
+
|
|
134
|
+
// Last workflow reset time. Nil if the workflow was never reset.
|
|
135
|
+
google.protobuf.Timestamp last_reset_time = 4;
|
|
136
|
+
|
|
137
|
+
// Original workflow start time.
|
|
138
|
+
google.protobuf.Timestamp original_start_time = 5;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
// Holds all the information about worker versioning for a particular workflow execution.
|
|
142
|
+
// Experimental. Versioning info is experimental and might change in the future.
|
|
143
|
+
message WorkflowExecutionVersioningInfo {
|
|
144
|
+
// Versioning behavior determines how the server should treat this execution when workers are
|
|
145
|
+
// upgraded. When present it means this workflow execution is versioned; UNSPECIFIED means
|
|
146
|
+
// unversioned. See the comments in `VersioningBehavior` enum for more info about different
|
|
147
|
+
// behaviors.
|
|
148
|
+
// This field is first set after an execution completes its first workflow task on a versioned
|
|
149
|
+
// worker, and set again on completion of every subsequent workflow task.
|
|
150
|
+
// For child workflows of Pinned parents, this will be set to Pinned (along with `version`) when
|
|
151
|
+
// the the child starts so that child's first workflow task goes to the same Version as the
|
|
152
|
+
// parent. After the first workflow task, it depends on the child workflow itself if it wants
|
|
153
|
+
// to stay pinned or become unpinned (according to Versioning Behavior set in the worker).
|
|
154
|
+
// Note that `behavior` is overridden by `versioning_override` if the latter is present.
|
|
155
|
+
temporal.api.enums.v1.VersioningBehavior behavior = 1;
|
|
156
|
+
// The worker deployment that completed the last workflow task of this workflow execution. Must
|
|
157
|
+
// be present if `behavior` is set. Absent value means no workflow task is completed, or the
|
|
158
|
+
// last workflow task was completed by an unversioned worker. Unversioned workers may still send
|
|
159
|
+
// a deployment value which will be stored here, so the right way to check if an execution is
|
|
160
|
+
// versioned if an execution is versioned or not is via the `behavior` field.
|
|
161
|
+
// Note that `deployment` is overridden by `versioning_override` if the latter is present.
|
|
162
|
+
// Deprecated. Use `version`.
|
|
163
|
+
temporal.api.deployment.v1.Deployment deployment = 2 [deprecated = true];
|
|
164
|
+
// The Worker Deployment Version that completed the last workflow task of this workflow
|
|
165
|
+
// execution, in the form "<deployment_name>.<build_id>".
|
|
166
|
+
// Must be present if and only if `behavior` is set. An absent value means no workflow task is
|
|
167
|
+
// completed, or the workflow is unversioned.
|
|
168
|
+
// For child workflows of Pinned parents, this will be set to parent's Pinned Version when the
|
|
169
|
+
// the child starts so that child's first workflow task goes to the same Version as the parent.
|
|
170
|
+
// Note that if `versioning_override.behavior` is PINNED then `versioning_override.pinned_version`
|
|
171
|
+
// will override this value.
|
|
172
|
+
string version = 5;
|
|
173
|
+
// Present if user has set an execution-specific versioning override. This override takes
|
|
174
|
+
// precedence over SDK-sent `behavior` (and `version` when override is PINNED). An
|
|
175
|
+
// override can be set when starting a new execution, as well as afterwards by calling the
|
|
176
|
+
// `UpdateWorkflowExecutionOptions` API.
|
|
177
|
+
// Pinned overrides are automatically inherited by child workflows.
|
|
178
|
+
VersioningOverride versioning_override = 3;
|
|
179
|
+
// When present, indicates the workflow is transitioning to a different deployment. Can
|
|
180
|
+
// indicate one of the following transitions: unversioned -> versioned, versioned -> versioned
|
|
181
|
+
// on a different deployment, or versioned -> unversioned.
|
|
182
|
+
// Not applicable to workflows with PINNED behavior.
|
|
183
|
+
// When a workflow with AUTO_UPGRADE behavior creates a new workflow task, it will automatically
|
|
184
|
+
// start a transition to the task queue's current deployment if the task queue's current
|
|
185
|
+
// deployment is different from the workflow's deployment.
|
|
186
|
+
// If the AUTO_UPGRADE workflow is stuck due to backlogged activity or workflow tasks, those
|
|
187
|
+
// tasks will be redirected to the task queue's current deployment. As soon as a poller from
|
|
188
|
+
// that deployment is available to receive the task, the workflow will automatically start a
|
|
189
|
+
// transition to that deployment and continue execution there.
|
|
190
|
+
// A deployment transition can only exist while there is a pending or started workflow task.
|
|
191
|
+
// Once the pending workflow task completes on the transition's target deployment, the
|
|
192
|
+
// transition completes and the workflow's `deployment` and `behavior` fields are updated per
|
|
193
|
+
// the worker's task completion response.
|
|
194
|
+
// Pending activities will not start new attempts during a transition. Once the transition is
|
|
195
|
+
// completed, pending activities will start their next attempt on the new deployment.
|
|
196
|
+
// Deprecated. Use version_transition.
|
|
197
|
+
DeploymentTransition deployment_transition = 4 [deprecated = true];
|
|
198
|
+
// When present, indicates the workflow is transitioning to a different deployment version
|
|
199
|
+
// (which may belong to the same deployment name or another). Can indicate one of the following
|
|
200
|
+
// transitions: unversioned -> versioned, versioned -> versioned
|
|
201
|
+
// on a different deployment version, or versioned -> unversioned.
|
|
202
|
+
// Not applicable to workflows with PINNED behavior.
|
|
203
|
+
// When a workflow with AUTO_UPGRADE behavior creates a new workflow task, it will automatically
|
|
204
|
+
// start a transition to the task queue's current version if the task queue's current version is
|
|
205
|
+
// different from the workflow's current deployment version.
|
|
206
|
+
// If the AUTO_UPGRADE workflow is stuck due to backlogged activity or workflow tasks, those
|
|
207
|
+
// tasks will be redirected to the task queue's current version. As soon as a poller from
|
|
208
|
+
// that deployment version is available to receive the task, the workflow will automatically
|
|
209
|
+
// start a transition to that version and continue execution there.
|
|
210
|
+
// A version transition can only exist while there is a pending or started workflow task.
|
|
211
|
+
// Once the pending workflow task completes on the transition's target version, the
|
|
212
|
+
// transition completes and the workflow's `behavior`, and `version` fields are updated per the
|
|
213
|
+
// worker's task completion response.
|
|
214
|
+
// Pending activities will not start new attempts during a transition. Once the transition is
|
|
215
|
+
// completed, pending activities will start their next attempt on the new version.
|
|
216
|
+
DeploymentVersionTransition version_transition = 6;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
// Holds information about ongoing transition of a workflow execution from one deployment to another.
|
|
220
|
+
// Deprecated. Use DeploymentVersionTransition.
|
|
221
|
+
message DeploymentTransition {
|
|
222
|
+
// The target deployment of the transition. Null means a so-far-versioned workflow is
|
|
223
|
+
// transitioning to unversioned workers.
|
|
224
|
+
temporal.api.deployment.v1.Deployment deployment = 1;
|
|
225
|
+
|
|
226
|
+
// Later: safe transition info
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
// Holds information about ongoing transition of a workflow execution from one worker
|
|
230
|
+
// deployment version to another.
|
|
231
|
+
// Experimental. Might change in the future.
|
|
232
|
+
message DeploymentVersionTransition {
|
|
233
|
+
// Required. The target Version of the transition. May be `__unversioned__` which means a
|
|
234
|
+
// so-far-versioned workflow is transitioning to unversioned workers.
|
|
235
|
+
string version = 1;
|
|
236
|
+
|
|
237
|
+
// Later: safe transition info
|
|
101
238
|
}
|
|
102
239
|
|
|
103
240
|
message WorkflowExecutionConfig {
|
|
@@ -125,6 +262,7 @@ message PendingActivityInfo {
|
|
|
125
262
|
// Absence of `assigned_build_id` generally means this task is on an "unversioned" task queue.
|
|
126
263
|
// In rare cases, it can also mean that the task queue is versioned but we failed to write activity's
|
|
127
264
|
// independently-assigned build ID to the database. This case heals automatically once the task is dispatched.
|
|
265
|
+
// Deprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv]
|
|
128
266
|
oneof assigned_build_id {
|
|
129
267
|
// When present, it means this activity is assigned to the build ID of its workflow.
|
|
130
268
|
google.protobuf.Empty use_workflow_build_id = 13;
|
|
@@ -135,6 +273,7 @@ message PendingActivityInfo {
|
|
|
135
273
|
string last_independently_assigned_build_id = 14;
|
|
136
274
|
}
|
|
137
275
|
// The version stamp of the worker to whom this activity was most recently dispatched
|
|
276
|
+
// Deprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv]
|
|
138
277
|
temporal.api.common.v1.WorkerVersionStamp last_worker_version_stamp = 15;
|
|
139
278
|
|
|
140
279
|
// The time activity will wait until the next retry.
|
|
@@ -152,6 +291,16 @@ message PendingActivityInfo {
|
|
|
152
291
|
|
|
153
292
|
// Indicates if activity is paused.
|
|
154
293
|
bool paused = 19;
|
|
294
|
+
|
|
295
|
+
// The deployment this activity was dispatched to most recently. Present only if the activity
|
|
296
|
+
// was dispatched to a versioned worker.
|
|
297
|
+
// Deprecated. Use `last_worker_deployment_version`.
|
|
298
|
+
temporal.api.deployment.v1.Deployment last_deployment = 20 [deprecated = true];
|
|
299
|
+
// The Worker Deployment Version this activity was dispatched to most recently.
|
|
300
|
+
string last_worker_deployment_version = 21;
|
|
301
|
+
|
|
302
|
+
// Priority metadata
|
|
303
|
+
temporal.api.common.v1.Priority priority = 22;
|
|
155
304
|
}
|
|
156
305
|
|
|
157
306
|
message PendingChildExecutionInfo {
|
|
@@ -227,6 +376,11 @@ message NewWorkflowExecutionInfo {
|
|
|
227
376
|
// for use by user interfaces to display the fixed as-of-start summary and details of the
|
|
228
377
|
// workflow.
|
|
229
378
|
temporal.api.sdk.v1.UserMetadata user_metadata = 14;
|
|
379
|
+
// If set, takes precedence over the Versioning Behavior sent by the SDK on Workflow Task completion.
|
|
380
|
+
// To unset the override after the workflow is running, use UpdateWorkflowExecutionOptions.
|
|
381
|
+
VersioningOverride versioning_override = 15;
|
|
382
|
+
// Priority metadata
|
|
383
|
+
temporal.api.common.v1.Priority priority = 16;
|
|
230
384
|
}
|
|
231
385
|
|
|
232
386
|
// CallbackInfo contains the state of an attached workflow callback.
|
|
@@ -258,6 +412,9 @@ message CallbackInfo {
|
|
|
258
412
|
temporal.api.failure.v1.Failure last_attempt_failure = 7;
|
|
259
413
|
// The time when the next attempt is scheduled.
|
|
260
414
|
google.protobuf.Timestamp next_attempt_schedule_time = 8;
|
|
415
|
+
|
|
416
|
+
// If the state is BLOCKED, blocked reason provides additional information.
|
|
417
|
+
string blocked_reason = 9;
|
|
261
418
|
}
|
|
262
419
|
|
|
263
420
|
// PendingNexusOperationInfo contains the state of a pending Nexus operation.
|
|
@@ -271,6 +428,8 @@ message PendingNexusOperationInfo {
|
|
|
271
428
|
string operation = 3;
|
|
272
429
|
|
|
273
430
|
// Operation ID. Only set for asynchronous operations after a successful StartOperation call.
|
|
431
|
+
//
|
|
432
|
+
// Deprecated: Renamed to operation_token.
|
|
274
433
|
string operation_id = 4;
|
|
275
434
|
|
|
276
435
|
// Schedule-to-close timeout for this operation.
|
|
@@ -300,6 +459,12 @@ message PendingNexusOperationInfo {
|
|
|
300
459
|
// The event ID of the NexusOperationScheduled event. Can be used to correlate an operation in the
|
|
301
460
|
// DescribeWorkflowExecution response with workflow history.
|
|
302
461
|
int64 scheduled_event_id = 13;
|
|
462
|
+
|
|
463
|
+
// If the state is BLOCKED, blocked reason provides additional information.
|
|
464
|
+
string blocked_reason = 14;
|
|
465
|
+
|
|
466
|
+
// Operation token. Only set for asynchronous operations after a successful StartOperation call.
|
|
467
|
+
string operation_token = 15;
|
|
303
468
|
}
|
|
304
469
|
|
|
305
470
|
// NexusOperationCancellationInfo contains the state of a nexus operation cancellation.
|
|
@@ -319,4 +484,45 @@ message NexusOperationCancellationInfo {
|
|
|
319
484
|
temporal.api.failure.v1.Failure last_attempt_failure = 5;
|
|
320
485
|
// The time when the next attempt is scheduled.
|
|
321
486
|
google.protobuf.Timestamp next_attempt_schedule_time = 6;
|
|
487
|
+
|
|
488
|
+
// If the state is BLOCKED, blocked reason provides additional information.
|
|
489
|
+
string blocked_reason = 7;
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
message WorkflowExecutionOptions {
|
|
493
|
+
// If set, takes precedence over the Versioning Behavior sent by the SDK on Workflow Task completion.
|
|
494
|
+
VersioningOverride versioning_override = 1;
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
// Used to override the versioning behavior (and pinned deployment version, if applicable) of a
|
|
498
|
+
// specific workflow execution. If set, takes precedence over the worker-sent values. See
|
|
499
|
+
// `WorkflowExecutionInfo.VersioningInfo` for more information. To remove the override, call
|
|
500
|
+
// `UpdateWorkflowExecutionOptions` with a null `VersioningOverride`, and use the `update_mask`
|
|
501
|
+
// to indicate that it should be mutated.
|
|
502
|
+
message VersioningOverride {
|
|
503
|
+
// Required.
|
|
504
|
+
temporal.api.enums.v1.VersioningBehavior behavior = 1;
|
|
505
|
+
|
|
506
|
+
// Required if behavior is `PINNED`. Must be null if behavior is `AUTO_UPGRADE`.
|
|
507
|
+
// Identifies the worker deployment to pin the workflow to.
|
|
508
|
+
// Deprecated. Use `pinned_version`.
|
|
509
|
+
temporal.api.deployment.v1.Deployment deployment = 2 [deprecated = true];
|
|
510
|
+
|
|
511
|
+
// Required if behavior is `PINNED`. Must be absent if behavior is not `PINNED`.
|
|
512
|
+
// Identifies the worker deployment version to pin the workflow to, in the format
|
|
513
|
+
// "<deployment_name>.<build_id>".
|
|
514
|
+
string pinned_version = 9;
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
// When StartWorkflowExecution uses the conflict policy WORKFLOW_ID_CONFLICT_POLICY_USE_EXISTING and
|
|
518
|
+
// there is already an existing running workflow, OnConflictOptions defines actions to be taken on
|
|
519
|
+
// the existing running workflow. In this case, it will create a WorkflowExecutionOptionsUpdatedEvent
|
|
520
|
+
// history event in the running workflow with the changes requested in this object.
|
|
521
|
+
message OnConflictOptions {
|
|
522
|
+
// Attaches the request ID to the running workflow.
|
|
523
|
+
bool attach_request_id = 1;
|
|
524
|
+
// Attaches the completion callbacks to the running workflow.
|
|
525
|
+
bool attach_completion_callbacks = 2;
|
|
526
|
+
// Attaches the links to the WorkflowExecutionOptionsUpdatedEvent history event.
|
|
527
|
+
bool attach_links = 3;
|
|
322
528
|
}
|