@temporalio/core-bridge 1.5.2 → 1.6.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 (153) hide show
  1. package/Cargo.lock +255 -48
  2. package/package.json +4 -4
  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/.buildkite/pipeline.yml +1 -3
  9. package/sdk-core/.cargo/config.toml +5 -2
  10. package/sdk-core/.github/workflows/heavy.yml +28 -0
  11. package/sdk-core/Cargo.toml +1 -1
  12. package/sdk-core/README.md +9 -5
  13. package/sdk-core/client/src/lib.rs +211 -36
  14. package/sdk-core/client/src/raw.rs +1 -1
  15. package/sdk-core/client/src/retry.rs +32 -20
  16. package/sdk-core/core/Cargo.toml +23 -9
  17. package/sdk-core/core/src/abstractions.rs +11 -0
  18. package/sdk-core/core/src/core_tests/activity_tasks.rs +6 -5
  19. package/sdk-core/core/src/core_tests/local_activities.rs +263 -22
  20. package/sdk-core/core/src/core_tests/queries.rs +2 -2
  21. package/sdk-core/core/src/core_tests/workflow_tasks.rs +249 -5
  22. package/sdk-core/core/src/ephemeral_server/mod.rs +5 -6
  23. package/sdk-core/core/src/lib.rs +2 -0
  24. package/sdk-core/core/src/protosext/mod.rs +1 -1
  25. package/sdk-core/core/src/telemetry/log_export.rs +1 -1
  26. package/sdk-core/core/src/telemetry/mod.rs +23 -8
  27. package/sdk-core/core/src/test_help/mod.rs +8 -1
  28. package/sdk-core/core/src/worker/activities/local_activities.rs +259 -125
  29. package/sdk-core/core/src/worker/activities.rs +3 -2
  30. package/sdk-core/core/src/worker/mod.rs +53 -26
  31. package/sdk-core/core/src/worker/workflow/bridge.rs +1 -3
  32. package/sdk-core/core/src/worker/workflow/driven_workflow.rs +3 -5
  33. package/sdk-core/core/src/worker/workflow/history_update.rs +835 -277
  34. package/sdk-core/core/src/worker/workflow/machines/activity_state_machine.rs +9 -17
  35. package/sdk-core/core/src/worker/workflow/machines/cancel_external_state_machine.rs +3 -5
  36. package/sdk-core/core/src/worker/workflow/machines/cancel_workflow_state_machine.rs +1 -2
  37. package/sdk-core/core/src/worker/workflow/machines/child_workflow_state_machine.rs +3 -5
  38. package/sdk-core/core/src/worker/workflow/machines/complete_workflow_state_machine.rs +1 -2
  39. package/sdk-core/core/src/worker/workflow/machines/continue_as_new_workflow_state_machine.rs +1 -2
  40. package/sdk-core/core/src/worker/workflow/machines/fail_workflow_state_machine.rs +1 -2
  41. package/sdk-core/core/src/worker/workflow/machines/local_activity_state_machine.rs +73 -51
  42. package/sdk-core/core/src/worker/workflow/machines/mod.rs +3 -3
  43. package/sdk-core/core/src/worker/workflow/machines/modify_workflow_properties_state_machine.rs +4 -4
  44. package/sdk-core/core/src/worker/workflow/machines/patch_state_machine.rs +1 -2
  45. package/sdk-core/core/src/worker/workflow/machines/signal_external_state_machine.rs +3 -5
  46. package/sdk-core/core/src/worker/workflow/machines/timer_state_machine.rs +6 -7
  47. package/sdk-core/core/src/worker/workflow/machines/transition_coverage.rs +2 -2
  48. package/sdk-core/core/src/worker/workflow/machines/upsert_search_attributes_state_machine.rs +4 -4
  49. package/sdk-core/core/src/worker/workflow/machines/workflow_machines/local_acts.rs +6 -17
  50. package/sdk-core/core/src/worker/workflow/machines/workflow_machines.rs +89 -58
  51. package/sdk-core/core/src/worker/workflow/machines/workflow_task_state_machine.rs +4 -7
  52. package/sdk-core/core/src/worker/workflow/managed_run/managed_wf_test.rs +21 -9
  53. package/sdk-core/core/src/worker/workflow/managed_run.rs +1021 -360
  54. package/sdk-core/core/src/worker/workflow/mod.rs +306 -346
  55. package/sdk-core/core/src/worker/workflow/run_cache.rs +29 -53
  56. package/sdk-core/core/src/worker/workflow/wft_extraction.rs +125 -0
  57. package/sdk-core/core/src/worker/workflow/wft_poller.rs +1 -4
  58. package/sdk-core/core/src/worker/workflow/workflow_stream/saved_wf_inputs.rs +115 -0
  59. package/sdk-core/core/src/worker/workflow/workflow_stream/tonic_status_serde.rs +24 -0
  60. package/sdk-core/core/src/worker/workflow/workflow_stream.rs +444 -714
  61. package/sdk-core/core-api/Cargo.toml +2 -0
  62. package/sdk-core/core-api/src/errors.rs +1 -34
  63. package/sdk-core/core-api/src/lib.rs +6 -2
  64. package/sdk-core/core-api/src/worker.rs +14 -1
  65. package/sdk-core/etc/deps.svg +115 -140
  66. package/sdk-core/etc/regen-depgraph.sh +5 -0
  67. package/sdk-core/fsm/rustfsm_procmacro/src/lib.rs +6 -6
  68. package/sdk-core/fsm/rustfsm_trait/src/lib.rs +7 -3
  69. package/sdk-core/histories/evict_while_la_running_no_interference-16_history.bin +0 -0
  70. package/sdk-core/protos/api_upstream/Makefile +5 -5
  71. package/sdk-core/protos/api_upstream/build/go.mod +7 -0
  72. package/sdk-core/protos/api_upstream/build/go.sum +5 -0
  73. package/sdk-core/protos/api_upstream/build/tools.go +29 -0
  74. package/sdk-core/protos/api_upstream/go.mod +6 -0
  75. package/sdk-core/protos/api_upstream/temporal/api/batch/v1/message.proto +9 -2
  76. package/sdk-core/protos/api_upstream/temporal/api/command/v1/message.proto +12 -19
  77. package/sdk-core/protos/api_upstream/temporal/api/common/v1/message.proto +2 -2
  78. package/sdk-core/protos/api_upstream/temporal/api/enums/v1/batch_operation.proto +3 -2
  79. package/sdk-core/protos/api_upstream/temporal/api/enums/v1/command_type.proto +3 -2
  80. package/sdk-core/protos/api_upstream/temporal/api/enums/v1/common.proto +3 -2
  81. package/sdk-core/protos/api_upstream/temporal/api/enums/v1/event_type.proto +3 -3
  82. package/sdk-core/protos/api_upstream/temporal/api/enums/v1/failed_cause.proto +20 -2
  83. package/sdk-core/protos/api_upstream/temporal/api/{update/v1/message.proto → enums/v1/interaction_type.proto} +11 -18
  84. package/sdk-core/protos/api_upstream/temporal/api/enums/v1/namespace.proto +2 -2
  85. package/sdk-core/protos/api_upstream/temporal/api/enums/v1/query.proto +2 -2
  86. package/sdk-core/protos/api_upstream/temporal/api/enums/v1/reset.proto +2 -2
  87. package/sdk-core/protos/api_upstream/temporal/api/enums/v1/schedule.proto +2 -2
  88. package/sdk-core/protos/api_upstream/temporal/api/enums/v1/task_queue.proto +2 -2
  89. package/sdk-core/protos/api_upstream/temporal/api/enums/v1/update.proto +2 -13
  90. package/sdk-core/protos/api_upstream/temporal/api/enums/v1/workflow.proto +2 -2
  91. package/sdk-core/protos/api_upstream/temporal/api/errordetails/v1/message.proto +2 -2
  92. package/sdk-core/protos/api_upstream/temporal/api/failure/v1/message.proto +2 -2
  93. package/sdk-core/protos/api_upstream/temporal/api/filter/v1/message.proto +2 -2
  94. package/sdk-core/protos/api_upstream/temporal/api/history/v1/message.proto +13 -19
  95. package/sdk-core/protos/api_upstream/temporal/api/interaction/v1/message.proto +87 -0
  96. package/sdk-core/protos/api_upstream/temporal/api/namespace/v1/message.proto +2 -2
  97. package/sdk-core/protos/api_upstream/temporal/api/operatorservice/v1/request_response.proto +2 -2
  98. package/sdk-core/protos/api_upstream/temporal/api/operatorservice/v1/service.proto +2 -2
  99. package/sdk-core/protos/api_upstream/temporal/api/query/v1/message.proto +2 -2
  100. package/sdk-core/protos/api_upstream/temporal/api/replication/v1/message.proto +2 -2
  101. package/sdk-core/protos/api_upstream/temporal/api/schedule/v1/message.proto +2 -2
  102. package/sdk-core/protos/api_upstream/temporal/api/taskqueue/v1/message.proto +2 -2
  103. package/sdk-core/protos/api_upstream/temporal/api/version/v1/message.proto +2 -2
  104. package/sdk-core/protos/api_upstream/temporal/api/workflow/v1/message.proto +2 -2
  105. package/sdk-core/protos/api_upstream/temporal/api/workflowservice/v1/request_response.proto +13 -8
  106. package/sdk-core/protos/api_upstream/temporal/api/workflowservice/v1/service.proto +2 -2
  107. package/sdk-core/protos/local/temporal/sdk/core/workflow_activation/workflow_activation.proto +2 -0
  108. package/sdk-core/protos/testsrv_upstream/temporal/api/testservice/v1/request_response.proto +2 -2
  109. package/sdk-core/protos/testsrv_upstream/temporal/api/testservice/v1/service.proto +2 -2
  110. package/sdk-core/sdk/Cargo.toml +4 -3
  111. package/sdk-core/sdk/src/lib.rs +87 -21
  112. package/sdk-core/sdk/src/workflow_future.rs +7 -12
  113. package/sdk-core/sdk-core-protos/Cargo.toml +5 -2
  114. package/sdk-core/sdk-core-protos/build.rs +36 -2
  115. package/sdk-core/sdk-core-protos/src/history_builder.rs +26 -19
  116. package/sdk-core/sdk-core-protos/src/history_info.rs +4 -0
  117. package/sdk-core/sdk-core-protos/src/lib.rs +78 -34
  118. package/sdk-core/sdk-core-protos/src/task_token.rs +12 -2
  119. package/sdk-core/test-utils/Cargo.toml +3 -1
  120. package/sdk-core/test-utils/src/histfetch.rs +1 -1
  121. package/sdk-core/test-utils/src/lib.rs +50 -18
  122. package/sdk-core/test-utils/src/wf_input_saver.rs +50 -0
  123. package/sdk-core/test-utils/src/workflows.rs +29 -0
  124. package/sdk-core/tests/fuzzy_workflow.rs +130 -0
  125. package/sdk-core/tests/{load_tests.rs → heavy_tests.rs} +114 -7
  126. package/sdk-core/tests/integ_tests/heartbeat_tests.rs +5 -2
  127. package/sdk-core/tests/integ_tests/metrics_tests.rs +1 -1
  128. package/sdk-core/tests/integ_tests/polling_tests.rs +1 -39
  129. package/sdk-core/tests/integ_tests/queries_tests.rs +2 -127
  130. package/sdk-core/tests/integ_tests/visibility_tests.rs +52 -5
  131. package/sdk-core/tests/integ_tests/workflow_tests/activities.rs +74 -1
  132. package/sdk-core/tests/integ_tests/workflow_tests/cancel_wf.rs +5 -13
  133. package/sdk-core/tests/integ_tests/workflow_tests/continue_as_new.rs +1 -1
  134. package/sdk-core/tests/integ_tests/workflow_tests/determinism.rs +2 -10
  135. package/sdk-core/tests/integ_tests/workflow_tests/local_activities.rs +69 -197
  136. package/sdk-core/tests/integ_tests/workflow_tests/patches.rs +4 -28
  137. package/sdk-core/tests/integ_tests/workflow_tests/replay.rs +12 -7
  138. package/sdk-core/tests/integ_tests/workflow_tests/signals.rs +14 -14
  139. package/sdk-core/tests/integ_tests/workflow_tests/stickyness.rs +3 -19
  140. package/sdk-core/tests/integ_tests/workflow_tests/timers.rs +3 -19
  141. package/sdk-core/tests/integ_tests/workflow_tests/upsert_search_attrs.rs +1 -1
  142. package/sdk-core/tests/integ_tests/workflow_tests.rs +5 -6
  143. package/sdk-core/tests/main.rs +2 -12
  144. package/sdk-core/tests/runner.rs +71 -34
  145. package/sdk-core/tests/wf_input_replay.rs +32 -0
  146. package/sdk-core/bridge-ffi/Cargo.toml +0 -24
  147. package/sdk-core/bridge-ffi/LICENSE.txt +0 -23
  148. package/sdk-core/bridge-ffi/build.rs +0 -25
  149. package/sdk-core/bridge-ffi/include/sdk-core-bridge.h +0 -224
  150. package/sdk-core/bridge-ffi/src/lib.rs +0 -746
  151. package/sdk-core/bridge-ffi/src/wrappers.rs +0 -221
  152. package/sdk-core/protos/local/temporal/sdk/core/bridge/bridge.proto +0 -210
  153. package/sdk-core/sdk/src/conversions.rs +0 -8
@@ -28,8 +28,8 @@ option go_package = "go.temporal.io/api/batch/v1;batch";
28
28
  option java_package = "io.temporal.api.batch.v1";
29
29
  option java_multiple_files = true;
30
30
  option java_outer_classname = "MessageProto";
31
- option ruby_package = "Temporal::Api::Batch::V1";
32
- option csharp_namespace = "Temporal.Api.Batch.V1";
31
+ option ruby_package = "Temporalio::Api::Batch::V1";
32
+ option csharp_namespace = "Temporalio.Api.Batch.V1";
33
33
 
34
34
  import "dependencies/gogoproto/gogo.proto";
35
35
  import "google/protobuf/timestamp.proto";
@@ -79,4 +79,11 @@ message BatchOperationSignal {
79
79
  message BatchOperationCancellation {
80
80
  // The identity of the worker/client
81
81
  string identity = 1;
82
+ }
83
+
84
+ // BatchOperationDeletion sends deletion requests to batch workflows.
85
+ // Keep the parameter in sync with temporal.api.workflowservice.v1.DeleteWorkflowExecutionRequest.
86
+ message BatchOperationDeletion {
87
+ // The identity of the worker/client
88
+ string identity = 1;
82
89
  }
@@ -28,8 +28,8 @@ option go_package = "go.temporal.io/api/command/v1;command";
28
28
  option java_package = "io.temporal.api.command.v1";
29
29
  option java_multiple_files = true;
30
30
  option java_outer_classname = "MessageProto";
31
- option ruby_package = "Temporal::Api::Command::V1";
32
- option csharp_namespace = "Temporal.Api.Command.V1";
31
+ option ruby_package = "Temporalio::Api::Command::V1";
32
+ option csharp_namespace = "Temporalio.Api.Command.V1";
33
33
 
34
34
  import "google/protobuf/duration.proto";
35
35
 
@@ -37,9 +37,9 @@ import "dependencies/gogoproto/gogo.proto";
37
37
 
38
38
  import "temporal/api/enums/v1/workflow.proto";
39
39
  import "temporal/api/enums/v1/command_type.proto";
40
- import "temporal/api/enums/v1/update.proto";
41
40
  import "temporal/api/common/v1/message.proto";
42
41
  import "temporal/api/failure/v1/message.proto";
42
+ import "temporal/api/interaction/v1/message.proto";
43
43
  import "temporal/api/taskqueue/v1/message.proto";
44
44
 
45
45
  message ScheduleActivityTaskCommandAttributes {
@@ -222,26 +222,18 @@ message StartChildWorkflowExecutionCommandAttributes {
222
222
  }
223
223
 
224
224
  message AcceptWorkflowUpdateCommandAttributes {
225
- // A unique identifier for an update within a given workflow context
226
- string update_id = 1;
225
+ temporal.api.interaction.v1.Meta meta = 1;
226
+ temporal.api.interaction.v1.Input input = 2;
227
227
  }
228
228
 
229
229
  message CompleteWorkflowUpdateCommandAttributes {
230
- // A unique identifier for an update within a given workflow context
231
- string update_id = 1;
232
-
233
- // Whether the server should attempt to bypass making this update rejection
234
- // durable in history. This field is only consulted when the result field
235
- // indicates failure. Leaving this field in its default state (i.e.
236
- // UPDATE_WORKFLOW_REJECTION_DURABILITY_PREFERENCE_UNSPECIFIED) will result
237
- // in making the rejection durable.
238
- temporal.api.enums.v1.WorkflowUpdateDurabilityPreference durability_preference = 2;
230
+ temporal.api.interaction.v1.Meta meta = 1;
231
+ temporal.api.interaction.v1.Output output = 2;
232
+ }
239
233
 
240
- // The success or failure output of the update
241
- oneof result {
242
- temporal.api.common.v1.Payloads success = 3;
243
- temporal.api.failure.v1.Failure failure = 4;
244
- }
234
+ message RejectWorkflowUpdateCommandAttributes {
235
+ temporal.api.interaction.v1.Meta meta = 1;
236
+ temporal.api.failure.v1.Failure failure = 2;
245
237
  }
246
238
 
247
239
  message Command {
@@ -263,5 +255,6 @@ message Command {
263
255
  AcceptWorkflowUpdateCommandAttributes accept_workflow_update_command_attributes = 15;
264
256
  CompleteWorkflowUpdateCommandAttributes complete_workflow_update_command_attributes = 16;
265
257
  ModifyWorkflowPropertiesCommandAttributes modify_workflow_properties_command_attributes = 17;
258
+ RejectWorkflowUpdateCommandAttributes reject_workflow_update_command_attributes = 18;
266
259
  }
267
260
  }
@@ -28,8 +28,8 @@ option go_package = "go.temporal.io/api/common/v1;common";
28
28
  option java_package = "io.temporal.api.common.v1";
29
29
  option java_multiple_files = true;
30
30
  option java_outer_classname = "MessageProto";
31
- option ruby_package = "Temporal::Api::Common::V1";
32
- option csharp_namespace = "Temporal.Api.Common.V1";
31
+ option ruby_package = "Temporalio::Api::Common::V1";
32
+ option csharp_namespace = "Temporalio.Api.Common.V1";
33
33
 
34
34
  import "google/protobuf/duration.proto";
35
35
 
@@ -28,14 +28,15 @@ option go_package = "go.temporal.io/api/enums/v1;enums";
28
28
  option java_package = "io.temporal.api.enums.v1";
29
29
  option java_multiple_files = true;
30
30
  option java_outer_classname = "BatchOperationProto";
31
- option ruby_package = "Temporal::Api::Enums::V1";
32
- option csharp_namespace = "Temporal.Api.Enums.V1";
31
+ option ruby_package = "Temporalio::Api::Enums::V1";
32
+ option csharp_namespace = "Temporalio.Api.Enums.V1";
33
33
 
34
34
  enum BatchOperationType {
35
35
  BATCH_OPERATION_TYPE_UNSPECIFIED = 0;
36
36
  BATCH_OPERATION_TYPE_TERMINATE = 1;
37
37
  BATCH_OPERATION_TYPE_CANCEL = 2;
38
38
  BATCH_OPERATION_TYPE_SIGNAL = 3;
39
+ BATCH_OPERATION_TYPE_DELETE = 4;
39
40
  }
40
41
 
41
42
  enum BatchOperationState {
@@ -28,8 +28,8 @@ option go_package = "go.temporal.io/api/enums/v1;enums";
28
28
  option java_package = "io.temporal.api.enums.v1";
29
29
  option java_multiple_files = true;
30
30
  option java_outer_classname = "CommandTypeProto";
31
- option ruby_package = "Temporal::Api::Enums::V1";
32
- option csharp_namespace = "Temporal.Api.Enums.V1";
31
+ option ruby_package = "Temporalio::Api::Enums::V1";
32
+ option csharp_namespace = "Temporalio.Api.Enums.V1";
33
33
 
34
34
  // Whenever this list of command types is changed do change the function shouldBufferEvent in mutableStateBuilder.go to make sure to do the correct event ordering.
35
35
  enum CommandType {
@@ -53,4 +53,5 @@ enum CommandType {
53
53
  // failure outcome of said update.
54
54
  COMMAND_TYPE_COMPLETE_WORKFLOW_UPDATE = 15;
55
55
  COMMAND_TYPE_MODIFY_WORKFLOW_PROPERTIES = 16;
56
+ COMMAND_TYPE_REJECT_WORKFLOW_UPDATE = 17;
56
57
  }
@@ -28,8 +28,8 @@ option go_package = "go.temporal.io/api/enums/v1;enums";
28
28
  option java_package = "io.temporal.api.enums.v1";
29
29
  option java_multiple_files = true;
30
30
  option java_outer_classname = "CommonProto";
31
- option ruby_package = "Temporal::Api::Enums::V1";
32
- option csharp_namespace = "Temporal.Api.Enums.V1";
31
+ option ruby_package = "Temporalio::Api::Enums::V1";
32
+ option csharp_namespace = "Temporalio.Api.Enums.V1";
33
33
 
34
34
  enum EncodingType {
35
35
  ENCODING_TYPE_UNSPECIFIED = 0;
@@ -45,6 +45,7 @@ enum IndexedValueType {
45
45
  INDEXED_VALUE_TYPE_DOUBLE = 4;
46
46
  INDEXED_VALUE_TYPE_BOOL = 5;
47
47
  INDEXED_VALUE_TYPE_DATETIME = 6;
48
+ INDEXED_VALUE_TYPE_KEYWORD_LIST = 7;
48
49
  }
49
50
 
50
51
  enum Severity {
@@ -28,8 +28,8 @@ option go_package = "go.temporal.io/api/enums/v1;enums";
28
28
  option java_package = "io.temporal.api.enums.v1";
29
29
  option java_multiple_files = true;
30
30
  option java_outer_classname = "EventTypeProto";
31
- option ruby_package = "Temporal::Api::Enums::V1";
32
- option csharp_namespace = "Temporal.Api.Enums.V1";
31
+ option ruby_package = "Temporalio::Api::Enums::V1";
32
+ option csharp_namespace = "Temporalio.Api.Enums.V1";
33
33
 
34
34
  // Whenever this list of events is changed do change the function shouldBufferEvent in mutableStateBuilder.go to make sure to do the correct event ordering
35
35
  enum EventType {
@@ -152,7 +152,7 @@ enum EventType {
152
152
  // Workflow search attributes should be updated and synchronized with the visibility store
153
153
  EVENT_TYPE_UPSERT_WORKFLOW_SEARCH_ATTRIBUTES = 40;
154
154
  // Workflow update request has been received
155
- EVENT_TYPE_WORKFLOW_UPDATE_REQUESTED = 41;
155
+ EVENT_TYPE_WORKFLOW_UPDATE_REJECTED = 41;
156
156
  // Workflow update request has been accepted by user workflow code
157
157
  EVENT_TYPE_WORKFLOW_UPDATE_ACCEPTED = 42;
158
158
  // Workflow update has been completed
@@ -28,8 +28,8 @@ option go_package = "go.temporal.io/api/enums/v1;enums";
28
28
  option java_package = "io.temporal.api.enums.v1";
29
29
  option java_multiple_files = true;
30
30
  option java_outer_classname = "FailedCauseProto";
31
- option ruby_package = "Temporal::Api::Enums::V1";
32
- option csharp_namespace = "Temporal.Api.Enums.V1";
31
+ option ruby_package = "Temporalio::Api::Enums::V1";
32
+ option csharp_namespace = "Temporalio.Api.Enums.V1";
33
33
 
34
34
  // Workflow tasks can fail for various reasons. Note that some of these reasons can only originate
35
35
  // from the server, and some of them can only originate from the SDK/worker.
@@ -67,6 +67,24 @@ enum WorkflowTaskFailedCause {
67
67
  // what the workflow code actually did.
68
68
  WORKFLOW_TASK_FAILED_CAUSE_NON_DETERMINISTIC_ERROR = 24;
69
69
  WORKFLOW_TASK_FAILED_CAUSE_BAD_MODIFY_WORKFLOW_PROPERTIES_ATTRIBUTES = 25;
70
+
71
+ // We send the below error codes to users when their requests would violate a size constraint
72
+ // of their workflow. We do this to ensure that the state of their workflow does not become too
73
+ // large because that can cause severe performance degradation. You can modify the thresholds for
74
+ // each of these errors within your dynamic config.
75
+ //
76
+ // Spawning a new child workflow would cause this workflow to exceed its limit of pending child
77
+ // workflows.
78
+ WORKFLOW_TASK_FAILED_CAUSE_PENDING_CHILD_WORKFLOWS_LIMIT_EXCEEDED = 26;
79
+ // Starting a new activity would cause this workflow to exceed its limit of pending activities
80
+ // that we track.
81
+ WORKFLOW_TASK_FAILED_CAUSE_PENDING_ACTIVITIES_LIMIT_EXCEEDED = 27;
82
+ // A workflow has a buffer of signals that have not yet reached their destination. We return this
83
+ // error when sending a new signal would exceed the capacity of this buffer.
84
+ WORKFLOW_TASK_FAILED_CAUSE_PENDING_SIGNALS_LIMIT_EXCEEDED = 28;
85
+ // Similarly, we have a buffer of pending requests to cancel other workflows. We return this error
86
+ // when our capacity for pending cancel requests is already reached.
87
+ WORKFLOW_TASK_FAILED_CAUSE_PENDING_REQUEST_CANCEL_LIMIT_EXCEEDED = 29;
70
88
  }
71
89
 
72
90
  enum StartChildWorkflowExecutionFailedCause {
@@ -22,25 +22,18 @@
22
22
 
23
23
  syntax = "proto3";
24
24
 
25
- package temporal.api.update.v1;
25
+ package temporal.api.enums.v1;
26
26
 
27
- option go_package = "go.temporal.io/api/update/v1;update";
28
- option java_package = "io.temporal.api.update.v1";
27
+ option go_package = "go.temporal.io/api/enums/v1;enums";
28
+ option java_package = "io.temporal.api.enums.v1";
29
29
  option java_multiple_files = true;
30
- option java_outer_classname = "MessageProto";
31
- option ruby_package = "Temporal::Api::Update::V1";
32
- option csharp_namespace = "Temporal.Api.Update.V1";
30
+ option java_outer_classname = "InteractionTypeProto";
31
+ option ruby_package = "Temporalio::Api::Enums::V1";
32
+ option csharp_namespace = "Temporalio.Api.Enums.V1";
33
33
 
34
- import "temporal/api/common/v1/message.proto";
35
-
36
- message WorkflowUpdate {
37
- // Headers that are passed with the update to the processing workflow.
38
- // These can include things like auth or tracing tokens.
39
- temporal.api.common.v1.Header header = 1;
40
-
41
- // The name of the update function to invoke on the target workflow.
42
- string name = 2;
43
-
44
- // The arguments to pass to the named update function.
45
- temporal.api.common.v1.Payloads args = 3;
34
+ enum InteractionType {
35
+ INTERACTION_TYPE_UNSPECIFIED = 0;
36
+ INTERACTION_TYPE_WORKFLOW_QUERY = 1;
37
+ INTERACTION_TYPE_WORKFLOW_UPDATE = 2;
38
+ INTERACTION_TYPE_WORKFLOW_SIGNAL = 3;
46
39
  }
@@ -28,8 +28,8 @@ option go_package = "go.temporal.io/api/enums/v1;enums";
28
28
  option java_package = "io.temporal.api.enums.v1";
29
29
  option java_multiple_files = true;
30
30
  option java_outer_classname = "NamespaceProto";
31
- option ruby_package = "Temporal::Api::Enums::V1";
32
- option csharp_namespace = "Temporal.Api.Enums.V1";
31
+ option ruby_package = "Temporalio::Api::Enums::V1";
32
+ option csharp_namespace = "Temporalio.Api.Enums.V1";
33
33
 
34
34
  enum NamespaceState {
35
35
  NAMESPACE_STATE_UNSPECIFIED = 0;
@@ -28,8 +28,8 @@ option go_package = "go.temporal.io/api/enums/v1;enums";
28
28
  option java_package = "io.temporal.api.enums.v1";
29
29
  option java_multiple_files = true;
30
30
  option java_outer_classname = "QueryProto";
31
- option ruby_package = "Temporal::Api::Enums::V1";
32
- option csharp_namespace = "Temporal.Api.Enums.V1";
31
+ option ruby_package = "Temporalio::Api::Enums::V1";
32
+ option csharp_namespace = "Temporalio.Api.Enums.V1";
33
33
 
34
34
  enum QueryResultType {
35
35
  QUERY_RESULT_TYPE_UNSPECIFIED = 0;
@@ -28,8 +28,8 @@ option go_package = "go.temporal.io/api/enums/v1;enums";
28
28
  option java_package = "io.temporal.api.enums.v1";
29
29
  option java_multiple_files = true;
30
30
  option java_outer_classname = "ResetProto";
31
- option ruby_package = "Temporal::Api::Enums::V1";
32
- option csharp_namespace = "Temporal.Api.Enums.V1";
31
+ option ruby_package = "Temporalio::Api::Enums::V1";
32
+ option csharp_namespace = "Temporalio.Api.Enums.V1";
33
33
 
34
34
  // Reset reapplay(replay) options
35
35
  // * RESET_REAPPLY_TYPE_SIGNAL (default) - Signals are reapplied when workflow is reset
@@ -28,8 +28,8 @@ option go_package = "go.temporal.io/api/enums/v1;enums";
28
28
  option java_package = "io.temporal.api.enums.v1";
29
29
  option java_multiple_files = true;
30
30
  option java_outer_classname = "ScheduleProto";
31
- option ruby_package = "Temporal::Api::Enums::V1";
32
- option csharp_namespace = "Temporal.Api.Enums.V1";
31
+ option ruby_package = "Temporalio::Api::Enums::V1";
32
+ option csharp_namespace = "Temporalio.Api.Enums.V1";
33
33
 
34
34
 
35
35
  // ScheduleOverlapPolicy controls what happens when a workflow would be started
@@ -28,8 +28,8 @@ option go_package = "go.temporal.io/api/enums/v1;enums";
28
28
  option java_package = "io.temporal.api.enums.v1";
29
29
  option java_multiple_files = true;
30
30
  option java_outer_classname = "TaskQueueProto";
31
- option ruby_package = "Temporal::Api::Enums::V1";
32
- option csharp_namespace = "Temporal.Api.Enums.V1";
31
+ option ruby_package = "Temporalio::Api::Enums::V1";
32
+ option csharp_namespace = "Temporalio.Api.Enums.V1";
33
33
 
34
34
  enum TaskQueueKind {
35
35
  TASK_QUEUE_KIND_UNSPECIFIED = 0;
@@ -28,8 +28,8 @@ option go_package = "go.temporal.io/api/enums/v1;enums";
28
28
  option java_package = "io.temporal.api.enums.v1";
29
29
  option java_multiple_files = true;
30
30
  option java_outer_classname = "UpdateProto";
31
- option ruby_package = "Temporal::Api::Enums::V1";
32
- option csharp_namespace = "Temporal.Api.Enums.V1";
31
+ option ruby_package = "Temporalio::Api::Enums::V1";
32
+ option csharp_namespace = "Temporalio.Api.Enums.V1";
33
33
 
34
34
  enum WorkflowUpdateResultAccessStyle {
35
35
  WORKFLOW_UPDATE_RESULT_ACCESS_STYLE_UNSPECIFIED = 0;
@@ -38,14 +38,3 @@ enum WorkflowUpdateResultAccessStyle {
38
38
  // response body
39
39
  WORKFLOW_UPDATE_RESULT_ACCESS_STYLE_REQUIRE_INLINE = 1;
40
40
  }
41
-
42
- enum WorkflowUpdateDurabilityPreference {
43
- // The workflow expresses no preference as to the durability of the
44
- // the associated update.
45
- WORKFLOW_UPDATE_DURABILITY_PREFERENCE_UNSPECIFIED = 0;
46
-
47
- // Used by a workflow to indicate that no workflow state mutation occurred
48
- // while processing the update and that it wishes that the update not be
49
- // made durable (and thus not take up space in workflow history).
50
- WORKFLOW_UPDATE_DURABILITY_PREFERENCE_BYPASS = 1;
51
- }
@@ -28,8 +28,8 @@ option go_package = "go.temporal.io/api/enums/v1;enums";
28
28
  option java_package = "io.temporal.api.enums.v1";
29
29
  option java_multiple_files = true;
30
30
  option java_outer_classname = "WorkflowProto";
31
- option ruby_package = "Temporal::Api::Enums::V1";
32
- option csharp_namespace = "Temporal.Api.Enums.V1";
31
+ option ruby_package = "Temporalio::Api::Enums::V1";
32
+ option csharp_namespace = "Temporalio.Api.Enums.V1";
33
33
 
34
34
  // Defines how new runs of a workflow with a particular ID may or may not be allowed. Note that
35
35
  // it is *never* valid to have two actively running instances of the same workflow id.
@@ -31,8 +31,8 @@ option go_package = "go.temporal.io/api/errordetails/v1;errordetails";
31
31
  option java_package = "io.temporal.api.errordetails.v1";
32
32
  option java_multiple_files = true;
33
33
  option java_outer_classname = "MessageProto";
34
- option ruby_package = "Temporal::Api::ErrorDetails::V1";
35
- option csharp_namespace = "Temporal.Api.ErrorDetails.V1";
34
+ option ruby_package = "Temporalio::Api::ErrorDetails::V1";
35
+ option csharp_namespace = "Temporalio.Api.ErrorDetails.V1";
36
36
 
37
37
  import "temporal/api/common/v1/message.proto";
38
38
 
@@ -28,8 +28,8 @@ option go_package = "go.temporal.io/api/failure/v1;failure";
28
28
  option java_package = "io.temporal.api.failure.v1";
29
29
  option java_multiple_files = true;
30
30
  option java_outer_classname = "MessageProto";
31
- option ruby_package = "Temporal::Api::Failure::V1";
32
- option csharp_namespace = "Temporal.Api.Failure.V1";
31
+ option ruby_package = "Temporalio::Api::Failure::V1";
32
+ option csharp_namespace = "Temporalio.Api.Failure.V1";
33
33
 
34
34
  import "temporal/api/common/v1/message.proto";
35
35
  import "temporal/api/enums/v1/workflow.proto";
@@ -28,8 +28,8 @@ option go_package = "go.temporal.io/api/filter/v1;filter";
28
28
  option java_package = "io.temporal.api.filter.v1";
29
29
  option java_multiple_files = true;
30
30
  option java_outer_classname = "MessageProto";
31
- option ruby_package = "Temporal::Api::Filter::V1";
32
- option csharp_namespace = "Temporal.Api.Filter.V1";
31
+ option ruby_package = "Temporalio::Api::Filter::V1";
32
+ option csharp_namespace = "Temporalio.Api.Filter.V1";
33
33
 
34
34
  import "google/protobuf/timestamp.proto";
35
35
 
@@ -28,8 +28,8 @@ option go_package = "go.temporal.io/api/history/v1;history";
28
28
  option java_package = "io.temporal.api.history.v1";
29
29
  option java_multiple_files = true;
30
30
  option java_outer_classname = "MessageProto";
31
- option ruby_package = "Temporal::Api::History::V1";
32
- option csharp_namespace = "Temporal.Api.History.V1";
31
+ option ruby_package = "Temporalio::Api::History::V1";
32
+ option csharp_namespace = "Temporalio.Api.History.V1";
33
33
 
34
34
  import "google/protobuf/duration.proto";
35
35
  import "google/protobuf/timestamp.proto";
@@ -41,8 +41,8 @@ import "temporal/api/enums/v1/failed_cause.proto";
41
41
  import "temporal/api/enums/v1/workflow.proto";
42
42
  import "temporal/api/common/v1/message.proto";
43
43
  import "temporal/api/failure/v1/message.proto";
44
+ import "temporal/api/interaction/v1/message.proto";
44
45
  import "temporal/api/taskqueue/v1/message.proto";
45
- import "temporal/api/update/v1/message.proto";
46
46
  import "temporal/api/workflow/v1/message.proto";
47
47
 
48
48
  // Always the first event in workflow history
@@ -647,25 +647,19 @@ message ChildWorkflowExecutionTerminatedEventAttributes {
647
647
  int64 started_event_id = 5;
648
648
  }
649
649
 
650
- message WorkflowUpdateRequestedEventAttributes {
651
- temporal.api.common.v1.Header header = 1;
652
- string request_id = 2;
653
- string update_id = 3;
654
- temporal.api.update.v1.WorkflowUpdate update = 4;
655
- }
656
-
657
650
  message WorkflowUpdateAcceptedEventAttributes {
658
- temporal.api.common.v1.Header header = 1;
659
- string update_id = 2;
651
+ temporal.api.interaction.v1.Meta meta = 1;
652
+ temporal.api.interaction.v1.Input input = 2;
660
653
  }
661
654
 
662
655
  message WorkflowUpdateCompletedEventAttributes {
663
- temporal.api.common.v1.Header system_header = 1;
664
- string update_id = 3;
665
- oneof result {
666
- temporal.api.common.v1.Payloads success = 4;
667
- temporal.api.failure.v1.Failure failure = 5;
668
- }
656
+ temporal.api.interaction.v1.Meta meta = 1;
657
+ temporal.api.interaction.v1.Output output = 2;
658
+ }
659
+
660
+ message WorkflowUpdateRejectedEventAttributes {
661
+ temporal.api.interaction.v1.Meta meta = 1;
662
+ temporal.api.failure.v1.Failure failure = 2;
669
663
  }
670
664
 
671
665
  message WorkflowPropertiesModifiedExternallyEventAttributes {
@@ -750,7 +744,7 @@ message HistoryEvent {
750
744
  SignalExternalWorkflowExecutionFailedEventAttributes signal_external_workflow_execution_failed_event_attributes = 43;
751
745
  ExternalWorkflowExecutionSignaledEventAttributes external_workflow_execution_signaled_event_attributes = 44;
752
746
  UpsertWorkflowSearchAttributesEventAttributes upsert_workflow_search_attributes_event_attributes = 45;
753
- WorkflowUpdateRequestedEventAttributes workflow_update_requested_event_attributes = 46;
747
+ WorkflowUpdateRejectedEventAttributes workflow_update_rejected_event_attributes = 46;
754
748
  WorkflowUpdateAcceptedEventAttributes workflow_update_accepted_event_attributes = 47;
755
749
  WorkflowUpdateCompletedEventAttributes workflow_update_completed_event_attributes = 48;
756
750
  WorkflowPropertiesModifiedExternallyEventAttributes workflow_properties_modified_externally_event_attributes = 49;
@@ -0,0 +1,87 @@
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.interaction.v1;
26
+
27
+ option go_package = "go.temporal.io/api/interaction/v1;interaction";
28
+ option java_package = "io.temporal.api.interaction.v1";
29
+ option java_multiple_files = true;
30
+ option java_outer_classname = "MessageProto";
31
+ option ruby_package = "Temporalio::Api::Interaction::V1";
32
+ option csharp_namespace = "Temporalio.Api.Interaction.V1";
33
+
34
+ import "temporal/api/common/v1/message.proto";
35
+ import "temporal/api/failure/v1/message.proto";
36
+ import "temporal/api/enums/v1/interaction_type.proto";
37
+
38
+ // Meta carries metadata about an interaction for use by the system (i.e. not
39
+ // generall user-visible)
40
+ message Meta {
41
+ // An ID with workflow-scoped uniqueness for this interaction
42
+ string id = 1;
43
+
44
+ // The event ID after which this interaction can execute. The effects of
45
+ // history up to and including this event ID should be visible to the
46
+ // interaction when it executes.
47
+ int64 event_id = 2;
48
+
49
+ // The type of this interaction.
50
+ temporal.api.enums.v1.InteractionType interaction_type = 3;
51
+
52
+ // A string identifying the agent that requested this interaction.
53
+ string identity = 4;
54
+
55
+ string request_id = 5;
56
+ }
57
+
58
+ // Input carries interaction input that comes from the caller.
59
+ message Input {
60
+ // Headers that are passed with the interaction to and from the processing workflow.
61
+ // These can include things like auth or tracing tokens.
62
+ temporal.api.common.v1.Header header = 1;
63
+
64
+ // The name of the input handler to invoke on the target workflow
65
+ string name = 2;
66
+
67
+ // The arguments to pass to the named handler.
68
+ temporal.api.common.v1.Payloads args = 3;
69
+ }
70
+
71
+
72
+ // Output carries the output data from an interaction.
73
+ message Output {
74
+ // Headers that are passed with the interaction to and from the processing workflow.
75
+ // These can include things like auth or tracing tokens.
76
+ temporal.api.common.v1.Header header = 1;
77
+
78
+ oneof result {
79
+ temporal.api.common.v1.Payloads success = 2;
80
+ temporal.api.failure.v1.Failure failure = 3;
81
+ }
82
+ }
83
+
84
+ message Invocation {
85
+ Meta meta = 1;
86
+ Input input = 2;
87
+ }
@@ -28,8 +28,8 @@ option go_package = "go.temporal.io/api/namespace/v1;namespace";
28
28
  option java_package = "io.temporal.api.namespace.v1";
29
29
  option java_multiple_files = true;
30
30
  option java_outer_classname = "MessageProto";
31
- option ruby_package = "Temporal::Api::Namespace::V1";
32
- option csharp_namespace = "Temporal.Api.Namespace.V1";
31
+ option ruby_package = "Temporalio::Api::Namespace::V1";
32
+ option csharp_namespace = "Temporalio.Api.Namespace.V1";
33
33
 
34
34
  import "google/protobuf/duration.proto";
35
35
  import "google/protobuf/timestamp.proto";
@@ -28,8 +28,8 @@ option go_package = "go.temporal.io/api/operatorservice/v1;operatorservice";
28
28
  option java_package = "io.temporal.api.operatorservice.v1";
29
29
  option java_multiple_files = true;
30
30
  option java_outer_classname = "RequestResponseProto";
31
- option ruby_package = "Temporal::Api::OperatorService::V1";
32
- option csharp_namespace = "Temporal.Api.OperatorService.V1";
31
+ option ruby_package = "Temporalio::Api::OperatorService::V1";
32
+ option csharp_namespace = "Temporalio.Api.OperatorService.V1";
33
33
 
34
34
  import "temporal/api/enums/v1/common.proto";
35
35
 
@@ -28,8 +28,8 @@ option go_package = "go.temporal.io/api/operatorservice/v1;operatorservice";
28
28
  option java_package = "io.temporal.api.operatorservice.v1";
29
29
  option java_multiple_files = true;
30
30
  option java_outer_classname = "ServiceProto";
31
- option ruby_package = "Temporal::Api::OperatorService::V1";
32
- option csharp_namespace = "Temporal.Api.OperatorService.V1";
31
+ option ruby_package = "Temporalio::Api::OperatorService::V1";
32
+ option csharp_namespace = "Temporalio.Api.OperatorService.V1";
33
33
 
34
34
 
35
35
  import "temporal/api/operatorservice/v1/request_response.proto";
@@ -28,8 +28,8 @@ option go_package = "go.temporal.io/api/query/v1;query";
28
28
  option java_package = "io.temporal.api.query.v1";
29
29
  option java_multiple_files = true;
30
30
  option java_outer_classname = "MessageProto";
31
- option ruby_package = "Temporal::Api::Query::V1";
32
- option csharp_namespace = "Temporal.Api.Query.V1";
31
+ option ruby_package = "Temporalio::Api::Query::V1";
32
+ option csharp_namespace = "Temporalio.Api.Query.V1";
33
33
 
34
34
  import "temporal/api/enums/v1/query.proto";
35
35
  import "temporal/api/enums/v1/workflow.proto";
@@ -28,8 +28,8 @@ option go_package = "go.temporal.io/api/replication/v1;replication";
28
28
  option java_package = "io.temporal.api.replication.v1";
29
29
  option java_multiple_files = true;
30
30
  option java_outer_classname = "MessageProto";
31
- option ruby_package = "Temporal::Api::Replication::V1";
32
- option csharp_namespace = "Temporal.Api.Replication.V1";
31
+ option ruby_package = "Temporalio::Api::Replication::V1";
32
+ option csharp_namespace = "Temporalio.Api.Replication.V1";
33
33
 
34
34
  import "google/protobuf/timestamp.proto";
35
35
 
@@ -33,8 +33,8 @@ option go_package = "go.temporal.io/api/schedule/v1;schedule";
33
33
  option java_package = "io.temporal.api.schedule.v1";
34
34
  option java_multiple_files = true;
35
35
  option java_outer_classname = "MessageProto";
36
- option ruby_package = "Temporal::Api::Schedule::V1";
37
- option csharp_namespace = "Temporal.Api.Schedule.V1";
36
+ option ruby_package = "Temporalio::Api::Schedule::V1";
37
+ option csharp_namespace = "Temporalio.Api.Schedule.V1";
38
38
 
39
39
  import "google/protobuf/duration.proto";
40
40
  import "google/protobuf/timestamp.proto";
@@ -28,8 +28,8 @@ option go_package = "go.temporal.io/api/taskqueue/v1;taskqueue";
28
28
  option java_package = "io.temporal.api.taskqueue.v1";
29
29
  option java_multiple_files = true;
30
30
  option java_outer_classname = "MessageProto";
31
- option ruby_package = "Temporal::Api::TaskQueue::V1";
32
- option csharp_namespace = "Temporal.Api.TaskQueue.V1";
31
+ option ruby_package = "Temporalio::Api::TaskQueue::V1";
32
+ option csharp_namespace = "Temporalio.Api.TaskQueue.V1";
33
33
 
34
34
  import "google/protobuf/duration.proto";
35
35
  import "google/protobuf/timestamp.proto";