@temporalio/core-bridge 1.9.2 → 1.10.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 +754 -473
- package/Cargo.toml +3 -3
- package/lib/index.d.ts +33 -2
- package/lib/index.js.map +1 -1
- package/package.json +4 -4
- 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/scripts/build.js +4 -3
- package/sdk-core/.cargo/config.toml +2 -4
- package/sdk-core/.github/workflows/heavy.yml +1 -1
- package/sdk-core/.github/workflows/per-pr.yml +6 -4
- package/sdk-core/Cargo.toml +10 -3
- package/sdk-core/README.md +4 -6
- package/sdk-core/client/Cargo.toml +13 -5
- package/sdk-core/client/src/lib.rs +123 -34
- package/sdk-core/client/src/metrics.rs +70 -18
- package/sdk-core/client/src/proxy.rs +85 -0
- package/sdk-core/client/src/raw.rs +67 -5
- package/sdk-core/client/src/worker_registry/mod.rs +5 -3
- package/sdk-core/client/src/workflow_handle/mod.rs +3 -1
- package/sdk-core/core/Cargo.toml +31 -37
- package/sdk-core/core/src/abstractions/take_cell.rs +3 -3
- package/sdk-core/core/src/abstractions.rs +176 -108
- package/sdk-core/core/src/core_tests/activity_tasks.rs +4 -13
- package/sdk-core/core/src/core_tests/determinism.rs +2 -1
- package/sdk-core/core/src/core_tests/local_activities.rs +3 -3
- package/sdk-core/core/src/core_tests/mod.rs +3 -3
- package/sdk-core/core/src/core_tests/queries.rs +42 -5
- package/sdk-core/core/src/core_tests/workers.rs +2 -3
- package/sdk-core/core/src/core_tests/workflow_tasks.rs +115 -15
- package/sdk-core/core/src/ephemeral_server/mod.rs +109 -136
- package/sdk-core/core/src/internal_flags.rs +8 -8
- package/sdk-core/core/src/lib.rs +16 -11
- package/sdk-core/core/src/pollers/mod.rs +11 -5
- package/sdk-core/core/src/pollers/poll_buffer.rs +48 -29
- package/sdk-core/core/src/protosext/mod.rs +32 -32
- package/sdk-core/core/src/protosext/protocol_messages.rs +14 -24
- package/sdk-core/core/src/retry_logic.rs +2 -2
- package/sdk-core/core/src/telemetry/log_export.rs +10 -9
- package/sdk-core/core/src/telemetry/metrics.rs +233 -330
- package/sdk-core/core/src/telemetry/mod.rs +11 -38
- package/sdk-core/core/src/telemetry/otel.rs +355 -0
- package/sdk-core/core/src/telemetry/prometheus_server.rs +36 -23
- package/sdk-core/core/src/test_help/mod.rs +80 -59
- package/sdk-core/core/src/worker/activities/activity_heartbeat_manager.rs +6 -6
- package/sdk-core/core/src/worker/activities/local_activities.rs +46 -43
- package/sdk-core/core/src/worker/activities.rs +45 -46
- package/sdk-core/core/src/worker/client/mocks.rs +8 -7
- package/sdk-core/core/src/worker/client.rs +40 -39
- package/sdk-core/core/src/worker/mod.rs +72 -42
- package/sdk-core/core/src/worker/slot_provider.rs +28 -28
- package/sdk-core/core/src/worker/slot_supplier.rs +1 -0
- package/sdk-core/core/src/worker/tuner/fixed_size.rs +52 -0
- package/sdk-core/core/src/worker/tuner/resource_based.rs +561 -0
- package/sdk-core/core/src/worker/tuner.rs +122 -0
- package/sdk-core/core/src/worker/workflow/driven_workflow.rs +6 -6
- package/sdk-core/core/src/worker/workflow/history_update.rs +27 -53
- package/sdk-core/core/src/worker/workflow/machines/activity_state_machine.rs +4 -17
- package/sdk-core/core/src/worker/workflow/machines/cancel_external_state_machine.rs +1 -10
- package/sdk-core/core/src/worker/workflow/machines/cancel_workflow_state_machine.rs +4 -11
- package/sdk-core/core/src/worker/workflow/machines/child_workflow_state_machine.rs +17 -35
- package/sdk-core/core/src/worker/workflow/machines/complete_workflow_state_machine.rs +0 -8
- package/sdk-core/core/src/worker/workflow/machines/continue_as_new_workflow_state_machine.rs +1 -5
- package/sdk-core/core/src/worker/workflow/machines/fail_workflow_state_machine.rs +0 -5
- package/sdk-core/core/src/worker/workflow/machines/local_activity_state_machine.rs +0 -5
- package/sdk-core/core/src/worker/workflow/machines/mod.rs +0 -14
- package/sdk-core/core/src/worker/workflow/machines/modify_workflow_properties_state_machine.rs +0 -5
- package/sdk-core/core/src/worker/workflow/machines/patch_state_machine.rs +0 -5
- package/sdk-core/core/src/worker/workflow/machines/signal_external_state_machine.rs +1 -10
- package/sdk-core/core/src/worker/workflow/machines/timer_state_machine.rs +3 -10
- package/sdk-core/core/src/worker/workflow/machines/transition_coverage.rs +12 -8
- package/sdk-core/core/src/worker/workflow/machines/update_state_machine.rs +0 -10
- package/sdk-core/core/src/worker/workflow/machines/upsert_search_attributes_state_machine.rs +6 -13
- package/sdk-core/core/src/worker/workflow/machines/workflow_machines.rs +27 -37
- package/sdk-core/core/src/worker/workflow/machines/workflow_task_state_machine.rs +3 -14
- package/sdk-core/core/src/worker/workflow/managed_run.rs +84 -54
- package/sdk-core/core/src/worker/workflow/mod.rs +63 -160
- package/sdk-core/core/src/worker/workflow/run_cache.rs +22 -13
- package/sdk-core/core/src/worker/workflow/wft_extraction.rs +16 -3
- package/sdk-core/core/src/worker/workflow/wft_poller.rs +15 -12
- package/sdk-core/core/src/worker/workflow/workflow_stream.rs +39 -78
- package/sdk-core/core-api/Cargo.toml +6 -5
- package/sdk-core/core-api/src/errors.rs +8 -0
- package/sdk-core/core-api/src/telemetry/metrics.rs +75 -4
- package/sdk-core/core-api/src/telemetry.rs +7 -1
- package/sdk-core/core-api/src/worker.rs +212 -56
- package/sdk-core/fsm/Cargo.toml +3 -0
- package/sdk-core/fsm/rustfsm_procmacro/tests/trybuild/no_handle_conversions_require_into_fail.stderr +1 -1
- package/sdk-core/sdk/Cargo.toml +5 -7
- package/sdk-core/sdk/src/app_data.rs +3 -3
- package/sdk-core/sdk/src/lib.rs +5 -3
- package/sdk-core/sdk/src/workflow_context/options.rs +1 -1
- package/sdk-core/sdk/src/workflow_context.rs +10 -9
- package/sdk-core/sdk/src/workflow_future.rs +1 -1
- package/sdk-core/sdk-core-protos/Cargo.toml +8 -6
- package/sdk-core/sdk-core-protos/build.rs +1 -10
- package/sdk-core/sdk-core-protos/protos/api_upstream/.github/PULL_REQUEST_TEMPLATE.md +3 -0
- package/sdk-core/sdk-core-protos/protos/api_upstream/.github/workflows/ci.yml +26 -0
- package/sdk-core/sdk-core-protos/protos/api_upstream/Makefile +42 -20
- package/sdk-core/sdk-core-protos/protos/api_upstream/README.md +2 -0
- package/sdk-core/sdk-core-protos/protos/api_upstream/api-linter.yaml +36 -26
- package/sdk-core/sdk-core-protos/protos/api_upstream/buf.lock +2 -0
- package/sdk-core/sdk-core-protos/protos/api_upstream/google/protobuf/struct.proto +95 -0
- package/sdk-core/sdk-core-protos/protos/api_upstream/openapi/openapiv2.json +9632 -0
- package/sdk-core/sdk-core-protos/protos/api_upstream/openapi/openapiv3.yaml +7337 -0
- package/sdk-core/sdk-core-protos/protos/api_upstream/openapi/payload_description.txt +2 -0
- package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/command/v1/message.proto +45 -11
- package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/common/v1/message.proto +22 -4
- package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/enums/v1/command_type.proto +2 -0
- package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/enums/v1/common.proto +44 -0
- package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/enums/v1/event_type.proto +18 -3
- package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/enums/v1/failed_cause.proto +20 -0
- package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/enums/v1/task_queue.proto +30 -0
- package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/enums/v1/update.proto +7 -8
- package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/enums/v1/workflow.proto +23 -5
- package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/errordetails/v1/message.proto +20 -0
- package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/failure/v1/message.proto +25 -0
- package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/history/v1/message.proto +141 -15
- package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/namespace/v1/message.proto +12 -0
- package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/nexus/v1/message.proto +193 -0
- package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/operatorservice/v1/request_response.proto +73 -6
- package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/operatorservice/v1/service.proto +46 -4
- package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/schedule/v1/message.proto +4 -0
- package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/sdk/v1/workflow_metadata.proto +2 -2
- package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/taskqueue/v1/message.proto +116 -0
- package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/workflow/v1/message.proto +134 -0
- package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/workflowservice/v1/request_response.proto +274 -29
- package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/workflowservice/v1/service.proto +57 -1
- package/sdk-core/sdk-core-protos/protos/local/temporal/sdk/core/workflow_activation/workflow_activation.proto +10 -12
- package/sdk-core/sdk-core-protos/src/history_builder.rs +1 -1
- package/sdk-core/sdk-core-protos/src/lib.rs +54 -51
- package/sdk-core/sdk-core-protos/src/task_token.rs +11 -2
- package/sdk-core/test-utils/Cargo.toml +7 -4
- package/sdk-core/test-utils/src/histfetch.rs +1 -1
- package/sdk-core/test-utils/src/lib.rs +44 -62
- package/sdk-core/tests/fuzzy_workflow.rs +5 -2
- package/sdk-core/tests/heavy_tests.rs +114 -17
- package/sdk-core/tests/integ_tests/activity_functions.rs +1 -1
- package/sdk-core/tests/integ_tests/client_tests.rs +2 -2
- package/sdk-core/tests/integ_tests/ephemeral_server_tests.rs +38 -26
- package/sdk-core/tests/integ_tests/metrics_tests.rs +126 -17
- package/sdk-core/tests/integ_tests/polling_tests.rs +118 -2
- package/sdk-core/tests/integ_tests/update_tests.rs +3 -5
- package/sdk-core/tests/integ_tests/visibility_tests.rs +3 -3
- package/sdk-core/tests/integ_tests/workflow_tests/activities.rs +1 -1
- package/sdk-core/tests/integ_tests/workflow_tests/appdata_propagation.rs +1 -1
- package/sdk-core/tests/integ_tests/workflow_tests/cancel_external.rs +1 -1
- package/sdk-core/tests/integ_tests/workflow_tests/cancel_wf.rs +1 -1
- package/sdk-core/tests/integ_tests/workflow_tests/child_workflows.rs +3 -3
- package/sdk-core/tests/integ_tests/workflow_tests/continue_as_new.rs +5 -4
- package/sdk-core/tests/integ_tests/workflow_tests/determinism.rs +3 -2
- package/sdk-core/tests/integ_tests/workflow_tests/eager.rs +6 -10
- package/sdk-core/tests/integ_tests/workflow_tests/local_activities.rs +9 -7
- package/sdk-core/tests/integ_tests/workflow_tests/modify_wf_properties.rs +1 -1
- package/sdk-core/tests/integ_tests/workflow_tests/patches.rs +14 -9
- package/sdk-core/tests/integ_tests/workflow_tests/resets.rs +1 -1
- package/sdk-core/tests/integ_tests/workflow_tests/signals.rs +6 -13
- package/sdk-core/tests/integ_tests/workflow_tests/stickyness.rs +9 -6
- package/sdk-core/tests/integ_tests/workflow_tests/timers.rs +5 -5
- package/sdk-core/tests/integ_tests/workflow_tests/upsert_search_attrs.rs +1 -1
- package/sdk-core/tests/integ_tests/workflow_tests.rs +115 -11
- package/sdk-core/tests/main.rs +2 -2
- package/src/conversions.rs +57 -0
- package/src/lib.rs +1 -0
- package/src/runtime.rs +51 -35
- package/ts/index.ts +67 -3
- package/sdk-core/core/src/worker/workflow/workflow_stream/saved_wf_inputs.rs +0 -117
- package/sdk-core/core/src/worker/workflow/workflow_stream/tonic_status_serde.rs +0 -24
- package/sdk-core/sdk/src/payload_converter.rs +0 -11
- package/sdk-core/sdk-core-protos/protos/api_upstream/.buildkite/Dockerfile +0 -2
- package/sdk-core/sdk-core-protos/protos/api_upstream/.buildkite/docker-compose.yml +0 -15
- package/sdk-core/sdk-core-protos/protos/api_upstream/.buildkite/pipeline.yml +0 -10
- package/sdk-core/test-utils/src/wf_input_saver.rs +0 -50
- package/sdk-core/tests/wf_input_replay.rs +0 -32
package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/taskqueue/v1/message.proto
CHANGED
|
@@ -54,6 +54,29 @@ message TaskQueueMetadata {
|
|
|
54
54
|
google.protobuf.DoubleValue max_tasks_per_second = 1;
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
+
// Used for specifying versions the caller is interested in.
|
|
58
|
+
message TaskQueueVersionSelection {
|
|
59
|
+
// Include specific Build IDs.
|
|
60
|
+
repeated string build_ids = 1;
|
|
61
|
+
// Include the unversioned queue.
|
|
62
|
+
bool unversioned = 2;
|
|
63
|
+
// Include all active versions. A version is considered active if it has had new
|
|
64
|
+
// tasks or polls recently.
|
|
65
|
+
bool all_active = 3;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
message TaskQueueVersionInfo {
|
|
69
|
+
// Task Queue info per Task Type. Key is the numerical value of the temporal.api.enums.v1.TaskQueueType enum.
|
|
70
|
+
map<int32, TaskQueueTypeInfo> types_info = 1;
|
|
71
|
+
temporal.api.enums.v1.BuildIdTaskReachability task_reachability = 2;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
message TaskQueueTypeInfo {
|
|
75
|
+
// Unversioned workers (with `useVersioning=false`) are reported in unversioned result even if they set a Build ID.
|
|
76
|
+
repeated PollerInfo pollers = 1;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
// Deprecated. Use `InternalTaskQueueStatus`. This is kept until `DescribeTaskQueue` supports legacy behavior.
|
|
57
80
|
message TaskQueueStatus {
|
|
58
81
|
int64 backlog_count_hint = 1;
|
|
59
82
|
int64 read_level = 2;
|
|
@@ -111,3 +134,96 @@ message BuildIdReachability {
|
|
|
111
134
|
// Reachability per task queue.
|
|
112
135
|
repeated TaskQueueReachability task_queue_reachability = 2;
|
|
113
136
|
}
|
|
137
|
+
|
|
138
|
+
message RampByPercentage {
|
|
139
|
+
// Acceptable range is [0,100).
|
|
140
|
+
float ramp_percentage = 1;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
// These rules assign a Build ID to Unassigned Workflow Executions and
|
|
144
|
+
// Activities.
|
|
145
|
+
//
|
|
146
|
+
// Specifically, assignment rules are applied to the following Executions or
|
|
147
|
+
// Activities when they are scheduled in a Task Queue:
|
|
148
|
+
// - Generally, any new Workflow Execution, except:
|
|
149
|
+
// - When A Child Workflow or a Continue-As-New Execution inherits the
|
|
150
|
+
// Build ID from its parent/previous execution by setting the
|
|
151
|
+
// `inherit_build_id` flag.
|
|
152
|
+
// - Workflow Executions started Eagerly are assigned to the Build ID of
|
|
153
|
+
// the Starter.
|
|
154
|
+
// - An Activity that is scheduled on a Task Queue different from the one
|
|
155
|
+
// their Workflow runs on, unless the `use_workflow_build_id` flag is set.
|
|
156
|
+
//
|
|
157
|
+
// In absence of (applicable) redirect rules (`CompatibleBuildIdRedirectRule`s)
|
|
158
|
+
// the task will be dispatched to Workers of the Build ID determined by the
|
|
159
|
+
// assignment rules. Otherwise, the final Build ID will be determined by the
|
|
160
|
+
// redirect rules.
|
|
161
|
+
//
|
|
162
|
+
// When using Worker Versioning, in the steady state, for a given Task Queue,
|
|
163
|
+
// there should typically be exactly one assignment rule to send all Unassigned
|
|
164
|
+
// tasks to the latest Build ID. Existence of at least one such "unconditional"
|
|
165
|
+
// rule at all times is enforce by the system, unless the `force` flag is used
|
|
166
|
+
// by the user when replacing/deleting these rules (for exceptional cases).
|
|
167
|
+
//
|
|
168
|
+
// During a deployment, one or more additional rules can be added to assign a
|
|
169
|
+
// subset of the tasks to a new Build ID based on a "ramp percentage".
|
|
170
|
+
//
|
|
171
|
+
// When there are multiple assignment rules for a Task Queue, the rules are
|
|
172
|
+
// evaluated in order, starting from index 0. The first applicable rule will be
|
|
173
|
+
// applied and the rest will be ignored.
|
|
174
|
+
//
|
|
175
|
+
// In the event that no assignment rule is applicable on a task (or the Task
|
|
176
|
+
// Queue is simply not versioned), the tasks will be sent to unversioned
|
|
177
|
+
// workers, if available. Otherwise, they remain Unassigned, and will be
|
|
178
|
+
// retried for assignment, or dispatch to unversioned workers, at a later time
|
|
179
|
+
// depending on the availability of workers.
|
|
180
|
+
message BuildIdAssignmentRule {
|
|
181
|
+
string target_build_id = 1;
|
|
182
|
+
|
|
183
|
+
// If a ramp is provided, this rule will be applied only to a sample of
|
|
184
|
+
// tasks according to the provided percentage.
|
|
185
|
+
// This option can be used only on "terminal" Build IDs (the ones not used
|
|
186
|
+
// as source in any redirect rules).
|
|
187
|
+
oneof ramp {
|
|
188
|
+
// This ramp is useful for gradual Blue/Green deployments (and similar)
|
|
189
|
+
// where you want to send a certain portion of the traffic to the target
|
|
190
|
+
// Build ID.
|
|
191
|
+
RampByPercentage percentage_ramp = 3;
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
// These rules apply to tasks assigned to a particular Build ID
|
|
196
|
+
// (`source_build_id`) to redirect them to another *compatible* Build ID
|
|
197
|
+
// (`target_build_id`).
|
|
198
|
+
//
|
|
199
|
+
// It is user's responsibility to ensure that the target Build ID is compatible
|
|
200
|
+
// with the source Build ID (e.g. by using the Patching API).
|
|
201
|
+
//
|
|
202
|
+
// Most deployments are not expected to need these rules, however following
|
|
203
|
+
// situations can greatly benefit from redirects:
|
|
204
|
+
// - Need to move long-running Workflow Executions from an old Build ID to a
|
|
205
|
+
// newer one.
|
|
206
|
+
// - Need to hotfix some broken or stuck Workflow Executions.
|
|
207
|
+
//
|
|
208
|
+
// In steady state, redirect rules are beneficial when dealing with old
|
|
209
|
+
// Executions ran on now-decommissioned Build IDs:
|
|
210
|
+
// - To redirecting the Workflow Queries to the current (compatible) Build ID.
|
|
211
|
+
// - To be able to Reset an old Execution so it can run on the current
|
|
212
|
+
// (compatible) Build ID.
|
|
213
|
+
//
|
|
214
|
+
// Redirect rules can be chained, but only the last rule in the chain can have
|
|
215
|
+
// a ramp.
|
|
216
|
+
message CompatibleBuildIdRedirectRule {
|
|
217
|
+
string source_build_id = 1;
|
|
218
|
+
string target_build_id = 2;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
message TimestampedBuildIdAssignmentRule {
|
|
222
|
+
BuildIdAssignmentRule rule = 1;
|
|
223
|
+
google.protobuf.Timestamp create_time = 2;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
message TimestampedCompatibleBuildIdRedirectRule {
|
|
227
|
+
CompatibleBuildIdRedirectRule rule = 1;
|
|
228
|
+
google.protobuf.Timestamp create_time = 2;
|
|
229
|
+
}
|
|
@@ -32,8 +32,10 @@ option ruby_package = "Temporalio::Api::Workflow::V1";
|
|
|
32
32
|
option csharp_namespace = "Temporalio.Api.Workflow.V1";
|
|
33
33
|
|
|
34
34
|
import "google/protobuf/duration.proto";
|
|
35
|
+
import "google/protobuf/empty.proto";
|
|
35
36
|
import "google/protobuf/timestamp.proto";
|
|
36
37
|
|
|
38
|
+
import "temporal/api/enums/v1/common.proto";
|
|
37
39
|
import "temporal/api/enums/v1/workflow.proto";
|
|
38
40
|
import "temporal/api/common/v1/message.proto";
|
|
39
41
|
import "temporal/api/failure/v1/message.proto";
|
|
@@ -57,6 +59,37 @@ message WorkflowExecutionInfo {
|
|
|
57
59
|
int64 history_size_bytes = 15;
|
|
58
60
|
// If set, the most recent worker version stamp that appeared in a workflow task completion
|
|
59
61
|
temporal.api.common.v1.WorkerVersionStamp most_recent_worker_version_stamp = 16;
|
|
62
|
+
// Workflow execution duration is defined as difference between close time and execution time.
|
|
63
|
+
// This field is only populated if the workflow is closed.
|
|
64
|
+
google.protobuf.Duration execution_duration = 17;
|
|
65
|
+
// Contains information about the root workflow execution.
|
|
66
|
+
// The root workflow execution is defined as follows:
|
|
67
|
+
// 1. A workflow without parent workflow is its own root workflow.
|
|
68
|
+
// 2. A workflow that has a parent workflow has the same root workflow as its parent workflow.
|
|
69
|
+
// Note: workflows continued as new or reseted may or may not have parents, check examples below.
|
|
70
|
+
//
|
|
71
|
+
// Examples:
|
|
72
|
+
// Scenario 1: Workflow W1 starts child workflow W2, and W2 starts child workflow W3.
|
|
73
|
+
// - The root workflow of all three workflows is W1.
|
|
74
|
+
// Scenario 2: Workflow W1 starts child workflow W2, and W2 continued as new W3.
|
|
75
|
+
// - The root workflow of all three workflows is W1.
|
|
76
|
+
// Scenario 3: Workflow W1 continued as new W2.
|
|
77
|
+
// - The root workflow of W1 is W1 and the root workflow of W2 is W2.
|
|
78
|
+
// Scenario 4: Workflow W1 starts child workflow W2, and W2 is reseted, creating W3
|
|
79
|
+
// - The root workflow of all three workflows is W1.
|
|
80
|
+
// Scenario 5: Workflow W1 is reseted, creating W2.
|
|
81
|
+
// - The root workflow of W1 is W1 and the root workflow of W2 is W2.
|
|
82
|
+
temporal.api.common.v1.WorkflowExecution root_execution = 18;
|
|
83
|
+
// The currently assigned build ID for this execution. Presence of this value means worker versioning is used
|
|
84
|
+
// for this execution. Assigned build ID is selected based on Worker Versioning Assignment Rules
|
|
85
|
+
// when the first workflow task of the execution is scheduled. If the first workflow task fails and is scheduled
|
|
86
|
+
// again, the assigned build ID may change according to the latest versioning rules.
|
|
87
|
+
// Assigned build ID can also change in the middle of a execution if Compatible Redirect Rules are applied to
|
|
88
|
+
// this execution.
|
|
89
|
+
string assigned_build_id = 19;
|
|
90
|
+
// Build ID inherited from a previous/parent execution. If present, assigned_build_id will be set to this, instead
|
|
91
|
+
// of using the assignment rules.
|
|
92
|
+
string inherited_build_id = 20;
|
|
60
93
|
}
|
|
61
94
|
|
|
62
95
|
message WorkflowExecutionConfig {
|
|
@@ -79,6 +112,20 @@ message PendingActivityInfo {
|
|
|
79
112
|
google.protobuf.Timestamp expiration_time = 10;
|
|
80
113
|
temporal.api.failure.v1.Failure last_failure = 11;
|
|
81
114
|
string last_worker_identity = 12;
|
|
115
|
+
// Absence of `assigned_build_id` generally means this task is on an "unversioned" task queue.
|
|
116
|
+
// In rare cases, it can also mean that the task queue is versioned but we failed to write activity's
|
|
117
|
+
// independently-assigned build ID to the database. This case heals automatically once the task is dispatched.
|
|
118
|
+
oneof assigned_build_id {
|
|
119
|
+
// When present, it means this activity is assigned to the build ID of its workflow.
|
|
120
|
+
google.protobuf.Empty use_workflow_build_id = 13;
|
|
121
|
+
// This means the activity is independently versioned and not bound to the build ID of its workflow.
|
|
122
|
+
// The activity will use the build id in this field instead.
|
|
123
|
+
// If the task fails and is scheduled again, the assigned build ID may change according to the latest versioning
|
|
124
|
+
// rules.
|
|
125
|
+
string last_independently_assigned_build_id = 14;
|
|
126
|
+
}
|
|
127
|
+
// The version stamp of the worker to whom this activity was most recently dispatched
|
|
128
|
+
temporal.api.common.v1.WorkerVersionStamp last_worker_version_stamp = 15;
|
|
82
129
|
}
|
|
83
130
|
|
|
84
131
|
message PendingChildExecutionInfo {
|
|
@@ -152,3 +199,90 @@ message NewWorkflowExecutionInfo {
|
|
|
152
199
|
temporal.api.common.v1.Header header = 13;
|
|
153
200
|
}
|
|
154
201
|
|
|
202
|
+
// CallbackInfo contains the state of an attached workflow callback.
|
|
203
|
+
message CallbackInfo {
|
|
204
|
+
// Trigger for when the workflow is closed.
|
|
205
|
+
message WorkflowClosed {}
|
|
206
|
+
|
|
207
|
+
message Trigger {
|
|
208
|
+
oneof variant {
|
|
209
|
+
WorkflowClosed workflow_closed = 1;
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
// Information on how this callback should be invoked (e.g. its URL and type).
|
|
214
|
+
temporal.api.common.v1.Callback callback = 1;
|
|
215
|
+
// Trigger for this callback.
|
|
216
|
+
Trigger trigger = 2;
|
|
217
|
+
// The time when the callback was registered.
|
|
218
|
+
google.protobuf.Timestamp registration_time = 3;
|
|
219
|
+
|
|
220
|
+
temporal.api.enums.v1.CallbackState state = 4;
|
|
221
|
+
// The number of attempts made to deliver the callback.
|
|
222
|
+
// This number represents a minimum bound since the attempt is incremented after the callback request completes.
|
|
223
|
+
int32 attempt = 5;
|
|
224
|
+
|
|
225
|
+
// The time when the last attempt completed.
|
|
226
|
+
google.protobuf.Timestamp last_attempt_complete_time = 6;
|
|
227
|
+
// The last attempt's failure, if any.
|
|
228
|
+
temporal.api.failure.v1.Failure last_attempt_failure = 7;
|
|
229
|
+
// The time when the next attempt is scheduled.
|
|
230
|
+
google.protobuf.Timestamp next_attempt_schedule_time = 8;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
// PendingNexusOperationInfo contains the state of a pending Nexus operation.
|
|
234
|
+
message PendingNexusOperationInfo {
|
|
235
|
+
// Endpoint name.
|
|
236
|
+
// Resolved to a URL via the cluster's endpoint registry.
|
|
237
|
+
string endpoint = 1;
|
|
238
|
+
// Service name.
|
|
239
|
+
string service = 2;
|
|
240
|
+
// Operation name.
|
|
241
|
+
string operation = 3;
|
|
242
|
+
|
|
243
|
+
// Operation ID. Only set for asynchronous operations after a successful StartOperation call.
|
|
244
|
+
string operation_id = 4;
|
|
245
|
+
|
|
246
|
+
// Schedule-to-close timeout for this operation.
|
|
247
|
+
// This is the only timeout settable by a workflow.
|
|
248
|
+
// (-- api-linter: core::0140::prepositions=disabled
|
|
249
|
+
// aip.dev/not-precedent: "to" is used to indicate interval. --)
|
|
250
|
+
google.protobuf.Duration schedule_to_close_timeout = 5;
|
|
251
|
+
|
|
252
|
+
// The time when the operation was scheduled.
|
|
253
|
+
google.protobuf.Timestamp scheduled_time = 6;
|
|
254
|
+
|
|
255
|
+
temporal.api.enums.v1.PendingNexusOperationState state = 7;
|
|
256
|
+
|
|
257
|
+
// The number of attempts made to deliver the start operation request.
|
|
258
|
+
// This number represents a minimum bound since the attempt is incremented after the request completes.
|
|
259
|
+
int32 attempt = 8;
|
|
260
|
+
|
|
261
|
+
// The time when the last attempt completed.
|
|
262
|
+
google.protobuf.Timestamp last_attempt_complete_time = 9;
|
|
263
|
+
// The last attempt's failure, if any.
|
|
264
|
+
temporal.api.failure.v1.Failure last_attempt_failure = 10;
|
|
265
|
+
// The time when the next attempt is scheduled.
|
|
266
|
+
google.protobuf.Timestamp next_attempt_schedule_time = 11;
|
|
267
|
+
|
|
268
|
+
NexusOperationCancellationInfo cancellation_info = 12;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
// NexusOperationCancellationInfo contains the state of a nexus operation cancellation.
|
|
272
|
+
message NexusOperationCancellationInfo {
|
|
273
|
+
// The time when cancellation was requested.
|
|
274
|
+
google.protobuf.Timestamp requested_time = 1;
|
|
275
|
+
|
|
276
|
+
temporal.api.enums.v1.NexusOperationCancellationState state = 2;
|
|
277
|
+
|
|
278
|
+
// The number of attempts made to deliver the cancel operation request.
|
|
279
|
+
// This number represents a minimum bound since the attempt is incremented after the request completes.
|
|
280
|
+
int32 attempt = 3;
|
|
281
|
+
|
|
282
|
+
// The time when the last attempt completed.
|
|
283
|
+
google.protobuf.Timestamp last_attempt_complete_time = 4;
|
|
284
|
+
// The last attempt's failure, if any.
|
|
285
|
+
temporal.api.failure.v1.Failure last_attempt_failure = 5;
|
|
286
|
+
// The time when the next attempt is scheduled.
|
|
287
|
+
google.protobuf.Timestamp next_attempt_schedule_time = 6;
|
|
288
|
+
}
|