@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.
Files changed (177) hide show
  1. package/Cargo.lock +754 -473
  2. package/Cargo.toml +3 -3
  3. package/lib/index.d.ts +33 -2
  4. package/lib/index.js.map +1 -1
  5. package/package.json +4 -4
  6. package/releases/aarch64-apple-darwin/index.node +0 -0
  7. package/releases/aarch64-unknown-linux-gnu/index.node +0 -0
  8. package/releases/x86_64-apple-darwin/index.node +0 -0
  9. package/releases/x86_64-pc-windows-msvc/index.node +0 -0
  10. package/releases/x86_64-unknown-linux-gnu/index.node +0 -0
  11. package/scripts/build.js +4 -3
  12. package/sdk-core/.cargo/config.toml +2 -4
  13. package/sdk-core/.github/workflows/heavy.yml +1 -1
  14. package/sdk-core/.github/workflows/per-pr.yml +6 -4
  15. package/sdk-core/Cargo.toml +10 -3
  16. package/sdk-core/README.md +4 -6
  17. package/sdk-core/client/Cargo.toml +13 -5
  18. package/sdk-core/client/src/lib.rs +123 -34
  19. package/sdk-core/client/src/metrics.rs +70 -18
  20. package/sdk-core/client/src/proxy.rs +85 -0
  21. package/sdk-core/client/src/raw.rs +67 -5
  22. package/sdk-core/client/src/worker_registry/mod.rs +5 -3
  23. package/sdk-core/client/src/workflow_handle/mod.rs +3 -1
  24. package/sdk-core/core/Cargo.toml +31 -37
  25. package/sdk-core/core/src/abstractions/take_cell.rs +3 -3
  26. package/sdk-core/core/src/abstractions.rs +176 -108
  27. package/sdk-core/core/src/core_tests/activity_tasks.rs +4 -13
  28. package/sdk-core/core/src/core_tests/determinism.rs +2 -1
  29. package/sdk-core/core/src/core_tests/local_activities.rs +3 -3
  30. package/sdk-core/core/src/core_tests/mod.rs +3 -3
  31. package/sdk-core/core/src/core_tests/queries.rs +42 -5
  32. package/sdk-core/core/src/core_tests/workers.rs +2 -3
  33. package/sdk-core/core/src/core_tests/workflow_tasks.rs +115 -15
  34. package/sdk-core/core/src/ephemeral_server/mod.rs +109 -136
  35. package/sdk-core/core/src/internal_flags.rs +8 -8
  36. package/sdk-core/core/src/lib.rs +16 -11
  37. package/sdk-core/core/src/pollers/mod.rs +11 -5
  38. package/sdk-core/core/src/pollers/poll_buffer.rs +48 -29
  39. package/sdk-core/core/src/protosext/mod.rs +32 -32
  40. package/sdk-core/core/src/protosext/protocol_messages.rs +14 -24
  41. package/sdk-core/core/src/retry_logic.rs +2 -2
  42. package/sdk-core/core/src/telemetry/log_export.rs +10 -9
  43. package/sdk-core/core/src/telemetry/metrics.rs +233 -330
  44. package/sdk-core/core/src/telemetry/mod.rs +11 -38
  45. package/sdk-core/core/src/telemetry/otel.rs +355 -0
  46. package/sdk-core/core/src/telemetry/prometheus_server.rs +36 -23
  47. package/sdk-core/core/src/test_help/mod.rs +80 -59
  48. package/sdk-core/core/src/worker/activities/activity_heartbeat_manager.rs +6 -6
  49. package/sdk-core/core/src/worker/activities/local_activities.rs +46 -43
  50. package/sdk-core/core/src/worker/activities.rs +45 -46
  51. package/sdk-core/core/src/worker/client/mocks.rs +8 -7
  52. package/sdk-core/core/src/worker/client.rs +40 -39
  53. package/sdk-core/core/src/worker/mod.rs +72 -42
  54. package/sdk-core/core/src/worker/slot_provider.rs +28 -28
  55. package/sdk-core/core/src/worker/slot_supplier.rs +1 -0
  56. package/sdk-core/core/src/worker/tuner/fixed_size.rs +52 -0
  57. package/sdk-core/core/src/worker/tuner/resource_based.rs +561 -0
  58. package/sdk-core/core/src/worker/tuner.rs +122 -0
  59. package/sdk-core/core/src/worker/workflow/driven_workflow.rs +6 -6
  60. package/sdk-core/core/src/worker/workflow/history_update.rs +27 -53
  61. package/sdk-core/core/src/worker/workflow/machines/activity_state_machine.rs +4 -17
  62. package/sdk-core/core/src/worker/workflow/machines/cancel_external_state_machine.rs +1 -10
  63. package/sdk-core/core/src/worker/workflow/machines/cancel_workflow_state_machine.rs +4 -11
  64. package/sdk-core/core/src/worker/workflow/machines/child_workflow_state_machine.rs +17 -35
  65. package/sdk-core/core/src/worker/workflow/machines/complete_workflow_state_machine.rs +0 -8
  66. package/sdk-core/core/src/worker/workflow/machines/continue_as_new_workflow_state_machine.rs +1 -5
  67. package/sdk-core/core/src/worker/workflow/machines/fail_workflow_state_machine.rs +0 -5
  68. package/sdk-core/core/src/worker/workflow/machines/local_activity_state_machine.rs +0 -5
  69. package/sdk-core/core/src/worker/workflow/machines/mod.rs +0 -14
  70. package/sdk-core/core/src/worker/workflow/machines/modify_workflow_properties_state_machine.rs +0 -5
  71. package/sdk-core/core/src/worker/workflow/machines/patch_state_machine.rs +0 -5
  72. package/sdk-core/core/src/worker/workflow/machines/signal_external_state_machine.rs +1 -10
  73. package/sdk-core/core/src/worker/workflow/machines/timer_state_machine.rs +3 -10
  74. package/sdk-core/core/src/worker/workflow/machines/transition_coverage.rs +12 -8
  75. package/sdk-core/core/src/worker/workflow/machines/update_state_machine.rs +0 -10
  76. package/sdk-core/core/src/worker/workflow/machines/upsert_search_attributes_state_machine.rs +6 -13
  77. package/sdk-core/core/src/worker/workflow/machines/workflow_machines.rs +27 -37
  78. package/sdk-core/core/src/worker/workflow/machines/workflow_task_state_machine.rs +3 -14
  79. package/sdk-core/core/src/worker/workflow/managed_run.rs +84 -54
  80. package/sdk-core/core/src/worker/workflow/mod.rs +63 -160
  81. package/sdk-core/core/src/worker/workflow/run_cache.rs +22 -13
  82. package/sdk-core/core/src/worker/workflow/wft_extraction.rs +16 -3
  83. package/sdk-core/core/src/worker/workflow/wft_poller.rs +15 -12
  84. package/sdk-core/core/src/worker/workflow/workflow_stream.rs +39 -78
  85. package/sdk-core/core-api/Cargo.toml +6 -5
  86. package/sdk-core/core-api/src/errors.rs +8 -0
  87. package/sdk-core/core-api/src/telemetry/metrics.rs +75 -4
  88. package/sdk-core/core-api/src/telemetry.rs +7 -1
  89. package/sdk-core/core-api/src/worker.rs +212 -56
  90. package/sdk-core/fsm/Cargo.toml +3 -0
  91. package/sdk-core/fsm/rustfsm_procmacro/tests/trybuild/no_handle_conversions_require_into_fail.stderr +1 -1
  92. package/sdk-core/sdk/Cargo.toml +5 -7
  93. package/sdk-core/sdk/src/app_data.rs +3 -3
  94. package/sdk-core/sdk/src/lib.rs +5 -3
  95. package/sdk-core/sdk/src/workflow_context/options.rs +1 -1
  96. package/sdk-core/sdk/src/workflow_context.rs +10 -9
  97. package/sdk-core/sdk/src/workflow_future.rs +1 -1
  98. package/sdk-core/sdk-core-protos/Cargo.toml +8 -6
  99. package/sdk-core/sdk-core-protos/build.rs +1 -10
  100. package/sdk-core/sdk-core-protos/protos/api_upstream/.github/PULL_REQUEST_TEMPLATE.md +3 -0
  101. package/sdk-core/sdk-core-protos/protos/api_upstream/.github/workflows/ci.yml +26 -0
  102. package/sdk-core/sdk-core-protos/protos/api_upstream/Makefile +42 -20
  103. package/sdk-core/sdk-core-protos/protos/api_upstream/README.md +2 -0
  104. package/sdk-core/sdk-core-protos/protos/api_upstream/api-linter.yaml +36 -26
  105. package/sdk-core/sdk-core-protos/protos/api_upstream/buf.lock +2 -0
  106. package/sdk-core/sdk-core-protos/protos/api_upstream/google/protobuf/struct.proto +95 -0
  107. package/sdk-core/sdk-core-protos/protos/api_upstream/openapi/openapiv2.json +9632 -0
  108. package/sdk-core/sdk-core-protos/protos/api_upstream/openapi/openapiv3.yaml +7337 -0
  109. package/sdk-core/sdk-core-protos/protos/api_upstream/openapi/payload_description.txt +2 -0
  110. package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/command/v1/message.proto +45 -11
  111. package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/common/v1/message.proto +22 -4
  112. package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/enums/v1/command_type.proto +2 -0
  113. package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/enums/v1/common.proto +44 -0
  114. package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/enums/v1/event_type.proto +18 -3
  115. package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/enums/v1/failed_cause.proto +20 -0
  116. package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/enums/v1/task_queue.proto +30 -0
  117. package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/enums/v1/update.proto +7 -8
  118. package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/enums/v1/workflow.proto +23 -5
  119. package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/errordetails/v1/message.proto +20 -0
  120. package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/failure/v1/message.proto +25 -0
  121. package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/history/v1/message.proto +141 -15
  122. package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/namespace/v1/message.proto +12 -0
  123. package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/nexus/v1/message.proto +193 -0
  124. package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/operatorservice/v1/request_response.proto +73 -6
  125. package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/operatorservice/v1/service.proto +46 -4
  126. package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/schedule/v1/message.proto +4 -0
  127. package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/sdk/v1/workflow_metadata.proto +2 -2
  128. package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/taskqueue/v1/message.proto +116 -0
  129. package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/workflow/v1/message.proto +134 -0
  130. package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/workflowservice/v1/request_response.proto +274 -29
  131. package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/workflowservice/v1/service.proto +57 -1
  132. package/sdk-core/sdk-core-protos/protos/local/temporal/sdk/core/workflow_activation/workflow_activation.proto +10 -12
  133. package/sdk-core/sdk-core-protos/src/history_builder.rs +1 -1
  134. package/sdk-core/sdk-core-protos/src/lib.rs +54 -51
  135. package/sdk-core/sdk-core-protos/src/task_token.rs +11 -2
  136. package/sdk-core/test-utils/Cargo.toml +7 -4
  137. package/sdk-core/test-utils/src/histfetch.rs +1 -1
  138. package/sdk-core/test-utils/src/lib.rs +44 -62
  139. package/sdk-core/tests/fuzzy_workflow.rs +5 -2
  140. package/sdk-core/tests/heavy_tests.rs +114 -17
  141. package/sdk-core/tests/integ_tests/activity_functions.rs +1 -1
  142. package/sdk-core/tests/integ_tests/client_tests.rs +2 -2
  143. package/sdk-core/tests/integ_tests/ephemeral_server_tests.rs +38 -26
  144. package/sdk-core/tests/integ_tests/metrics_tests.rs +126 -17
  145. package/sdk-core/tests/integ_tests/polling_tests.rs +118 -2
  146. package/sdk-core/tests/integ_tests/update_tests.rs +3 -5
  147. package/sdk-core/tests/integ_tests/visibility_tests.rs +3 -3
  148. package/sdk-core/tests/integ_tests/workflow_tests/activities.rs +1 -1
  149. package/sdk-core/tests/integ_tests/workflow_tests/appdata_propagation.rs +1 -1
  150. package/sdk-core/tests/integ_tests/workflow_tests/cancel_external.rs +1 -1
  151. package/sdk-core/tests/integ_tests/workflow_tests/cancel_wf.rs +1 -1
  152. package/sdk-core/tests/integ_tests/workflow_tests/child_workflows.rs +3 -3
  153. package/sdk-core/tests/integ_tests/workflow_tests/continue_as_new.rs +5 -4
  154. package/sdk-core/tests/integ_tests/workflow_tests/determinism.rs +3 -2
  155. package/sdk-core/tests/integ_tests/workflow_tests/eager.rs +6 -10
  156. package/sdk-core/tests/integ_tests/workflow_tests/local_activities.rs +9 -7
  157. package/sdk-core/tests/integ_tests/workflow_tests/modify_wf_properties.rs +1 -1
  158. package/sdk-core/tests/integ_tests/workflow_tests/patches.rs +14 -9
  159. package/sdk-core/tests/integ_tests/workflow_tests/resets.rs +1 -1
  160. package/sdk-core/tests/integ_tests/workflow_tests/signals.rs +6 -13
  161. package/sdk-core/tests/integ_tests/workflow_tests/stickyness.rs +9 -6
  162. package/sdk-core/tests/integ_tests/workflow_tests/timers.rs +5 -5
  163. package/sdk-core/tests/integ_tests/workflow_tests/upsert_search_attrs.rs +1 -1
  164. package/sdk-core/tests/integ_tests/workflow_tests.rs +115 -11
  165. package/sdk-core/tests/main.rs +2 -2
  166. package/src/conversions.rs +57 -0
  167. package/src/lib.rs +1 -0
  168. package/src/runtime.rs +51 -35
  169. package/ts/index.ts +67 -3
  170. package/sdk-core/core/src/worker/workflow/workflow_stream/saved_wf_inputs.rs +0 -117
  171. package/sdk-core/core/src/worker/workflow/workflow_stream/tonic_status_serde.rs +0 -24
  172. package/sdk-core/sdk/src/payload_converter.rs +0 -11
  173. package/sdk-core/sdk-core-protos/protos/api_upstream/.buildkite/Dockerfile +0 -2
  174. package/sdk-core/sdk-core-protos/protos/api_upstream/.buildkite/docker-compose.yml +0 -15
  175. package/sdk-core/sdk-core-protos/protos/api_upstream/.buildkite/pipeline.yml +0 -10
  176. package/sdk-core/test-utils/src/wf_input_saver.rs +0 -50
  177. package/sdk-core/tests/wf_input_replay.rs +0 -32
@@ -56,6 +56,7 @@ import "temporal/api/update/v1/message.proto";
56
56
  import "temporal/api/version/v1/message.proto";
57
57
  import "temporal/api/batch/v1/message.proto";
58
58
  import "temporal/api/sdk/v1/task_complete_metadata.proto";
59
+ import "temporal/api/nexus/v1/message.proto";
59
60
 
60
61
  import "google/protobuf/duration.proto";
61
62
  import "google/protobuf/timestamp.proto";
@@ -109,10 +110,6 @@ message DescribeNamespaceResponse {
109
110
  repeated temporal.api.replication.v1.FailoverStatus failover_history = 6;
110
111
  }
111
112
 
112
- // (-- api-linter: core::0134::request-mask-required=disabled
113
- // aip.dev/not-precedent: UpdateNamespace RPC doesn't follow Google API format. --)
114
- // (-- api-linter: core::0134::request-resource-required=disabled
115
- // aip.dev/not-precedent: UpdateNamespace RPC doesn't follow Google API format. --)
116
113
  message UpdateNamespaceRequest {
117
114
  string namespace = 1;
118
115
  temporal.api.namespace.v1.UpdateNamespaceInfo update_info = 2;
@@ -159,8 +156,16 @@ message StartWorkflowExecutionRequest {
159
156
  string identity = 9;
160
157
  // A unique identifier for this start request. Typically UUIDv4.
161
158
  string request_id = 10;
162
- // Default: WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE.
159
+ // Defines whether to allow re-using the workflow id from a previously *closed* workflow.
160
+ // The default policy is WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE.
161
+ //
162
+ // See `workflow_id_conflict_policy` for handling a workflow id duplication with a *running* workflow.
163
163
  temporal.api.enums.v1.WorkflowIdReusePolicy workflow_id_reuse_policy = 11;
164
+ // Defines how to resolve a workflow id conflict with a *running* workflow.
165
+ // The default policy is WORKFLOW_ID_CONFLICT_POLICY_FAIL.
166
+ //
167
+ // See `workflow_id_reuse_policy` for handling a workflow id duplication with a *closed* workflow.
168
+ temporal.api.enums.v1.WorkflowIdConflictPolicy workflow_id_conflict_policy = 22;
164
169
  // The retry policy for the workflow. Will never exceed `workflow_execution_timeout`.
165
170
  temporal.api.common.v1.RetryPolicy retry_policy = 12;
166
171
  // See https://docs.temporal.io/docs/content/what-is-a-temporal-cron-job/
@@ -183,10 +188,17 @@ message StartWorkflowExecutionRequest {
183
188
  // If the workflow gets a signal before the delay, a workflow task will be dispatched and the rest
184
189
  // of the delay will be ignored.
185
190
  google.protobuf.Duration workflow_start_delay = 20;
191
+ // Callbacks to be called by the server when this workflow reaches a terminal state.
192
+ // If the workflow continues-as-new, these callbacks will be carried over to the new execution.
193
+ // Callback addresses must be whitelisted in the server's dynamic configuration.
194
+ repeated temporal.api.common.v1.Callback completion_callbacks = 21;
186
195
  }
187
196
 
188
197
  message StartWorkflowExecutionResponse {
198
+ // The run id of the workflow that was started - or used (via WorkflowIdConflictPolicy USE_EXISTING).
189
199
  string run_id = 1;
200
+ // If true, a new workflow was started.
201
+ bool started = 3;
190
202
  // When `request_eager_execution` is set on the `StartWorkflowExecutionRequest`, the server - if supported - will
191
203
  // return the first workflow task to be eagerly executed.
192
204
  // The caller is expected to have a worker available to process the task.
@@ -631,14 +643,24 @@ message SignalWithStartWorkflowExecutionRequest {
631
643
  string identity = 9;
632
644
  // Used to de-dupe signal w/ start requests
633
645
  string request_id = 10;
646
+ // Defines whether to allow re-using the workflow id from a previously *closed* workflow.
647
+ // The default policy is WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE.
648
+ //
649
+ // See `workflow_id_reuse_policy` for handling a workflow id duplication with a *running* workflow.
634
650
  temporal.api.enums.v1.WorkflowIdReusePolicy workflow_id_reuse_policy = 11;
651
+ // Defines how to resolve a workflow id conflict with a *running* workflow.
652
+ // The default policy is WORKFLOW_ID_CONFLICT_POLICY_USE_EXISTING.
653
+ // Note that WORKFLOW_ID_CONFLICT_POLICY_FAIL is an invalid option.
654
+ //
655
+ // See `workflow_id_reuse_policy` for handling a workflow id duplication with a *closed* workflow.
656
+ temporal.api.enums.v1.WorkflowIdConflictPolicy workflow_id_conflict_policy = 22;
635
657
  // The workflow author-defined name of the signal to send to the workflow
636
658
  string signal_name = 12;
637
659
  // Serialized value(s) to provide with the signal
638
660
  temporal.api.common.v1.Payloads signal_input = 13;
639
661
  // Deprecated
640
662
  string control = 14;
641
- // Retry policy for the workflow Default: WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE.
663
+ // Retry policy for the workflow
642
664
  temporal.api.common.v1.RetryPolicy retry_policy = 15;
643
665
  // See https://docs.temporal.io/docs/content/what-is-a-temporal-cron-job/
644
666
  string cron_schedule = 16;
@@ -657,7 +679,10 @@ message SignalWithStartWorkflowExecutionRequest {
657
679
  }
658
680
 
659
681
  message SignalWithStartWorkflowExecutionResponse {
682
+ // The run id of the workflow that was started - or just signaled, if it was already running.
660
683
  string run_id = 1;
684
+ // If true, a new workflow was started.
685
+ bool started = 2;
661
686
  }
662
687
 
663
688
  message ResetWorkflowExecutionRequest {
@@ -670,7 +695,7 @@ message ResetWorkflowExecutionRequest {
670
695
  // Used to de-dupe reset requests
671
696
  string request_id = 5;
672
697
  // Event types to be reapplied (deprecated)
673
- // Default: RESET_REAPPLY_TYPE_ALL_ELIGIBLE
698
+ // Default: RESET_REAPPLY_TYPE_SIGNAL
674
699
  temporal.api.enums.v1.ResetReapplyType reset_reapply_type = 6;
675
700
  // Event types not to be reapplied
676
701
  repeated temporal.api.enums.v1.ResetReapplyExcludeType reset_reapply_exclude_types = 7;
@@ -697,10 +722,6 @@ message TerminateWorkflowExecutionRequest {
697
722
  message TerminateWorkflowExecutionResponse {
698
723
  }
699
724
 
700
- // (-- api-linter: core::0135::request-unknown-fields=disabled
701
- // aip.dev/not-precedent: DeleteNamespace RPC doesn't follow Google API format. --)
702
- // (-- api-linter: core::0135::request-name-required=disabled
703
- // aip.dev/not-precedent: DeleteNamespace RPC doesn't follow Google API format. --)
704
725
  message DeleteWorkflowExecutionRequest {
705
726
  string namespace = 1;
706
727
  // Workflow Execution to delete. If run_id is not specified, the latest one is used.
@@ -854,19 +875,52 @@ message DescribeWorkflowExecutionResponse {
854
875
  repeated temporal.api.workflow.v1.PendingActivityInfo pending_activities = 3;
855
876
  repeated temporal.api.workflow.v1.PendingChildExecutionInfo pending_children = 4;
856
877
  temporal.api.workflow.v1.PendingWorkflowTaskInfo pending_workflow_task = 5;
878
+ repeated temporal.api.workflow.v1.CallbackInfo callbacks = 6;
879
+ repeated temporal.api.workflow.v1.PendingNexusOperationInfo pending_nexus_operations = 7;
857
880
  }
858
881
 
882
+ // (-- api-linter: core::0203::optional=disabled
883
+ // aip.dev/not-precedent: field_behavior annotation not available in our gogo fork --)
859
884
  message DescribeTaskQueueRequest {
860
885
  string namespace = 1;
886
+ // Sticky queues are not supported in `ENHANCED` mode.
861
887
  temporal.api.taskqueue.v1.TaskQueue task_queue = 2;
888
+ // Deprecated. Use `ENHANCED` mode with `task_queue_types`. Ignored in `ENHANCED` mode.
862
889
  // If unspecified (TASK_QUEUE_TYPE_UNSPECIFIED), then default value (TASK_QUEUE_TYPE_WORKFLOW) will be used.
863
890
  temporal.api.enums.v1.TaskQueueType task_queue_type = 3;
891
+ // Deprecated. Ignored in `ENHANCED` mode.
864
892
  bool include_task_queue_status = 4;
893
+
894
+ // All options except `task_queue_type` and `include_task_queue_status` are only available in the `ENHANCED` mode.
895
+ temporal.api.enums.v1.DescribeTaskQueueMode api_mode = 5;
896
+
897
+ // Optional. If not provided, the result for the default Build ID will be returned. The default Build ID is the one
898
+ // mentioned in the first unconditional Assignment Rule. If there is no default Build ID, the result for the
899
+ // unversioned queue will be returned.
900
+ // (-- api-linter: core::0140::prepositions --)
901
+ temporal.api.taskqueue.v1.TaskQueueVersionSelection versions = 6;
902
+
903
+ // Task queue types to report info about. If not specified, all types are considered.
904
+ repeated temporal.api.enums.v1.TaskQueueType task_queue_types = 7;
905
+ // Report backlog info for the requested task queue types and versions
906
+ // bool report_backlog_info = 8;
907
+ // Report list of pollers for requested task queue types and versions
908
+ bool report_pollers = 9;
909
+ // Report task reachability for the requested versions and all task types (task reachability is not reported
910
+ // per task type).
911
+ bool report_task_reachability = 10;
865
912
  }
866
913
 
867
914
  message DescribeTaskQueueResponse {
915
+ // Deprecated. Use `versions_info.types_info.pollers` with `ENHANCED` mode instead.
916
+ // Not set in `ENHANCED` mode.
868
917
  repeated temporal.api.taskqueue.v1.PollerInfo pollers = 1;
918
+ // Deprecated. Not set in `ENHANCED` mode.
869
919
  temporal.api.taskqueue.v1.TaskQueueStatus task_queue_status = 2;
920
+
921
+ // This map contains Task Queue information for each Build ID. Empty string as key value means unversioned.
922
+ // Only set in `ENHANCED` mode.
923
+ map<string, temporal.api.taskqueue.v1.TaskQueueVersionInfo> versions_info = 3;
870
924
  }
871
925
 
872
926
  message GetClusterInfoRequest {
@@ -948,12 +1002,6 @@ message ListTaskQueuePartitionsResponse {
948
1002
  repeated temporal.api.taskqueue.v1.TaskQueuePartitionMetadata workflow_task_queue_partitions = 2;
949
1003
  }
950
1004
 
951
- // (-- api-linter: core::0133::request-parent-required=disabled
952
- // aip.dev/not-precedent: CreateSchedule doesn't follow Google API format --)
953
- // (-- api-linter: core::0133::request-unknown-fields=disabled
954
- // aip.dev/not-precedent: CreateSchedule doesn't follow Google API format --)
955
- // (-- api-linter: core::0133::request-resource-behavior=disabled
956
- // aip.dev/not-precedent: field_behavior annotation not available in our gogo fork --)
957
1005
  // (-- api-linter: core::0203::optional=disabled
958
1006
  // aip.dev/not-precedent: field_behavior annotation not available in our gogo fork --)
959
1007
  message CreateScheduleRequest {
@@ -1006,8 +1054,6 @@ message DescribeScheduleResponse {
1006
1054
  bytes conflict_token = 5;
1007
1055
  }
1008
1056
 
1009
- // (-- api-linter: core::0134::request-mask-required=disabled
1010
- // aip.dev/not-precedent: UpdateSchedule doesn't follow Google API format --)
1011
1057
  message UpdateScheduleRequest {
1012
1058
  // The namespace of the schedule to update.
1013
1059
  string namespace = 1;
@@ -1025,6 +1071,12 @@ message UpdateScheduleRequest {
1025
1071
  string identity = 5;
1026
1072
  // A unique identifier for this update request for idempotence. Typically UUIDv4.
1027
1073
  string request_id = 6;
1074
+ // Schedule search attributes to be updated.
1075
+ // Do not set this field if you do not want to update the search attributes.
1076
+ // A non-null empty object will set the search attributes to an empty map.
1077
+ // Note: you cannot only update the search attributes with `UpdateScheduleRequest`,
1078
+ // you must also set the `schedule` field; otherwise, it will unset the schedule.
1079
+ temporal.api.common.v1.SearchAttributes search_attributes = 7;
1028
1080
  }
1029
1081
 
1030
1082
  message UpdateScheduleResponse {
@@ -1059,10 +1111,6 @@ message ListScheduleMatchingTimesResponse {
1059
1111
  repeated google.protobuf.Timestamp start_time = 1;
1060
1112
  }
1061
1113
 
1062
- // (-- api-linter: core::0135::request-name-required=disabled
1063
- // aip.dev/not-precedent: DeleteSchedule doesn't follow Google API format --)
1064
- // (-- api-linter: core::0135::request-unknown-fields=disabled
1065
- // aip.dev/not-precedent: DeleteSchedule doesn't follow Google API format --)
1066
1114
  message DeleteScheduleRequest {
1067
1115
  // The namespace of the schedule to delete.
1068
1116
  string namespace = 1;
@@ -1082,6 +1130,8 @@ message ListSchedulesRequest {
1082
1130
  int32 maximum_page_size = 2;
1083
1131
  // Token to get the next page of results.
1084
1132
  bytes next_page_token = 3;
1133
+ // Query to filter schedules.
1134
+ string query = 4;
1085
1135
  }
1086
1136
 
1087
1137
  message ListSchedulesResponse {
@@ -1089,10 +1139,6 @@ message ListSchedulesResponse {
1089
1139
  bytes next_page_token = 2;
1090
1140
  }
1091
1141
 
1092
- // (-- api-linter: core::0134::request-mask-required=disabled
1093
- // aip.dev/not-precedent: UpdateWorkerBuildIdCompatibilityRequest doesn't follow Google API format --)
1094
- // (-- api-linter: core::0134::request-resource-required=disabled
1095
- // aip.dev/not-precedent: UpdateWorkerBuildIdCompatibilityRequest RPC doesn't follow Google API format. --)
1096
1142
  message UpdateWorkerBuildIdCompatibilityRequest {
1097
1143
  message AddNewCompatibleVersion {
1098
1144
  // A new id to be added to an existing compatible set.
@@ -1153,8 +1199,6 @@ message UpdateWorkerBuildIdCompatibilityResponse {
1153
1199
  reserved "version_set_id";
1154
1200
  }
1155
1201
 
1156
- // (-- api-linter: core::0134::request-resource-required=disabled
1157
- // aip.dev/not-precedent: GetWorkerBuildIdCompatibilityRequest RPC doesn't follow Google API format. --)
1158
1202
  message GetWorkerBuildIdCompatibilityRequest {
1159
1203
  string namespace = 1;
1160
1204
  // Must be set, the task queue to interrogate about worker id compatibility.
@@ -1172,6 +1216,127 @@ message GetWorkerBuildIdCompatibilityResponse {
1172
1216
  repeated temporal.api.taskqueue.v1.CompatibleVersionSet major_version_sets = 1;
1173
1217
  }
1174
1218
 
1219
+ // (-- api-linter: core::0134::request-mask-required=disabled
1220
+ // aip.dev/not-precedent: UpdateNamespace RPC doesn't follow Google API format. --)
1221
+ // (-- api-linter: core::0134::request-resource-required=disabled
1222
+ // aip.dev/not-precedent: GetWorkerBuildIdCompatibilityRequest RPC doesn't follow Google API format. --)
1223
+ message UpdateWorkerVersioningRulesRequest {
1224
+ // Inserts the rule to the list of assignment rules for this Task Queue.
1225
+ // The rules are evaluated in order, starting from index 0. The first
1226
+ // applicable rule will be applied and the rest will be ignored.
1227
+ message InsertBuildIdAssignmentRule {
1228
+ // Use this option to insert the rule in a particular index. By
1229
+ // default, the new rule is inserted at the beginning of the list
1230
+ // (index 0). If the given index is too larger the rule will be
1231
+ // inserted at the end of the list.
1232
+ int32 rule_index = 1;
1233
+ temporal.api.taskqueue.v1.BuildIdAssignmentRule rule = 2;
1234
+ }
1235
+
1236
+ // Replaces the assignment rule at a given index.
1237
+ message ReplaceBuildIdAssignmentRule {
1238
+ int32 rule_index = 1;
1239
+ temporal.api.taskqueue.v1.BuildIdAssignmentRule rule = 2;
1240
+
1241
+ // By default presence of one unconditional rule is enforced, otherwise
1242
+ // the replace operation will be rejected. Set `force` to true to
1243
+ // bypass this validation. An unconditional assignment rule:
1244
+ // - Has no hint filter
1245
+ // - Has no ramp
1246
+ bool force = 3;
1247
+ }
1248
+
1249
+ message DeleteBuildIdAssignmentRule {
1250
+ int32 rule_index = 1;
1251
+
1252
+ // By default presence of one unconditional rule is enforced, otherwise
1253
+ // the delete operation will be rejected. Set `force` to true to
1254
+ // bypass this validation. An unconditional assignment rule:
1255
+ // - Has no hint filter
1256
+ // - Has no ramp
1257
+ bool force = 2;
1258
+ }
1259
+
1260
+ // Adds the rule to the list of redirect rules for this Task Queue. There
1261
+ // can be at most one redirect rule for each distinct Source Build ID.
1262
+ message AddCompatibleBuildIdRedirectRule {
1263
+ temporal.api.taskqueue.v1.CompatibleBuildIdRedirectRule rule = 1;
1264
+ }
1265
+
1266
+ // Replaces the routing rule with the given source Build ID.
1267
+ message ReplaceCompatibleBuildIdRedirectRule {
1268
+ temporal.api.taskqueue.v1.CompatibleBuildIdRedirectRule rule = 1;
1269
+ }
1270
+
1271
+ message DeleteCompatibleBuildIdRedirectRule {
1272
+ string source_build_id = 1;
1273
+ }
1274
+
1275
+ // This command is intended to be used to complete the rollout of a Build
1276
+ // ID and cleanup unnecessary rules possibly created during a gradual
1277
+ // rollout. Specifically, this command will make the following changes
1278
+ // atomically:
1279
+ // 1. Adds an assignment rule (with full ramp) for the target Build ID at
1280
+ // the end of the list.
1281
+ // 2. Removes all previously added assignment rules to the given target
1282
+ // Build ID (if any).
1283
+ // 3. Removes any fully-ramped assignment rule for other Build IDs.
1284
+ message CommitBuildId {
1285
+ string target_build_id = 1;
1286
+
1287
+ // To prevent committing invalid Build IDs, we reject the request if no
1288
+ // pollers has been seen recently for this Build ID. Use the `force`
1289
+ // option to disable this validation.
1290
+ bool force = 2;
1291
+ }
1292
+
1293
+ string namespace = 1;
1294
+ string task_queue = 2;
1295
+
1296
+ // A valid conflict_token can be taken from the previous
1297
+ // ListWorkerVersioningRulesResponse or UpdateWorkerVersioningRulesResponse.
1298
+ // An invalid token will cause this request to fail, ensuring that if the rules
1299
+ // for this Task Queue have been modified between the previous and current
1300
+ // operation, the request will fail instead of causing an unpredictable mutation.
1301
+ bytes conflict_token = 3;
1302
+
1303
+ oneof operation {
1304
+ InsertBuildIdAssignmentRule insert_assignment_rule = 4;
1305
+ ReplaceBuildIdAssignmentRule replace_assignment_rule = 5;
1306
+ DeleteBuildIdAssignmentRule delete_assignment_rule = 6;
1307
+ AddCompatibleBuildIdRedirectRule add_compatible_redirect_rule = 7;
1308
+ ReplaceCompatibleBuildIdRedirectRule replace_compatible_redirect_rule = 8;
1309
+ DeleteCompatibleBuildIdRedirectRule delete_compatible_redirect_rule = 9;
1310
+ CommitBuildId commit_build_id = 10;
1311
+ }
1312
+ }
1313
+
1314
+ message UpdateWorkerVersioningRulesResponse {
1315
+ repeated temporal.api.taskqueue.v1.TimestampedBuildIdAssignmentRule assignment_rules = 1;
1316
+ repeated temporal.api.taskqueue.v1.TimestampedCompatibleBuildIdRedirectRule compatible_redirect_rules = 2;
1317
+
1318
+ // This value can be passed back to UpdateWorkerVersioningRulesRequest to
1319
+ // ensure that the rules were not modified between the two updates, which
1320
+ // could lead to lost updates and other confusion.
1321
+ bytes conflict_token = 3;
1322
+ }
1323
+
1324
+ message GetWorkerVersioningRulesRequest {
1325
+ string namespace = 1;
1326
+ string task_queue = 2;
1327
+ }
1328
+
1329
+ message GetWorkerVersioningRulesResponse {
1330
+ repeated temporal.api.taskqueue.v1.TimestampedBuildIdAssignmentRule assignment_rules = 1;
1331
+ repeated temporal.api.taskqueue.v1.TimestampedCompatibleBuildIdRedirectRule compatible_redirect_rules = 2;
1332
+
1333
+ // This value can be passed back to UpdateWorkerVersioningRulesRequest to
1334
+ // ensure that the rules were not modified between this List and the Update,
1335
+ // which could lead to lost updates and other confusion.
1336
+ bytes conflict_token = 3;
1337
+ }
1338
+
1339
+ // Deprecated. Use `DescribeTaskQueue`.
1175
1340
  message GetWorkerTaskReachabilityRequest {
1176
1341
  string namespace = 1;
1177
1342
  // Build ids to retrieve reachability for. An empty string will be interpreted as an unversioned worker.
@@ -1196,6 +1361,7 @@ message GetWorkerTaskReachabilityRequest {
1196
1361
  temporal.api.enums.v1.TaskReachability reachability = 4;
1197
1362
  }
1198
1363
 
1364
+ // Deprecated. Use `DescribeTaskQueue`.
1199
1365
  message GetWorkerTaskReachabilityResponse {
1200
1366
  // Task reachability, broken down by build id and then task queue.
1201
1367
  // When requesting a large number of task queues or all task queues associated with the given build ids in a
@@ -1381,3 +1547,82 @@ message PollWorkflowExecutionUpdateResponse {
1381
1547
  // Sufficient information to address this update.
1382
1548
  temporal.api.update.v1.UpdateRef update_ref = 3;
1383
1549
  }
1550
+
1551
+ message PollNexusTaskQueueRequest {
1552
+ string namespace = 1;
1553
+ // The identity of the client who initiated this request.
1554
+ string identity = 2;
1555
+ temporal.api.taskqueue.v1.TaskQueue task_queue = 3;
1556
+ // Information about this worker's build identifier and if it is choosing to use the versioning
1557
+ // feature. See the `WorkerVersionCapabilities` docstring for more.
1558
+ temporal.api.common.v1.WorkerVersionCapabilities worker_version_capabilities = 4;
1559
+ }
1560
+
1561
+ message PollNexusTaskQueueResponse {
1562
+ // An opaque unique identifier for this task for correlating a completion request the embedded request.
1563
+ bytes task_token = 1;
1564
+ // Embedded request as translated from the incoming frontend request.
1565
+ temporal.api.nexus.v1.Request request = 2;
1566
+ }
1567
+
1568
+ message RespondNexusTaskCompletedRequest {
1569
+ string namespace = 1;
1570
+ // The identity of the client who initiated this request.
1571
+ string identity = 2;
1572
+ // A unique identifier for this task as received via a poll response.
1573
+ bytes task_token = 3;
1574
+ // Embedded response to be translated into a frontend response.
1575
+ temporal.api.nexus.v1.Response response = 4;
1576
+ }
1577
+
1578
+ message RespondNexusTaskCompletedResponse {
1579
+ }
1580
+
1581
+ message RespondNexusTaskFailedRequest {
1582
+ string namespace = 1;
1583
+ // The identity of the client who initiated this request.
1584
+ string identity = 2;
1585
+ // A unique identifier for this task.
1586
+ bytes task_token = 3;
1587
+ // The error the handler failed with.
1588
+ temporal.api.nexus.v1.HandlerError error = 4;
1589
+ }
1590
+
1591
+ message RespondNexusTaskFailedResponse {
1592
+ }
1593
+
1594
+ message ExecuteMultiOperationRequest {
1595
+ string namespace = 1;
1596
+
1597
+ // List of operations to execute within a single workflow.
1598
+ //
1599
+ // Preconditions:
1600
+ // - The list of operations must not be empty.
1601
+ // - The workflow ids must match across operations.
1602
+ // - The only valid list of operations at this time is [StartWorkflow, UpdateWorkflow], in this order.
1603
+ //
1604
+ // Note that additional operation-specific restrictions have to be considered.
1605
+ repeated Operation operations = 2;
1606
+
1607
+ message Operation {
1608
+ oneof operation {
1609
+ // Additional restrictions:
1610
+ // - setting `cron_schedule` is invalid
1611
+ // - setting `request_eager_execution` is invalid
1612
+ StartWorkflowExecutionRequest start_workflow = 1;
1613
+
1614
+ UpdateWorkflowExecutionRequest update_workflow = 2;
1615
+ }
1616
+ }
1617
+ }
1618
+
1619
+ message ExecuteMultiOperationResponse {
1620
+ repeated Response responses = 1;
1621
+
1622
+ message Response {
1623
+ oneof response {
1624
+ StartWorkflowExecutionResponse start_workflow = 1;
1625
+ UpdateWorkflowExecutionResponse update_workflow = 2;
1626
+ }
1627
+ }
1628
+ }
@@ -107,6 +107,22 @@ service WorkflowService {
107
107
  };
108
108
  }
109
109
 
110
+ // ExecuteMultiOperation executes multiple operations within a single workflow.
111
+ //
112
+ // Operations are started atomically, meaning if *any* operation fails to be started, none are,
113
+ // and the request fails. Upon start, the API returns only when *all* operations have a response.
114
+ //
115
+ // Upon failure, it returns `MultiOperationExecutionFailure` where the status code
116
+ // equals the status code of the *first* operation that failed to be started.
117
+ //
118
+ // NOTE: Experimental API.
119
+ rpc ExecuteMultiOperation (ExecuteMultiOperationRequest) returns (ExecuteMultiOperationResponse) {
120
+ option (google.api.http) = {
121
+ post: "/api/v1/namespaces/{namespace}/workflows/execute-multi-operation"
122
+ body: "*"
123
+ };
124
+ }
125
+
110
126
  // GetWorkflowExecutionHistory returns the history of specified workflow execution. Fails with
111
127
  // `NotFound` if the specified workflow execution is unknown to the service.
112
128
  rpc GetWorkflowExecutionHistory (GetWorkflowExecutionHistoryRequest) returns (GetWorkflowExecutionHistoryResponse) {
@@ -436,7 +452,10 @@ service WorkflowService {
436
452
  };
437
453
  }
438
454
 
439
- // DescribeTaskQueue returns information about the target task queue.
455
+ // DescribeTaskQueue returns the following information about the target task queue, broken down by Build ID:
456
+ // - List of pollers
457
+ // - Workflow Reachability status
458
+ // - Backlog info for Workflow and/or Activity tasks
440
459
  rpc DescribeTaskQueue (DescribeTaskQueueRequest) returns (DescribeTaskQueueResponse) {
441
460
  option (google.api.http) = {
442
461
  get: "/api/v1/namespaces/{namespace}/task-queues/{task_queue.name}"
@@ -514,6 +533,8 @@ service WorkflowService {
514
533
  };
515
534
  }
516
535
 
536
+ // Deprecated. Use `UpdateWorkerVersioningRules`.
537
+ //
517
538
  // Allows users to specify sets of worker build id versions on a per task queue basis. Versions
518
539
  // are ordered, and may be either compatible with some extant version, or a new incompatible
519
540
  // version, forming sets of ids which are incompatible with each other, but whose contained
@@ -531,6 +552,7 @@ service WorkflowService {
531
552
  // aip.dev/not-precedent: We do yet expose versioning API to HTTP. --)
532
553
  rpc UpdateWorkerBuildIdCompatibility (UpdateWorkerBuildIdCompatibilityRequest) returns (UpdateWorkerBuildIdCompatibilityResponse) {}
533
554
 
555
+ // Deprecated. Use `GetWorkerVersioningRules`.
534
556
  // Fetches the worker build id versioning sets for a task queue.
535
557
  rpc GetWorkerBuildIdCompatibility (GetWorkerBuildIdCompatibilityRequest) returns (GetWorkerBuildIdCompatibilityResponse) {
536
558
  option (google.api.http) = {
@@ -538,6 +560,22 @@ service WorkflowService {
538
560
  };
539
561
  }
540
562
 
563
+ // Allows updating the Build ID assignment and redirect rules for a given Task Queue.
564
+ // WARNING: Worker Versioning is not yet stable and the API and behavior may change incompatibly.
565
+ // (-- api-linter: core::0127::http-annotation=disabled
566
+ // aip.dev/not-precedent: We do yet expose versioning API to HTTP. --)
567
+ rpc UpdateWorkerVersioningRules (UpdateWorkerVersioningRulesRequest) returns (UpdateWorkerVersioningRulesResponse) {}
568
+
569
+ // Fetches the Build ID assignment and redirect rules for a Task Queue.
570
+ // WARNING: Worker Versioning is not yet stable and the API and behavior may change incompatibly.
571
+ rpc GetWorkerVersioningRules (GetWorkerVersioningRulesRequest) returns (GetWorkerVersioningRulesResponse) {
572
+ option (google.api.http) = {
573
+ get: "/api/v1/namespaces/{namespace}/task-queues/{task_queue}/worker-versioning-rules"
574
+ };
575
+ }
576
+
577
+ // Deprecated. Use `DescribeTaskQueue`.
578
+ //
541
579
  // Fetches task reachability to determine whether a worker may be retired.
542
580
  // The request may specify task queues to query for or let the server fetch all task queues mapped to the given
543
581
  // build IDs.
@@ -603,4 +641,22 @@ service WorkflowService {
603
641
  get: "/api/v1/namespaces/{namespace}/batch-operations"
604
642
  };
605
643
  }
644
+
645
+ // PollNexusTaskQueue is a long poll call used by workers to receive Nexus tasks.
646
+ // (-- api-linter: core::0127::http-annotation=disabled
647
+ // aip.dev/not-precedent: We do not expose worker API to HTTP. --)
648
+ rpc PollNexusTaskQueue(PollNexusTaskQueueRequest) returns (PollNexusTaskQueueResponse) {
649
+ }
650
+
651
+ // RespondNexusTaskCompleted is called by workers to respond to Nexus tasks received via PollNexusTaskQueue.
652
+ // (-- api-linter: core::0127::http-annotation=disabled
653
+ // aip.dev/not-precedent: We do not expose worker API to HTTP. --)
654
+ rpc RespondNexusTaskCompleted(RespondNexusTaskCompletedRequest) returns (RespondNexusTaskCompletedResponse) {
655
+ }
656
+
657
+ // RespondNexusTaskFailed is called by workers to fail Nexus tasks received via PollNexusTaskQueue.
658
+ // (-- api-linter: core::0127::http-annotation=disabled
659
+ // aip.dev/not-precedent: We do not expose worker API to HTTP. --)
660
+ rpc RespondNexusTaskFailed(RespondNexusTaskFailedRequest) returns (RespondNexusTaskFailedResponse) {
661
+ }
606
662
  }
@@ -30,6 +30,7 @@ import "temporal/sdk/core/common/common.proto";
30
30
  // * Signal and update handlers should be invoked before workflow routines are iterated. That is to
31
31
  // say before the users' main workflow function and anything spawned by it is allowed to continue.
32
32
  // * Queries always go last (and, in fact, always come in their own activation)
33
+ // * Evictions also always come in their own activation
33
34
  //
34
35
  // The downside of this reordering is that a signal or update handler may not observe that some
35
36
  // other event had already happened (ex: an activity completed) when it is first invoked, though it
@@ -41,11 +42,9 @@ import "temporal/sdk/core/common/common.proto";
41
42
  //
42
43
  // ## Evictions
43
44
  //
44
- // Activations that contain only a `remove_from_cache` job should not cause the workflow code
45
- // to be invoked and may be responded to with an empty command list. Eviction jobs may also
46
- // appear with other jobs, but will always appear last in the job list. In this case it is
47
- // expected that the workflow code will be invoked, and the response produced as normal, but
48
- // the caller should evict the run after doing so.
45
+ // Evictions appear as an activations that contains only a `remove_from_cache` job. Such activations
46
+ // should not cause the workflow code to be invoked and may be responded to with an empty command
47
+ // list.
49
48
  message WorkflowActivation {
50
49
  // The id of the currently active run of the workflow. Also used as a cache key. There may
51
50
  // only ever be one active workflow task (and hence activation) of a run at one time.
@@ -81,7 +80,8 @@ message WorkflowActivationJob {
81
80
  FireTimer fire_timer = 2;
82
81
  // Workflow was reset. The randomness seed must be updated.
83
82
  UpdateRandomSeed update_random_seed = 4;
84
- // A request to query the workflow was received.
83
+ // A request to query the workflow was received. It is guaranteed that queries (one or more)
84
+ // always come in their own activation after other mutating jobs.
85
85
  QueryWorkflow query_workflow = 5;
86
86
  // A request to cancel the workflow was received.
87
87
  CancelWorkflow cancel_workflow = 6;
@@ -103,11 +103,9 @@ message WorkflowActivationJob {
103
103
  ResolveRequestCancelExternalWorkflow resolve_request_cancel_external_workflow = 13;
104
104
  // A request to handle a workflow update.
105
105
  DoUpdate do_update = 14;
106
- // Remove the workflow identified by the [WorkflowActivation] containing this job from the cache
107
- // after performing the activation.
108
- //
109
- // If other job variant are present in the list, this variant will be the last job in the
110
- // job list. The string value is a reason for eviction.
106
+ // Remove the workflow identified by the [WorkflowActivation] containing this job from the
107
+ // cache after performing the activation. It is guaranteed that this will be the only job
108
+ // in the activation if present.
111
109
  RemoveFromCache remove_from_cache = 50;
112
110
  }
113
111
  }
@@ -208,7 +206,7 @@ message ResolveChildWorkflowExecutionStartFailure {
208
206
  // `failure` should be ChildWorkflowFailure with cause set to CancelledFailure.
209
207
  // The failure is constructed in core for lang's convenience.
210
208
  message ResolveChildWorkflowExecutionStartCancelled {
211
- temporal.api.failure.v1.Failure failure = 1;
209
+ temporal.api.failure.v1.Failure failure = 1;
212
210
  }
213
211
 
214
212
  // Notify a workflow that a child workflow execution has been resolved
@@ -598,7 +598,7 @@ impl TestHistoryBuilder {
598
598
  },
599
599
  )) = &evt.attributes
600
600
  {
601
- self.original_run_id = original_execution_run_id.clone();
601
+ self.original_run_id.clone_from(original_execution_run_id);
602
602
  };
603
603
  self.events.push(evt);
604
604
  self.current_event_id