@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.
Files changed (191) hide show
  1. package/Cargo.lock +902 -468
  2. package/package.json +3 -3
  3. package/releases/aarch64-apple-darwin/index.node +0 -0
  4. package/releases/aarch64-unknown-linux-gnu/index.node +0 -0
  5. package/releases/x86_64-apple-darwin/index.node +0 -0
  6. package/releases/x86_64-pc-windows-msvc/index.node +0 -0
  7. package/releases/x86_64-unknown-linux-gnu/index.node +0 -0
  8. package/sdk-core/.cargo/config.toml +5 -0
  9. package/sdk-core/.github/workflows/per-pr.yml +59 -5
  10. package/sdk-core/Cargo.toml +3 -2
  11. package/sdk-core/client/Cargo.toml +3 -3
  12. package/sdk-core/client/src/lib.rs +154 -161
  13. package/sdk-core/client/src/metrics.rs +15 -8
  14. package/sdk-core/client/src/proxy.rs +1 -1
  15. package/sdk-core/client/src/raw.rs +176 -33
  16. package/sdk-core/client/src/retry.rs +102 -465
  17. package/sdk-core/client/src/worker_registry/mod.rs +2 -2
  18. package/sdk-core/client/src/workflow_handle/mod.rs +19 -1
  19. package/sdk-core/core/Cargo.toml +12 -14
  20. package/sdk-core/core/benches/workflow_replay.rs +1 -1
  21. package/sdk-core/core/src/abstractions.rs +2 -2
  22. package/sdk-core/core/src/core_tests/activity_tasks.rs +99 -46
  23. package/sdk-core/core/src/core_tests/child_workflows.rs +68 -9
  24. package/sdk-core/core/src/core_tests/determinism.rs +2 -2
  25. package/sdk-core/core/src/core_tests/local_activities.rs +20 -33
  26. package/sdk-core/core/src/core_tests/mod.rs +7 -8
  27. package/sdk-core/core/src/core_tests/queries.rs +79 -79
  28. package/sdk-core/core/src/core_tests/replay_flag.rs +5 -5
  29. package/sdk-core/core/src/core_tests/updates.rs +6 -6
  30. package/sdk-core/core/src/core_tests/workers.rs +19 -22
  31. package/sdk-core/core/src/core_tests/workflow_cancels.rs +3 -3
  32. package/sdk-core/core/src/core_tests/workflow_tasks.rs +154 -106
  33. package/sdk-core/core/src/ephemeral_server/mod.rs +66 -10
  34. package/sdk-core/core/src/internal_flags.rs +103 -12
  35. package/sdk-core/core/src/lib.rs +21 -13
  36. package/sdk-core/core/src/pollers/mod.rs +200 -6
  37. package/sdk-core/core/src/pollers/poll_buffer.rs +32 -8
  38. package/sdk-core/core/src/protosext/mod.rs +7 -7
  39. package/sdk-core/core/src/protosext/protocol_messages.rs +2 -2
  40. package/sdk-core/core/src/replay/mod.rs +8 -9
  41. package/sdk-core/core/src/retry_logic.rs +8 -6
  42. package/sdk-core/core/src/telemetry/log_export.rs +4 -4
  43. package/sdk-core/core/src/telemetry/metrics.rs +111 -25
  44. package/sdk-core/core/src/telemetry/mod.rs +11 -4
  45. package/sdk-core/core/src/telemetry/otel.rs +108 -144
  46. package/sdk-core/core/src/telemetry/prometheus_server.rs +1 -4
  47. package/sdk-core/core/src/test_help/mod.rs +27 -21
  48. package/sdk-core/core/src/worker/activities/activity_heartbeat_manager.rs +7 -5
  49. package/sdk-core/core/src/worker/activities/local_activities.rs +9 -9
  50. package/sdk-core/core/src/worker/activities.rs +34 -46
  51. package/sdk-core/core/src/worker/client/mocks.rs +24 -2
  52. package/sdk-core/core/src/worker/client.rs +169 -33
  53. package/sdk-core/core/src/worker/mod.rs +132 -56
  54. package/sdk-core/core/src/worker/nexus.rs +410 -0
  55. package/sdk-core/core/src/worker/tuner/resource_based.rs +27 -5
  56. package/sdk-core/core/src/worker/tuner.rs +29 -2
  57. package/sdk-core/core/src/worker/workflow/driven_workflow.rs +8 -3
  58. package/sdk-core/core/src/worker/workflow/history_update.rs +5 -8
  59. package/sdk-core/core/src/worker/workflow/machines/activity_state_machine.rs +83 -87
  60. package/sdk-core/core/src/worker/workflow/machines/cancel_external_state_machine.rs +38 -38
  61. package/sdk-core/core/src/worker/workflow/machines/cancel_nexus_op_state_machine.rs +117 -0
  62. package/sdk-core/core/src/worker/workflow/machines/cancel_workflow_state_machine.rs +8 -18
  63. package/sdk-core/core/src/worker/workflow/machines/child_workflow_state_machine.rs +114 -108
  64. package/sdk-core/core/src/worker/workflow/machines/complete_workflow_state_machine.rs +16 -31
  65. package/sdk-core/core/src/worker/workflow/machines/continue_as_new_workflow_state_machine.rs +7 -14
  66. package/sdk-core/core/src/worker/workflow/machines/fail_workflow_state_machine.rs +8 -15
  67. package/sdk-core/core/src/worker/workflow/machines/local_activity_state_machine.rs +34 -75
  68. package/sdk-core/core/src/worker/workflow/machines/mod.rs +26 -48
  69. package/sdk-core/core/src/worker/workflow/machines/modify_workflow_properties_state_machine.rs +10 -17
  70. package/sdk-core/core/src/worker/workflow/machines/nexus_operation_state_machine.rs +543 -0
  71. package/sdk-core/core/src/worker/workflow/machines/patch_state_machine.rs +22 -31
  72. package/sdk-core/core/src/worker/workflow/machines/signal_external_state_machine.rs +53 -51
  73. package/sdk-core/core/src/worker/workflow/machines/timer_state_machine.rs +40 -45
  74. package/sdk-core/core/src/worker/workflow/machines/transition_coverage.rs +2 -2
  75. package/sdk-core/core/src/worker/workflow/machines/update_state_machine.rs +8 -10
  76. package/sdk-core/core/src/worker/workflow/machines/upsert_search_attributes_state_machine.rs +24 -30
  77. package/sdk-core/core/src/worker/workflow/machines/workflow_machines.rs +182 -116
  78. package/sdk-core/core/src/worker/workflow/machines/workflow_task_state_machine.rs +4 -8
  79. package/sdk-core/core/src/worker/workflow/managed_run.rs +75 -45
  80. package/sdk-core/core/src/worker/workflow/mod.rs +104 -55
  81. package/sdk-core/core/src/worker/workflow/run_cache.rs +23 -4
  82. package/sdk-core/core/src/worker/workflow/wft_extraction.rs +4 -4
  83. package/sdk-core/core/src/worker/workflow/wft_poller.rs +3 -3
  84. package/sdk-core/core/src/worker/workflow/workflow_stream.rs +32 -13
  85. package/sdk-core/core-api/Cargo.toml +2 -3
  86. package/sdk-core/core-api/src/errors.rs +22 -20
  87. package/sdk-core/core-api/src/lib.rs +24 -5
  88. package/sdk-core/core-api/src/telemetry/metrics.rs +27 -1
  89. package/sdk-core/core-api/src/telemetry.rs +37 -3
  90. package/sdk-core/core-api/src/worker.rs +36 -3
  91. package/sdk-core/docker/docker-compose-ci.yaml +25 -0
  92. package/sdk-core/etc/otel-collector-ci.yaml +36 -0
  93. package/sdk-core/etc/otel-collector-config.yaml +3 -3
  94. package/sdk-core/etc/prometheus.yaml +1 -1
  95. package/sdk-core/fsm/Cargo.toml +1 -1
  96. package/sdk-core/fsm/rustfsm_procmacro/Cargo.toml +1 -1
  97. package/sdk-core/fsm/rustfsm_procmacro/src/lib.rs +3 -4
  98. package/sdk-core/fsm/rustfsm_procmacro/tests/trybuild/no_handle_conversions_require_into_fail.stderr +1 -1
  99. package/sdk-core/fsm/rustfsm_trait/Cargo.toml +1 -1
  100. package/sdk-core/sdk/Cargo.toml +1 -2
  101. package/sdk-core/sdk/src/activity_context.rs +1 -1
  102. package/sdk-core/sdk/src/interceptors.rs +1 -1
  103. package/sdk-core/sdk/src/lib.rs +126 -54
  104. package/sdk-core/sdk/src/workflow_context/options.rs +184 -74
  105. package/sdk-core/sdk/src/workflow_context.rs +193 -79
  106. package/sdk-core/sdk/src/workflow_future.rs +151 -131
  107. package/sdk-core/sdk-core-protos/Cargo.toml +3 -4
  108. package/sdk-core/sdk-core-protos/protos/api_cloud_upstream/VERSION +1 -1
  109. package/sdk-core/sdk-core-protos/protos/api_cloud_upstream/temporal/api/cloud/account/v1/message.proto +46 -0
  110. package/sdk-core/sdk-core-protos/protos/api_cloud_upstream/temporal/api/cloud/cloudservice/v1/request_response.proto +254 -5
  111. package/sdk-core/sdk-core-protos/protos/api_cloud_upstream/temporal/api/cloud/cloudservice/v1/service.proto +108 -2
  112. package/sdk-core/sdk-core-protos/protos/api_cloud_upstream/temporal/api/cloud/identity/v1/message.proto +94 -15
  113. package/sdk-core/sdk-core-protos/protos/api_cloud_upstream/temporal/api/cloud/namespace/v1/message.proto +102 -4
  114. package/sdk-core/sdk-core-protos/protos/api_cloud_upstream/temporal/api/cloud/nexus/v1/message.proto +84 -0
  115. package/sdk-core/sdk-core-protos/protos/api_cloud_upstream/temporal/api/cloud/operation/v1/message.proto +25 -10
  116. package/sdk-core/sdk-core-protos/protos/api_cloud_upstream/temporal/api/cloud/region/v1/message.proto +14 -1
  117. package/sdk-core/sdk-core-protos/protos/api_cloud_upstream/temporal/api/cloud/resource/v1/message.proto +25 -0
  118. package/sdk-core/sdk-core-protos/protos/api_cloud_upstream/temporal/api/cloud/sink/v1/message.proto +41 -0
  119. package/sdk-core/sdk-core-protos/protos/api_cloud_upstream/temporal/api/cloud/usage/v1/message.proto +59 -0
  120. package/sdk-core/sdk-core-protos/protos/api_upstream/.github/PULL_REQUEST_TEMPLATE.md +2 -0
  121. package/sdk-core/sdk-core-protos/protos/api_upstream/.github/workflows/create-release.yml +135 -0
  122. package/sdk-core/sdk-core-protos/protos/api_upstream/.github/workflows/push-to-buf.yml +20 -0
  123. package/sdk-core/sdk-core-protos/protos/api_upstream/.github/workflows/trigger-api-go-delete-release.yml +13 -0
  124. package/sdk-core/sdk-core-protos/protos/api_upstream/.github/workflows/trigger-api-go-publish-release.yml +13 -0
  125. package/sdk-core/sdk-core-protos/protos/api_upstream/.github/workflows/trigger-api-go-update.yml +13 -21
  126. package/sdk-core/sdk-core-protos/protos/api_upstream/Makefile +2 -2
  127. package/sdk-core/sdk-core-protos/protos/api_upstream/buf.yaml +1 -0
  128. package/sdk-core/sdk-core-protos/protos/api_upstream/openapi/openapiv2.json +3386 -1047
  129. package/sdk-core/sdk-core-protos/protos/api_upstream/openapi/openapiv3.yaml +3529 -1144
  130. package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/batch/v1/message.proto +39 -1
  131. package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/command/v1/message.proto +6 -0
  132. package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/common/v1/message.proto +39 -1
  133. package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/deployment/v1/message.proto +252 -0
  134. package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/enums/v1/batch_operation.proto +1 -0
  135. package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/enums/v1/common.proto +6 -0
  136. package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/enums/v1/deployment.proto +96 -0
  137. package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/enums/v1/event_type.proto +2 -0
  138. package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/enums/v1/failed_cause.proto +2 -0
  139. package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/enums/v1/nexus.proto +42 -0
  140. package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/enums/v1/reset.proto +2 -0
  141. package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/enums/v1/workflow.proto +43 -2
  142. package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/errordetails/v1/message.proto +13 -1
  143. package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/failure/v1/message.proto +14 -0
  144. package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/history/v1/message.proto +70 -12
  145. package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/nexus/v1/message.proto +12 -0
  146. package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/query/v1/message.proto +9 -2
  147. package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/taskqueue/v1/message.proto +46 -2
  148. package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/workflow/v1/message.proto +206 -0
  149. package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/workflowservice/v1/request_response.proto +482 -97
  150. package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/workflowservice/v1/service.proto +230 -43
  151. package/sdk-core/sdk-core-protos/protos/local/temporal/sdk/core/core_interface.proto +6 -0
  152. package/sdk-core/sdk-core-protos/protos/local/temporal/sdk/core/nexus/nexus.proto +71 -0
  153. package/sdk-core/sdk-core-protos/protos/local/temporal/sdk/core/workflow_activation/workflow_activation.proto +46 -2
  154. package/sdk-core/sdk-core-protos/protos/local/temporal/sdk/core/workflow_commands/workflow_commands.proto +55 -9
  155. package/sdk-core/sdk-core-protos/src/history_builder.rs +5 -5
  156. package/sdk-core/sdk-core-protos/src/history_info.rs +5 -6
  157. package/sdk-core/sdk-core-protos/src/lib.rs +414 -34
  158. package/sdk-core/sdk-core-protos/src/task_token.rs +1 -1
  159. package/sdk-core/test-utils/Cargo.toml +3 -11
  160. package/sdk-core/test-utils/src/canned_histories.rs +1 -1
  161. package/sdk-core/test-utils/src/lib.rs +159 -85
  162. package/sdk-core/tests/fuzzy_workflow.rs +3 -3
  163. package/sdk-core/tests/heavy_tests.rs +3 -3
  164. package/sdk-core/tests/integ_tests/client_tests.rs +171 -20
  165. package/sdk-core/tests/integ_tests/ephemeral_server_tests.rs +45 -39
  166. package/sdk-core/tests/integ_tests/heartbeat_tests.rs +7 -6
  167. package/sdk-core/tests/integ_tests/metrics_tests.rs +492 -35
  168. package/sdk-core/tests/integ_tests/polling_tests.rs +7 -5
  169. package/sdk-core/tests/integ_tests/queries_tests.rs +14 -17
  170. package/sdk-core/tests/integ_tests/update_tests.rs +47 -44
  171. package/sdk-core/tests/integ_tests/visibility_tests.rs +4 -3
  172. package/sdk-core/tests/integ_tests/worker_tests.rs +5 -5
  173. package/sdk-core/tests/integ_tests/workflow_tests/activities.rs +15 -13
  174. package/sdk-core/tests/integ_tests/workflow_tests/cancel_external.rs +28 -14
  175. package/sdk-core/tests/integ_tests/workflow_tests/cancel_wf.rs +7 -1
  176. package/sdk-core/tests/integ_tests/workflow_tests/child_workflows.rs +57 -4
  177. package/sdk-core/tests/integ_tests/workflow_tests/eager.rs +1 -1
  178. package/sdk-core/tests/integ_tests/workflow_tests/local_activities.rs +24 -18
  179. package/sdk-core/tests/integ_tests/workflow_tests/nexus.rs +506 -0
  180. package/sdk-core/tests/integ_tests/workflow_tests/patches.rs +1 -1
  181. package/sdk-core/tests/integ_tests/workflow_tests/priority.rs +104 -0
  182. package/sdk-core/tests/integ_tests/workflow_tests/replay.rs +34 -31
  183. package/sdk-core/tests/integ_tests/workflow_tests/resets.rs +1 -1
  184. package/sdk-core/tests/integ_tests/workflow_tests/timers.rs +10 -7
  185. package/sdk-core/tests/integ_tests/workflow_tests.rs +152 -116
  186. package/sdk-core/tests/main.rs +36 -6
  187. package/sdk-core/tests/runner.rs +30 -9
  188. package/src/conversions/slot_supplier_bridge.rs +4 -0
  189. package/src/conversions.rs +1 -0
  190. package/src/worker.rs +5 -7
  191. package/sdk-core/core/src/worker/activities/activity_task_poller_stream.rs +0 -78
@@ -31,11 +31,13 @@ option java_outer_classname = "MessageProto";
31
31
  option ruby_package = "Temporalio::Api::Batch::V1";
32
32
  option csharp_namespace = "Temporalio.Api.Batch.V1";
33
33
 
34
+ import "google/protobuf/duration.proto";
35
+ import "google/protobuf/field_mask.proto";
34
36
  import "google/protobuf/timestamp.proto";
35
-
36
37
  import "temporal/api/common/v1/message.proto";
37
38
  import "temporal/api/enums/v1/batch_operation.proto";
38
39
  import "temporal/api/enums/v1/reset.proto";
40
+ import "temporal/api/workflow/v1/message.proto";
39
41
 
40
42
  message BatchOperationInfo {
41
43
  // Batch job ID
@@ -102,3 +104,39 @@ message BatchOperationReset {
102
104
  temporal.api.enums.v1.ResetReapplyType reset_reapply_type = 2;
103
105
 
104
106
  }
107
+
108
+ // BatchOperationUpdateWorkflowExecutionOptions sends UpdateWorkflowExecutionOptions requests to batch workflows.
109
+ // Keep the parameters in sync with temporal.api.workflowservice.v1.UpdateWorkflowExecutionOptionsRequest.
110
+ message BatchOperationUpdateWorkflowExecutionOptions {
111
+ // The identity of the worker/client.
112
+ string identity = 1;
113
+
114
+ // Workflow Execution options. Partial updates are accepted and controlled by update_mask.
115
+ temporal.api.workflow.v1.WorkflowExecutionOptions workflow_execution_options = 2;
116
+
117
+ // Controls which fields from `workflow_execution_options` will be applied.
118
+ // To unset a field, set it to null and use the update mask to indicate that it should be mutated.
119
+ google.protobuf.FieldMask update_mask = 3;
120
+ }
121
+
122
+ // BatchOperationUnpauseActivities sends unpause requests to batch workflows.
123
+ message BatchOperationUnpauseActivities {
124
+ // The identity of the worker/client.
125
+ string identity = 1;
126
+
127
+ // The activity to unpause. If match_all is set to true, all activities will be unpaused.
128
+ oneof activity {
129
+ string type = 2;
130
+ bool match_all = 3;
131
+ }
132
+
133
+ // Providing this flag will also reset the number of attempts.
134
+ bool reset_attempts = 4;
135
+
136
+ // Providing this flag will also reset the heartbeat details.
137
+ bool reset_heartbeat = 5;
138
+
139
+ // If set, the activity will start at a random time within the specified jitter
140
+ // duration, introducing variability to the start time.
141
+ google.protobuf.Duration jitter = 6;
142
+ }
@@ -85,6 +85,9 @@ message ScheduleActivityTaskCommandAttributes {
85
85
  // If this is set, the activity would be assigned to the Build ID of the workflow. Otherwise,
86
86
  // Assignment rules of the activity's Task Queue will be used to determine the Build ID.
87
87
  bool use_workflow_build_id = 13;
88
+ // Priority metadata. If this message is not present, or any fields are not
89
+ // present, they inherit the values from the workflow.
90
+ temporal.api.common.v1.Priority priority = 14;
88
91
  }
89
92
 
90
93
  message RequestCancelActivityTaskCommandAttributes {
@@ -226,6 +229,9 @@ message StartChildWorkflowExecutionCommandAttributes {
226
229
  // If this is set, the child workflow inherits the Build ID of the parent. Otherwise, the assignment
227
230
  // rules of the child's Task Queue will be used to independently assign a Build ID to it.
228
231
  bool inherit_build_id = 17;
232
+ // Priority metadata. If this message is not present, or any fields are not
233
+ // present, they inherit the values from the workflow.
234
+ temporal.api.common.v1.Priority priority = 18;
229
235
  }
230
236
 
231
237
  message ProtocolMessageCommandAttributes {
@@ -123,6 +123,7 @@ message MeteringMetadata {
123
123
  uint32 nonfirst_local_activity_execution_attempts = 13;
124
124
  }
125
125
 
126
+ // Deprecated. This message is replaced with `Deployment` and `VersioningBehavior`.
126
127
  // Identifies the version(s) of a worker that processed a task
127
128
  message WorkerVersionStamp {
128
129
  // An opaque whole-worker identifier. Replaces the deprecated `binary_checksum` field when this
@@ -136,9 +137,10 @@ message WorkerVersionStamp {
136
137
  // Later, may include bundle id that could be used for WASM and/or JS dynamically loadable bundles.
137
138
  }
138
139
 
139
- // Identifies the version(s) that a worker is compatible with when polling or identifying itself,
140
+ // Identifies the version that a worker is compatible with when polling or identifying itself,
140
141
  // and whether or not this worker is opting into the build-id based versioning feature. This is
141
142
  // used by matching to determine which workers ought to receive what tasks.
143
+ // Deprecated. Use WorkerDeploymentOptions instead.
142
144
  message WorkerVersionCapabilities {
143
145
  // An opaque whole-worker identifier
144
146
  string build_id = 1;
@@ -147,6 +149,9 @@ message WorkerVersionCapabilities {
147
149
  // tasks.
148
150
  bool use_versioning = 2;
149
151
 
152
+ // Must be sent if user has set a deployment series name (versioning-3).
153
+ string deployment_series_name = 4;
154
+
150
155
  // Later, may include info like "I can process WASM and/or JS bundles"
151
156
  }
152
157
 
@@ -242,3 +247,36 @@ message Link {
242
247
  BatchJob batch_job = 2;
243
248
  }
244
249
  }
250
+
251
+ // Priority contains metadata that controls relative ordering of task processing
252
+ // when tasks are backlogged in a queue. Initially, Priority will be used in
253
+ // activity and workflow task queues, which are typically where backlogs exist.
254
+ // Other queues in the server (such as transfer and timer queues) and rate
255
+ // limiting decisions do not use Priority, but may in the future.
256
+ //
257
+ // Priority is attached to workflows and activities. Activities and child
258
+ // workflows inherit Priority from the workflow that created them, but may
259
+ // override fields when they are started or modified. For each field of a
260
+ // Priority on an activity/workflow, not present or equal to zero/empty string
261
+ // means to inherit the value from the calling workflow, or if there is no
262
+ // calling workflow, then use the default (documented below).
263
+ //
264
+ // Despite being named "Priority", this message will also contains fields that
265
+ // control "fairness" mechanisms.
266
+ //
267
+ // The overall semantics of Priority are:
268
+ // 1. First, consider "priority_key": lower number goes first.
269
+ // (more will be added here later)
270
+ message Priority {
271
+ // Priority key is a positive integer from 1 to n, where smaller integers
272
+ // correspond to higher priorities (tasks run sooner). In general, tasks in
273
+ // a queue should be processed in close to priority order, although small
274
+ // deviations are possible.
275
+ //
276
+ // The maximum priority value (minimum priority) is determined by server
277
+ // configuration, and defaults to 5.
278
+ //
279
+ // The default priority is (min+max)/2. With the default max of 5 and min of
280
+ // 1, that comes out to 3.
281
+ int32 priority_key = 1;
282
+ }
@@ -0,0 +1,252 @@
1
+ // The MIT License
2
+ //
3
+ // Copyright (c) 2020 Temporal Technologies Inc. All rights reserved.
4
+ //
5
+ // Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ // of this software and associated documentation files (the "Software"), to deal
7
+ // in the Software without restriction, including without limitation the rights
8
+ // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ // copies of the Software, and to permit persons to whom the Software is
10
+ // furnished to do so, subject to the following conditions:
11
+ //
12
+ // The above copyright notice and this permission notice shall be included in
13
+ // all copies or substantial portions of the Software.
14
+ //
15
+ // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ // THE SOFTWARE.
22
+
23
+ syntax = "proto3";
24
+
25
+ package temporal.api.deployment.v1;
26
+
27
+ option go_package = "go.temporal.io/api/deployment/v1;deployment";
28
+ option java_package = "io.temporal.api.deployment.v1";
29
+ option java_multiple_files = true;
30
+ option java_outer_classname = "MessageProto";
31
+ option ruby_package = "Temporalio::Api::Deployment::V1";
32
+ option csharp_namespace = "Temporalio.Api.Deployment.V1";
33
+
34
+ import "google/protobuf/timestamp.proto";
35
+
36
+ import "temporal/api/enums/v1/deployment.proto";
37
+ import "temporal/api/enums/v1/task_queue.proto";
38
+ import "temporal/api/common/v1/message.proto";
39
+
40
+ // Worker Deployment options set in SDK that need to be sent to server in every poll.
41
+ // Experimental. Worker Deployments are experimental and might significantly change in the future.
42
+ message WorkerDeploymentOptions {
43
+ // Required. Worker Deployment name.
44
+ string deployment_name = 1;
45
+ // The Build ID of the worker. Required when `worker_versioning_mode==VERSIONED`, in which case,
46
+ // the worker will be part of a Deployment Version identified by "<deployment_name>.<build_id>".
47
+ string build_id = 2;
48
+ // Required. Versioning Mode for this worker. Must be the same for all workers with the
49
+ // same `deployment_name` and `build_id` combination, across all Task Queues.
50
+ // When `worker_versioning_mode==VERSIONED`, the worker will be part of a Deployment Version
51
+ // identified by "<deployment_name>.<build_id>".
52
+ temporal.api.enums.v1.WorkerVersioningMode worker_versioning_mode = 3;
53
+ }
54
+
55
+ // `Deployment` identifies a deployment of Temporal workers. The combination of deployment series
56
+ // name + build ID serves as the identifier. User can use `WorkerDeploymentOptions` in their worker
57
+ // programs to specify these values.
58
+ // Deprecated.
59
+ message Deployment {
60
+ // Different versions of the same worker service/application are related together by having a
61
+ // shared series name.
62
+ // Out of all deployments of a series, one can be designated as the current deployment, which
63
+ // receives new workflow executions and new tasks of workflows with
64
+ // `VERSIONING_BEHAVIOR_AUTO_UPGRADE` versioning behavior.
65
+ string series_name = 1;
66
+ // Build ID changes with each version of the worker when the worker program code and/or config
67
+ // changes.
68
+ string build_id = 2;
69
+ }
70
+
71
+ // `DeploymentInfo` holds information about a deployment. Deployment information is tracked
72
+ // automatically by server as soon as the first poll from that deployment reaches the server. There
73
+ // can be multiple task queue workers in a single deployment which are listed in this message.
74
+ // Deprecated.
75
+ message DeploymentInfo {
76
+ Deployment deployment = 1;
77
+ google.protobuf.Timestamp create_time = 2;
78
+ repeated TaskQueueInfo task_queue_infos = 3;
79
+ // A user-defined set of key-values. Can be updated as part of write operations to the
80
+ // deployment, such as `SetCurrentDeployment`.
81
+ map<string, temporal.api.common.v1.Payload> metadata = 4;
82
+ // If this deployment is the current deployment of its deployment series.
83
+ bool is_current = 5;
84
+
85
+ message TaskQueueInfo {
86
+ string name = 1;
87
+ temporal.api.enums.v1.TaskQueueType type = 2;
88
+ // When server saw the first poller for this task queue in this deployment.
89
+ google.protobuf.Timestamp first_poller_time = 3;
90
+ }
91
+ }
92
+
93
+ // Used as part of Deployment write APIs to update metadata attached to a deployment.
94
+ // Deprecated.
95
+ message UpdateDeploymentMetadata {
96
+ map<string, temporal.api.common.v1.Payload> upsert_entries = 1;
97
+ // List of keys to remove from the metadata.
98
+ repeated string remove_entries = 2;
99
+ }
100
+
101
+ // DeploymentListInfo is an abbreviated set of fields from DeploymentInfo that's returned in
102
+ // ListDeployments.
103
+ // Deprecated.
104
+ message DeploymentListInfo {
105
+ deployment.v1.Deployment deployment = 1;
106
+ google.protobuf.Timestamp create_time = 2;
107
+ // If this deployment is the current deployment of its deployment series.
108
+ bool is_current = 3;
109
+ }
110
+
111
+
112
+ // A Worker Deployment Version (Version, for short) represents all workers of the same
113
+ // code and config within a Deployment. Workers of the same Version are expected to
114
+ // behave exactly the same so when executions move between them there are no
115
+ // non-determinism issues.
116
+ // Worker Deployment Versions are created in Temporal server automatically when
117
+ // their first poller arrives to the server.
118
+ // Experimental. Worker Deployments are experimental and might significantly change in the future.
119
+ message WorkerDeploymentVersionInfo {
120
+ // The fully-qualified string representation of the version, in the form "<deployment_name>.<build_id>".
121
+ string version = 1;
122
+ string deployment_name = 2;
123
+ google.protobuf.Timestamp create_time = 3;
124
+
125
+ // Last time `current_since_time`, `ramping_since_time, or `ramp_percentage` of this version changed.
126
+ google.protobuf.Timestamp routing_changed_time = 4;
127
+
128
+ // (-- api-linter: core::0140::prepositions=disabled
129
+ // aip.dev/not-precedent: 'Since' captures the field semantics despite being a preposition. --)
130
+ // Nil if not current.
131
+ google.protobuf.Timestamp current_since_time = 5;
132
+
133
+ // (-- api-linter: core::0140::prepositions=disabled
134
+ // aip.dev/not-precedent: 'Since' captures the field semantics despite being a preposition. --)
135
+ // Nil if not ramping. Updated when the version first starts ramping, not on each ramp change.
136
+ google.protobuf.Timestamp ramping_since_time = 6;
137
+
138
+ // Range: [0, 100]. Must be zero if the version is not ramping (i.e. `ramping_since_time` is nil).
139
+ // Can be in the range [0, 100] if the version is ramping.
140
+ float ramp_percentage = 7;
141
+
142
+ // All the Task Queues that have ever polled from this Deployment version.
143
+ repeated VersionTaskQueueInfo task_queue_infos = 8;
144
+ message VersionTaskQueueInfo {
145
+ string name = 1;
146
+ temporal.api.enums.v1.TaskQueueType type = 2;
147
+ }
148
+
149
+ // Helps user determine when it is safe to decommission the workers of this
150
+ // Version. Not present when version is current or ramping.
151
+ // Current limitations:
152
+ // - Not supported for Unversioned mode.
153
+ // - Periodically refreshed, may have delays up to few minutes (consult the
154
+ // last_checked_time value).
155
+ // - Refreshed only when version is not current or ramping AND the status is not
156
+ // "drained" yet.
157
+ // - Once the status is changed to "drained", it is not changed until the Version
158
+ // becomes Current or Ramping again, at which time the drainage info is cleared.
159
+ // This means if the Version is "drained" but new workflows are sent to it via
160
+ // Pinned Versioning Override, the status does not account for those Pinned-override
161
+ // executions and remains "drained".
162
+ VersionDrainageInfo drainage_info = 9;
163
+
164
+ // Arbitrary user-provided metadata attached to this version.
165
+ VersionMetadata metadata = 10;
166
+ }
167
+
168
+ // Information about workflow drainage to help the user determine when it is safe
169
+ // to decommission a Version. Not present while version is current or ramping.
170
+ // Experimental. Worker Deployments are experimental and might significantly change in the future.
171
+ message VersionDrainageInfo {
172
+ // Set to DRAINING when the version first stops accepting new executions (is no longer current or ramping).
173
+ // Set to DRAINED when no more open pinned workflows exist on this version.
174
+ enums.v1.VersionDrainageStatus status = 1;
175
+ // Last time the drainage status changed.
176
+ google.protobuf.Timestamp last_changed_time = 2;
177
+ // Last time the system checked for drainage of this version.
178
+ google.protobuf.Timestamp last_checked_time = 3;
179
+ }
180
+
181
+ // A Worker Deployment (Deployment, for short) represents all workers serving
182
+ // a shared set of Task Queues. Typically, a Deployment represents one service or
183
+ // application.
184
+ // A Deployment contains multiple Deployment Versions, each representing a different
185
+ // version of workers. (see documentation of WorkerDeploymentVersionInfo)
186
+ // Deployment records are created in Temporal server automatically when their
187
+ // first poller arrives to the server.
188
+ // Experimental. Worker Deployments are experimental and might significantly change in the future.
189
+ message WorkerDeploymentInfo {
190
+ // Identifies a Worker Deployment. Must be unique within the namespace.
191
+ string name = 1;
192
+
193
+ // Deployment Versions that are currently tracked in this Deployment. A DeploymentVersion will be
194
+ // cleaned up automatically if all the following conditions meet:
195
+ // - It does not receive new executions (is not current or ramping)
196
+ // - It has no active pollers (see WorkerDeploymentVersionInfo.pollers_status)
197
+ // - It is drained (see WorkerDeploymentVersionInfo.drainage_status)
198
+ repeated WorkerDeploymentVersionSummary version_summaries = 2;
199
+
200
+ google.protobuf.Timestamp create_time = 3;
201
+
202
+ RoutingConfig routing_config = 4;
203
+
204
+ // Identity of the last client who modified the configuration of this Deployment. Set to the
205
+ // `identity` value sent by APIs such as `SetWorkerDeploymentCurrentVersion` and
206
+ // `SetWorkerDeploymentRampingVersion`.
207
+ string last_modifier_identity = 5;
208
+
209
+ message WorkerDeploymentVersionSummary {
210
+ // The fully-qualified string representation of the version, in the form "<deployment_name>.<build_id>".
211
+ string version = 1;
212
+ google.protobuf.Timestamp create_time = 2;
213
+ enums.v1.VersionDrainageStatus drainage_status = 3;
214
+ }
215
+ }
216
+
217
+ message VersionMetadata {
218
+ // Arbitrary key-values.
219
+ map<string, temporal.api.common.v1.Payload> entries = 1;
220
+ }
221
+
222
+ message RoutingConfig {
223
+ // Always present. Specifies which Deployment Version should should receive new workflow
224
+ // executions and tasks of existing unversioned or AutoUpgrade workflows.
225
+ // Can be one of the following:
226
+ // - A Deployment Version identifier in the form "<deployment_name>.<build_id>".
227
+ // - Or, the "__unversioned__" special value, to represent all the unversioned workers (those
228
+ // with `UNVERSIONED` (or unspecified) `WorkerVersioningMode`.)
229
+ // Note: Current Version is overridden by the Ramping Version for a portion of traffic when a ramp
230
+ // is set (see `ramping_version`.)
231
+ string current_version = 1;
232
+ // When present, it means the traffic is being shifted from the Current Version to the Ramping
233
+ // Version.
234
+ // Must always be different from Current Version. Can be one of the following:
235
+ // - A Deployment Version identifier in the form "<deployment_name>.<build_id>".
236
+ // - Or, the "__unversioned__" special value, to represent all the unversioned workers (those
237
+ // with `UNVERSIONED` (or unspecified) `WorkerVersioningMode`.)
238
+ // Note that it is possible to ramp from one Version to another Version, or from unversioned
239
+ // workers to a particular Version, or from a particular Version to unversioned workers.
240
+ string ramping_version = 2;
241
+ // Percentage of tasks that are routed to the Ramping Version instead of the Current Version.
242
+ // Valid range: [0, 100]. A 100% value means the Ramping Version is receiving full traffic but
243
+ // not yet "promoted" to be the Current Version, likely due to pending validations.
244
+ float ramping_version_percentage = 3;
245
+ // Last time current version was changed.
246
+ google.protobuf.Timestamp current_version_changed_time = 4;
247
+ // Last time ramping version was changed. Not updated if only the ramp percentage changes.
248
+ google.protobuf.Timestamp ramping_version_changed_time = 5;
249
+ // Last time ramping version percentage was changed.
250
+ // If ramping version is changed, this is also updated, even if the percentage stays the same.
251
+ google.protobuf.Timestamp ramping_version_percentage_changed_time = 6;
252
+ }
@@ -38,6 +38,7 @@ enum BatchOperationType {
38
38
  BATCH_OPERATION_TYPE_SIGNAL = 3;
39
39
  BATCH_OPERATION_TYPE_DELETE = 4;
40
40
  BATCH_OPERATION_TYPE_RESET = 5;
41
+ BATCH_OPERATION_TYPE_UPDATE_EXECUTION_OPTIONS = 6;
41
42
  }
42
43
 
43
44
  enum BatchOperationState {
@@ -69,6 +69,8 @@ enum CallbackState {
69
69
  CALLBACK_STATE_FAILED = 4;
70
70
  // Callback has succeeded.
71
71
  CALLBACK_STATE_SUCCEEDED = 5;
72
+ // Callback is blocked (eg: by circuit breaker).
73
+ CALLBACK_STATE_BLOCKED = 6;
72
74
  }
73
75
 
74
76
  // State of a pending Nexus operation.
@@ -81,6 +83,8 @@ enum PendingNexusOperationState {
81
83
  PENDING_NEXUS_OPERATION_STATE_BACKING_OFF = 2;
82
84
  // Operation was started and will complete asynchronously.
83
85
  PENDING_NEXUS_OPERATION_STATE_STARTED = 3;
86
+ // Operation is blocked (eg: by circuit breaker).
87
+ PENDING_NEXUS_OPERATION_STATE_BLOCKED = 4;
84
88
  }
85
89
 
86
90
  // State of a Nexus operation cancellation.
@@ -97,4 +101,6 @@ enum NexusOperationCancellationState {
97
101
  NEXUS_OPERATION_CANCELLATION_STATE_FAILED = 4;
98
102
  // The associated operation timed out - exceeded the user supplied schedule-to-close timeout.
99
103
  NEXUS_OPERATION_CANCELLATION_STATE_TIMED_OUT = 5;
104
+ // Cancellation request is blocked (eg: by circuit breaker).
105
+ NEXUS_OPERATION_CANCELLATION_STATE_BLOCKED = 6;
100
106
  }
@@ -0,0 +1,96 @@
1
+ // The MIT License
2
+ //
3
+ // Copyright (c) 2020 Temporal Technologies Inc. All rights reserved.
4
+ //
5
+ // Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ // of this software and associated documentation files (the "Software"), to deal
7
+ // in the Software without restriction, including without limitation the rights
8
+ // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ // copies of the Software, and to permit persons to whom the Software is
10
+ // furnished to do so, subject to the following conditions:
11
+ //
12
+ // The above copyright notice and this permission notice shall be included in
13
+ // all copies or substantial portions of the Software.
14
+ //
15
+ // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ // THE SOFTWARE.
22
+
23
+ syntax = "proto3";
24
+
25
+ package temporal.api.enums.v1;
26
+
27
+ option go_package = "go.temporal.io/api/enums/v1;enums";
28
+ option java_package = "io.temporal.api.enums.v1";
29
+ option java_multiple_files = true;
30
+ option java_outer_classname = "DeploymentProto";
31
+ option ruby_package = "Temporalio::Api::Enums::V1";
32
+ option csharp_namespace = "Temporalio.Api.Enums.V1";
33
+
34
+ // Specify the reachability level for a deployment so users can decide if it is time to
35
+ // decommission the deployment.
36
+ enum DeploymentReachability {
37
+ // Reachability level is not specified.
38
+ DEPLOYMENT_REACHABILITY_UNSPECIFIED = 0;
39
+ // The deployment is reachable by new and/or open workflows. The deployment cannot be
40
+ // decommissioned safely.
41
+ DEPLOYMENT_REACHABILITY_REACHABLE = 1;
42
+ // The deployment is not reachable by new or open workflows, but might be still needed by
43
+ // Queries sent to closed workflows. The deployment can be decommissioned safely if user does
44
+ // not query closed workflows.
45
+ DEPLOYMENT_REACHABILITY_CLOSED_WORKFLOWS_ONLY = 2;
46
+ // The deployment is not reachable by any workflow because all the workflows who needed this
47
+ // deployment went out of retention period. The deployment can be decommissioned safely.
48
+ DEPLOYMENT_REACHABILITY_UNREACHABLE = 3;
49
+ }
50
+
51
+ // (-- api-linter: core::0216::synonyms=disabled
52
+ // aip.dev/not-precedent: Call this status because it is . --)
53
+ // Specify the drainage status for a Worker Deployment Version so users can decide whether they
54
+ // can safely decommission the version.
55
+ // Experimental. Worker Deployments are experimental and might significantly change in the future.
56
+ enum VersionDrainageStatus {
57
+ // Drainage Status is not specified.
58
+ VERSION_DRAINAGE_STATUS_UNSPECIFIED = 0;
59
+ // The Worker Deployment Version is not used by new workflows but is still used by
60
+ // open pinned workflows. The version cannot be decommissioned safely.
61
+ VERSION_DRAINAGE_STATUS_DRAINING = 1;
62
+ // The Worker Deployment Version is not used by new or open workflows, but might be still needed by
63
+ // Queries sent to closed workflows. The version can be decommissioned safely if user does
64
+ // not query closed workflows. If the user does query closed workflows for some time x after
65
+ // workflows are closed, they should decommission the version after it has been drained for that duration.
66
+ VERSION_DRAINAGE_STATUS_DRAINED = 2;
67
+ }
68
+
69
+ // Versioning Mode of a worker is set by the app developer in the worker code, and specifies the
70
+ // behavior of the system in the following related aspects:
71
+ // - Whether or not Temporal Server considers this worker's version (Build ID) when dispatching
72
+ // tasks to it.
73
+ // - Whether or not the workflows processed by this worker are versioned using the worker's version.
74
+ // Experimental. Worker Deployments are experimental and might significantly change in the future.
75
+ enum WorkerVersioningMode {
76
+ WORKER_VERSIONING_MODE_UNSPECIFIED = 0;
77
+ // Workers with this mode are not distinguished from each other for task routing, even if they
78
+ // have different Build IDs.
79
+ // Workflows processed by this worker will be unversioned and user needs to use Patching to keep
80
+ // the new code compatible with prior versions.
81
+ // This mode is recommended to be used along with Rolling Upgrade deployment strategies.
82
+ // Workers with this mode are represented by the special string `__unversioned__` in the APIs.
83
+ WORKER_VERSIONING_MODE_UNVERSIONED = 1;
84
+ // Workers with this mode are part of a Worker Deployment Version which is identified as
85
+ // "<deployment_name>.<build_id>". Such workers are called "versioned" as opposed to
86
+ // "unversioned".
87
+ // Each Deployment Version is distinguished from other Versions for task routing and users can
88
+ // configure Temporal Server to send tasks to a particular Version (see
89
+ // `WorkerDeploymentInfo.routing_config`). This mode is the best option for Blue/Green and
90
+ // Rainbow strategies (but typically not suitable for Rolling upgrades.)
91
+ // Workflow Versioning Behaviors are enabled in this mode: each workflow type must choose
92
+ // between the Pinned and AutoUpgrade behaviors. Depending on the chosen behavior, the user may
93
+ // or may not need to use Patching to keep the new code compatible with prior versions. (see
94
+ // VersioningBehavior enum.)
95
+ WORKER_VERSIONING_MODE_VERSIONED = 2;
96
+ }
@@ -185,4 +185,6 @@ enum EventType {
185
185
  EVENT_TYPE_NEXUS_OPERATION_TIMED_OUT = 53;
186
186
  // A Nexus operation was requested to be canceled using a RequestCancelNexusOperation command.
187
187
  EVENT_TYPE_NEXUS_OPERATION_CANCEL_REQUESTED = 54;
188
+ // Workflow execution options updated by user.
189
+ EVENT_TYPE_WORKFLOW_EXECUTION_OPTIONS_UPDATED = 55;
188
190
  }
@@ -141,6 +141,8 @@ enum ResourceExhaustedCause {
141
141
  RESOURCE_EXHAUSTED_CAUSE_PERSISTENCE_STORAGE_LIMIT = 7;
142
142
  // Circuit breaker is open/half-open.
143
143
  RESOURCE_EXHAUSTED_CAUSE_CIRCUIT_BREAKER_OPEN = 8;
144
+ // Namespace exceeds operations rate limit.
145
+ RESOURCE_EXHAUSTED_CAUSE_OPS_LIMIT = 9;
144
146
  }
145
147
 
146
148
  enum ResourceExhaustedScope {
@@ -0,0 +1,42 @@
1
+ // The MIT License
2
+ //
3
+ // Copyright (c) 2025 Temporal Technologies Inc. All rights reserved.
4
+ //
5
+ // Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
+ // copies of the Software, and to permit persons to whom the Software is
8
+ // furnished to do so, subject to the following conditions:
9
+ //
10
+ // The above copyright notice and this permission notice shall be included in
11
+ // all copies or substantial portions of the Software.
12
+ //
13
+ // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
+ // THE SOFTWARE.
20
+
21
+ syntax = "proto3";
22
+
23
+ package temporal.api.enums.v1;
24
+
25
+ option go_package = "go.temporal.io/api/enums/v1;enums";
26
+ option java_package = "io.temporal.api.enums.v1";
27
+ option java_multiple_files = true;
28
+ option java_outer_classname = "NexusProto";
29
+ option ruby_package = "Temporalio::Api::Enums::V1";
30
+ option csharp_namespace = "Temporalio.Api.Enums.V1";
31
+
32
+ // NexusHandlerErrorRetryBehavior allows nexus handlers to explicity set the retry behavior of a HandlerError. If not
33
+ // specified, retry behavior is determined from the error type. For example internal errors are not retryable by default
34
+ // unless specified otherwise.
35
+ enum NexusHandlerErrorRetryBehavior {
36
+ NEXUS_HANDLER_ERROR_RETRY_BEHAVIOR_UNSPECIFIED = 0;
37
+ // A handler error is explicitly marked as retryable.
38
+ NEXUS_HANDLER_ERROR_RETRY_BEHAVIOR_RETRYABLE = 1;
39
+ // A handler error is explicitly marked as non-retryable.
40
+ NEXUS_HANDLER_ERROR_RETRY_BEHAVIOR_NON_RETRYABLE = 2;
41
+ }
42
+
@@ -40,6 +40,8 @@ enum ResetReapplyExcludeType {
40
40
  RESET_REAPPLY_EXCLUDE_TYPE_UPDATE = 2;
41
41
  // Exclude nexus events when reapplying events beyond the reset point.
42
42
  RESET_REAPPLY_EXCLUDE_TYPE_NEXUS = 3;
43
+ // Deprecated, unimplemented option.
44
+ RESET_REAPPLY_EXCLUDE_TYPE_CANCEL_REQUEST = 4 [deprecated=true];
43
45
  }
44
46
 
45
47
  // Event types to include when reapplying events. Deprecated: applications
@@ -32,7 +32,7 @@ option ruby_package = "Temporalio::Api::Enums::V1";
32
32
  option csharp_namespace = "Temporalio.Api.Enums.V1";
33
33
 
34
34
  // Defines whether to allow re-using a workflow id from a previously *closed* workflow.
35
- // If the request is denied, a `WorkflowExecutionAlreadyStartedFailure` is returned.
35
+ // If the request is denied, the server returns a `WorkflowExecutionAlreadyStartedFailure` error.
36
36
  //
37
37
  // See `WorkflowIdConflictPolicy` for handling workflow id duplication with a *running* workflow.
38
38
  enum WorkflowIdReusePolicy {
@@ -137,4 +137,45 @@ enum TimeoutType {
137
137
  TIMEOUT_TYPE_SCHEDULE_TO_START = 2;
138
138
  TIMEOUT_TYPE_SCHEDULE_TO_CLOSE = 3;
139
139
  TIMEOUT_TYPE_HEARTBEAT = 4;
140
- }
140
+ }
141
+
142
+ // Versioning Behavior specifies if and how a workflow execution moves between Worker Deployment
143
+ // Versions. The Versioning Behavior of a workflow execution is typically specified by the worker
144
+ // who completes the first task of the execution, but is also overridable manually for new and
145
+ // existing workflows (see VersioningOverride).
146
+ // Experimental. Worker Deployments are experimental and might significantly change in the future.
147
+ enum VersioningBehavior {
148
+ // Workflow execution does not have a Versioning Behavior and is called Unversioned. This is the
149
+ // legacy behavior. An Unversioned workflow's task can go to any Unversioned worker (see
150
+ // `WorkerVersioningMode`.)
151
+ // User needs to use Patching to keep the new code compatible with prior versions when dealing
152
+ // with Unversioned workflows.
153
+ VERSIONING_BEHAVIOR_UNSPECIFIED = 0;
154
+ // Workflow will start on the Current Deployment Version of its Task Queue, and then
155
+ // will be pinned to that same Deployment Version until completion (the Version that
156
+ // this Workflow is pinned to is specified in `versioning_info.version`).
157
+ // This behavior eliminates most of compatibility concerns users face when changing their code.
158
+ // Patching is not needed when pinned workflows code change.
159
+ // Can be overridden explicitly via `UpdateWorkflowExecutionOptions` API to move the
160
+ // execution to another Deployment Version.
161
+ // Activities of `PINNED` workflows are sent to the same Deployment Version. Exception to this
162
+ // would be when the activity Task Queue workers are not present in the workflow's Deployment
163
+ // Version, in which case the activity will be sent to the Current Deployment Version of its own
164
+ // task queue.
165
+ VERSIONING_BEHAVIOR_PINNED = 1;
166
+ // Workflow will automatically move to the Current Deployment Version of its Task Queue when the
167
+ // next workflow task is dispatched.
168
+ // AutoUpgrade behavior is suitable for long-running workflows as it allows them to move to the
169
+ // latest Deployment Version, but the user still needs to use Patching to keep the new code
170
+ // compatible with prior versions for changed workflow types.
171
+ // Activities of `AUTO_UPGRADE` workflows are sent to the Deployment Version of the workflow
172
+ // execution (as specified in versioning_info.version based on the last completed
173
+ // workflow task). Exception to this would be when the activity Task Queue workers are not
174
+ // present in the workflow's Deployment Version, in which case, the activity will be sent to a
175
+ // different Deployment Version according to the Current Deployment Version of its own task
176
+ // queue.
177
+ // Workflows stuck on a backlogged activity will still auto-upgrade if the Current Deployment
178
+ // Version of their Task Queue changes, without having to wait for the backlogged activity to
179
+ // complete on the old Version.
180
+ VERSIONING_BEHAVIOR_AUTO_UPGRADE = 2;
181
+ }