temporalio 0.0.1 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (310) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +180 -7
  3. data/bridge/Cargo.lock +208 -76
  4. data/bridge/Cargo.toml +5 -2
  5. data/bridge/sdk-core/Cargo.toml +1 -1
  6. data/bridge/sdk-core/README.md +20 -10
  7. data/bridge/sdk-core/client/Cargo.toml +1 -1
  8. data/bridge/sdk-core/client/src/lib.rs +227 -59
  9. data/bridge/sdk-core/client/src/metrics.rs +17 -8
  10. data/bridge/sdk-core/client/src/raw.rs +13 -12
  11. data/bridge/sdk-core/client/src/retry.rs +132 -43
  12. data/bridge/sdk-core/core/Cargo.toml +28 -15
  13. data/bridge/sdk-core/core/benches/workflow_replay.rs +13 -10
  14. data/bridge/sdk-core/core/src/abstractions.rs +225 -36
  15. data/bridge/sdk-core/core/src/core_tests/activity_tasks.rs +217 -79
  16. data/bridge/sdk-core/core/src/core_tests/determinism.rs +165 -2
  17. data/bridge/sdk-core/core/src/core_tests/local_activities.rs +565 -34
  18. data/bridge/sdk-core/core/src/core_tests/queries.rs +247 -90
  19. data/bridge/sdk-core/core/src/core_tests/workers.rs +3 -5
  20. data/bridge/sdk-core/core/src/core_tests/workflow_cancels.rs +1 -1
  21. data/bridge/sdk-core/core/src/core_tests/workflow_tasks.rs +430 -67
  22. data/bridge/sdk-core/core/src/ephemeral_server/mod.rs +106 -12
  23. data/bridge/sdk-core/core/src/internal_flags.rs +136 -0
  24. data/bridge/sdk-core/core/src/lib.rs +148 -34
  25. data/bridge/sdk-core/core/src/protosext/mod.rs +1 -1
  26. data/bridge/sdk-core/core/src/replay/mod.rs +185 -41
  27. data/bridge/sdk-core/core/src/telemetry/log_export.rs +190 -0
  28. data/bridge/sdk-core/core/src/telemetry/metrics.rs +219 -140
  29. data/bridge/sdk-core/core/src/telemetry/mod.rs +326 -315
  30. data/bridge/sdk-core/core/src/telemetry/prometheus_server.rs +20 -14
  31. data/bridge/sdk-core/core/src/test_help/mod.rs +85 -21
  32. data/bridge/sdk-core/core/src/worker/activities/activity_heartbeat_manager.rs +112 -156
  33. data/bridge/sdk-core/core/src/worker/activities/activity_task_poller_stream.rs +89 -0
  34. data/bridge/sdk-core/core/src/worker/activities/local_activities.rs +364 -128
  35. data/bridge/sdk-core/core/src/worker/activities.rs +263 -170
  36. data/bridge/sdk-core/core/src/worker/client/mocks.rs +23 -3
  37. data/bridge/sdk-core/core/src/worker/client.rs +48 -6
  38. data/bridge/sdk-core/core/src/worker/mod.rs +186 -75
  39. data/bridge/sdk-core/core/src/worker/workflow/bridge.rs +1 -3
  40. data/bridge/sdk-core/core/src/worker/workflow/driven_workflow.rs +13 -24
  41. data/bridge/sdk-core/core/src/worker/workflow/history_update.rs +879 -226
  42. data/bridge/sdk-core/core/src/worker/workflow/machines/activity_state_machine.rs +101 -48
  43. data/bridge/sdk-core/core/src/worker/workflow/machines/cancel_external_state_machine.rs +8 -12
  44. data/bridge/sdk-core/core/src/worker/workflow/machines/cancel_workflow_state_machine.rs +6 -9
  45. data/bridge/sdk-core/core/src/worker/workflow/machines/child_workflow_state_machine.rs +90 -32
  46. data/bridge/sdk-core/core/src/worker/workflow/machines/complete_workflow_state_machine.rs +6 -9
  47. data/bridge/sdk-core/core/src/worker/workflow/machines/continue_as_new_workflow_state_machine.rs +7 -10
  48. data/bridge/sdk-core/core/src/worker/workflow/machines/fail_workflow_state_machine.rs +6 -9
  49. data/bridge/sdk-core/core/src/worker/workflow/machines/local_activity_state_machine.rs +160 -83
  50. data/bridge/sdk-core/core/src/worker/workflow/machines/mod.rs +36 -54
  51. data/bridge/sdk-core/core/src/worker/workflow/machines/modify_workflow_properties_state_machine.rs +179 -0
  52. data/bridge/sdk-core/core/src/worker/workflow/machines/patch_state_machine.rs +104 -157
  53. data/bridge/sdk-core/core/src/worker/workflow/machines/signal_external_state_machine.rs +8 -12
  54. data/bridge/sdk-core/core/src/worker/workflow/machines/timer_state_machine.rs +9 -13
  55. data/bridge/sdk-core/core/src/worker/workflow/machines/transition_coverage.rs +10 -4
  56. data/bridge/sdk-core/core/src/worker/workflow/machines/upsert_search_attributes_state_machine.rs +14 -11
  57. data/bridge/sdk-core/core/src/worker/workflow/machines/workflow_machines/local_acts.rs +6 -17
  58. data/bridge/sdk-core/core/src/worker/workflow/machines/workflow_machines.rs +395 -299
  59. data/bridge/sdk-core/core/src/worker/workflow/machines/workflow_task_state_machine.rs +12 -20
  60. data/bridge/sdk-core/core/src/worker/workflow/managed_run/managed_wf_test.rs +33 -18
  61. data/bridge/sdk-core/core/src/worker/workflow/managed_run.rs +1032 -374
  62. data/bridge/sdk-core/core/src/worker/workflow/mod.rs +525 -392
  63. data/bridge/sdk-core/core/src/worker/workflow/run_cache.rs +40 -57
  64. data/bridge/sdk-core/core/src/worker/workflow/wft_extraction.rs +125 -0
  65. data/bridge/sdk-core/core/src/worker/workflow/wft_poller.rs +3 -6
  66. data/bridge/sdk-core/core/src/worker/workflow/workflow_stream/saved_wf_inputs.rs +117 -0
  67. data/bridge/sdk-core/core/src/worker/workflow/workflow_stream/tonic_status_serde.rs +24 -0
  68. data/bridge/sdk-core/core/src/worker/workflow/workflow_stream.rs +456 -681
  69. data/bridge/sdk-core/core-api/Cargo.toml +6 -4
  70. data/bridge/sdk-core/core-api/src/errors.rs +1 -34
  71. data/bridge/sdk-core/core-api/src/lib.rs +7 -45
  72. data/bridge/sdk-core/core-api/src/telemetry.rs +141 -0
  73. data/bridge/sdk-core/core-api/src/worker.rs +27 -1
  74. data/bridge/sdk-core/etc/deps.svg +115 -140
  75. data/bridge/sdk-core/etc/regen-depgraph.sh +5 -0
  76. data/bridge/sdk-core/fsm/rustfsm_procmacro/src/lib.rs +18 -15
  77. data/bridge/sdk-core/fsm/rustfsm_procmacro/tests/trybuild/no_handle_conversions_require_into_fail.stderr +1 -1
  78. data/bridge/sdk-core/fsm/rustfsm_trait/src/lib.rs +8 -3
  79. data/bridge/sdk-core/histories/evict_while_la_running_no_interference-16_history.bin +0 -0
  80. data/bridge/sdk-core/histories/evict_while_la_running_no_interference-23_history.bin +0 -0
  81. data/bridge/sdk-core/histories/evict_while_la_running_no_interference-85_history.bin +0 -0
  82. data/bridge/sdk-core/protos/api_upstream/buf.yaml +0 -3
  83. data/bridge/sdk-core/protos/api_upstream/build/go.mod +7 -0
  84. data/bridge/sdk-core/protos/api_upstream/build/go.sum +5 -0
  85. data/bridge/sdk-core/protos/api_upstream/{temporal/api/enums/v1/cluster.proto → build/tools.go} +7 -18
  86. data/bridge/sdk-core/protos/api_upstream/go.mod +6 -0
  87. data/bridge/sdk-core/protos/api_upstream/temporal/api/batch/v1/message.proto +12 -9
  88. data/bridge/sdk-core/protos/api_upstream/temporal/api/command/v1/message.proto +15 -26
  89. data/bridge/sdk-core/protos/api_upstream/temporal/api/common/v1/message.proto +13 -2
  90. data/bridge/sdk-core/protos/api_upstream/temporal/api/enums/v1/batch_operation.proto +3 -2
  91. data/bridge/sdk-core/protos/api_upstream/temporal/api/enums/v1/command_type.proto +4 -9
  92. data/bridge/sdk-core/protos/api_upstream/temporal/api/enums/v1/common.proto +3 -2
  93. data/bridge/sdk-core/protos/api_upstream/temporal/api/enums/v1/event_type.proto +10 -8
  94. data/bridge/sdk-core/protos/api_upstream/temporal/api/enums/v1/failed_cause.proto +28 -2
  95. data/bridge/sdk-core/protos/api_upstream/temporal/api/enums/v1/namespace.proto +2 -2
  96. data/bridge/sdk-core/protos/api_upstream/temporal/api/enums/v1/query.proto +2 -2
  97. data/bridge/sdk-core/protos/api_upstream/temporal/api/enums/v1/reset.proto +2 -2
  98. data/bridge/sdk-core/protos/api_upstream/temporal/api/enums/v1/schedule.proto +2 -2
  99. data/bridge/sdk-core/protos/api_upstream/temporal/api/enums/v1/task_queue.proto +2 -2
  100. data/bridge/sdk-core/protos/api_upstream/temporal/api/enums/v1/update.proto +24 -19
  101. data/bridge/sdk-core/protos/api_upstream/temporal/api/enums/v1/workflow.proto +2 -2
  102. data/bridge/sdk-core/protos/api_upstream/temporal/api/errordetails/v1/message.proto +2 -2
  103. data/bridge/sdk-core/protos/api_upstream/temporal/api/failure/v1/message.proto +2 -2
  104. data/bridge/sdk-core/protos/api_upstream/temporal/api/filter/v1/message.proto +2 -2
  105. data/bridge/sdk-core/protos/api_upstream/temporal/api/history/v1/message.proto +62 -26
  106. data/bridge/sdk-core/protos/api_upstream/temporal/api/namespace/v1/message.proto +4 -2
  107. data/bridge/sdk-core/protos/api_upstream/temporal/api/operatorservice/v1/request_response.proto +24 -61
  108. data/bridge/sdk-core/protos/api_upstream/temporal/api/operatorservice/v1/service.proto +2 -21
  109. data/bridge/sdk-core/protos/api_upstream/temporal/api/protocol/v1/message.proto +57 -0
  110. data/bridge/sdk-core/protos/api_upstream/temporal/api/query/v1/message.proto +2 -2
  111. data/bridge/sdk-core/protos/api_upstream/temporal/api/replication/v1/message.proto +2 -2
  112. data/bridge/sdk-core/protos/api_upstream/temporal/api/schedule/v1/message.proto +110 -31
  113. data/bridge/sdk-core/protos/api_upstream/temporal/api/sdk/v1/task_complete_metadata.proto +63 -0
  114. data/bridge/sdk-core/protos/api_upstream/temporal/api/taskqueue/v1/message.proto +4 -4
  115. data/bridge/sdk-core/protos/api_upstream/temporal/api/update/v1/message.proto +71 -6
  116. data/bridge/sdk-core/protos/api_upstream/temporal/api/version/v1/message.proto +2 -2
  117. data/bridge/sdk-core/protos/api_upstream/temporal/api/workflow/v1/message.proto +3 -2
  118. data/bridge/sdk-core/protos/api_upstream/temporal/api/workflowservice/v1/request_response.proto +111 -36
  119. data/bridge/sdk-core/protos/api_upstream/temporal/api/workflowservice/v1/service.proto +19 -5
  120. data/bridge/sdk-core/protos/local/temporal/sdk/core/activity_result/activity_result.proto +1 -0
  121. data/bridge/sdk-core/protos/local/temporal/sdk/core/activity_task/activity_task.proto +1 -0
  122. data/bridge/sdk-core/protos/local/temporal/sdk/core/child_workflow/child_workflow.proto +1 -0
  123. data/bridge/sdk-core/protos/local/temporal/sdk/core/common/common.proto +1 -0
  124. data/bridge/sdk-core/protos/local/temporal/sdk/core/core_interface.proto +1 -0
  125. data/bridge/sdk-core/protos/local/temporal/sdk/core/external_data/external_data.proto +1 -0
  126. data/bridge/sdk-core/protos/local/temporal/sdk/core/workflow_activation/workflow_activation.proto +9 -0
  127. data/bridge/sdk-core/protos/local/temporal/sdk/core/workflow_commands/workflow_commands.proto +9 -1
  128. data/bridge/sdk-core/protos/local/temporal/sdk/core/workflow_completion/workflow_completion.proto +6 -0
  129. data/bridge/sdk-core/protos/testsrv_upstream/temporal/api/testservice/v1/request_response.proto +2 -2
  130. data/bridge/sdk-core/protos/testsrv_upstream/temporal/api/testservice/v1/service.proto +2 -2
  131. data/bridge/sdk-core/sdk/Cargo.toml +4 -3
  132. data/bridge/sdk-core/sdk/src/interceptors.rs +36 -3
  133. data/bridge/sdk-core/sdk/src/lib.rs +94 -25
  134. data/bridge/sdk-core/sdk/src/workflow_context.rs +13 -2
  135. data/bridge/sdk-core/sdk/src/workflow_future.rs +10 -13
  136. data/bridge/sdk-core/sdk-core-protos/Cargo.toml +5 -2
  137. data/bridge/sdk-core/sdk-core-protos/build.rs +36 -2
  138. data/bridge/sdk-core/sdk-core-protos/src/history_builder.rs +164 -104
  139. data/bridge/sdk-core/sdk-core-protos/src/history_info.rs +27 -23
  140. data/bridge/sdk-core/sdk-core-protos/src/lib.rs +252 -74
  141. data/bridge/sdk-core/sdk-core-protos/src/task_token.rs +12 -2
  142. data/bridge/sdk-core/test-utils/Cargo.toml +4 -1
  143. data/bridge/sdk-core/test-utils/src/canned_histories.rs +106 -296
  144. data/bridge/sdk-core/test-utils/src/histfetch.rs +1 -1
  145. data/bridge/sdk-core/test-utils/src/lib.rs +161 -50
  146. data/bridge/sdk-core/test-utils/src/wf_input_saver.rs +50 -0
  147. data/bridge/sdk-core/test-utils/src/workflows.rs +29 -0
  148. data/bridge/sdk-core/tests/fuzzy_workflow.rs +130 -0
  149. data/bridge/sdk-core/tests/{load_tests.rs → heavy_tests.rs} +125 -51
  150. data/bridge/sdk-core/tests/integ_tests/ephemeral_server_tests.rs +25 -3
  151. data/bridge/sdk-core/tests/integ_tests/heartbeat_tests.rs +10 -5
  152. data/bridge/sdk-core/tests/integ_tests/metrics_tests.rs +239 -0
  153. data/bridge/sdk-core/tests/integ_tests/polling_tests.rs +4 -60
  154. data/bridge/sdk-core/tests/integ_tests/queries_tests.rs +5 -128
  155. data/bridge/sdk-core/tests/integ_tests/visibility_tests.rs +83 -25
  156. data/bridge/sdk-core/tests/integ_tests/workflow_tests/activities.rs +93 -69
  157. data/bridge/sdk-core/tests/integ_tests/workflow_tests/cancel_external.rs +1 -0
  158. data/bridge/sdk-core/tests/integ_tests/workflow_tests/cancel_wf.rs +6 -13
  159. data/bridge/sdk-core/tests/integ_tests/workflow_tests/child_workflows.rs +1 -0
  160. data/bridge/sdk-core/tests/integ_tests/workflow_tests/continue_as_new.rs +6 -2
  161. data/bridge/sdk-core/tests/integ_tests/workflow_tests/determinism.rs +3 -10
  162. data/bridge/sdk-core/tests/integ_tests/workflow_tests/local_activities.rs +151 -116
  163. data/bridge/sdk-core/tests/integ_tests/workflow_tests/modify_wf_properties.rs +54 -0
  164. data/bridge/sdk-core/tests/integ_tests/workflow_tests/patches.rs +7 -28
  165. data/bridge/sdk-core/tests/integ_tests/workflow_tests/replay.rs +115 -24
  166. data/bridge/sdk-core/tests/integ_tests/workflow_tests/resets.rs +1 -0
  167. data/bridge/sdk-core/tests/integ_tests/workflow_tests/signals.rs +18 -14
  168. data/bridge/sdk-core/tests/integ_tests/workflow_tests/stickyness.rs +6 -20
  169. data/bridge/sdk-core/tests/integ_tests/workflow_tests/timers.rs +10 -21
  170. data/bridge/sdk-core/tests/integ_tests/workflow_tests/upsert_search_attrs.rs +6 -4
  171. data/bridge/sdk-core/tests/integ_tests/workflow_tests.rs +27 -18
  172. data/bridge/sdk-core/tests/main.rs +8 -16
  173. data/bridge/sdk-core/tests/runner.rs +75 -36
  174. data/bridge/sdk-core/tests/wf_input_replay.rs +32 -0
  175. data/bridge/src/connection.rs +117 -82
  176. data/bridge/src/lib.rs +356 -42
  177. data/bridge/src/runtime.rs +10 -3
  178. data/bridge/src/test_server.rs +153 -0
  179. data/bridge/src/worker.rs +133 -9
  180. data/lib/gen/temporal/api/batch/v1/message_pb.rb +8 -6
  181. data/lib/gen/temporal/api/command/v1/message_pb.rb +10 -16
  182. data/lib/gen/temporal/api/common/v1/message_pb.rb +5 -1
  183. data/lib/gen/temporal/api/enums/v1/batch_operation_pb.rb +2 -1
  184. data/lib/gen/temporal/api/enums/v1/command_type_pb.rb +3 -3
  185. data/lib/gen/temporal/api/enums/v1/common_pb.rb +2 -1
  186. data/lib/gen/temporal/api/enums/v1/event_type_pb.rb +5 -4
  187. data/lib/gen/temporal/api/enums/v1/failed_cause_pb.rb +9 -1
  188. data/lib/gen/temporal/api/enums/v1/namespace_pb.rb +1 -1
  189. data/lib/gen/temporal/api/enums/v1/query_pb.rb +1 -1
  190. data/lib/gen/temporal/api/enums/v1/reset_pb.rb +1 -1
  191. data/lib/gen/temporal/api/enums/v1/schedule_pb.rb +1 -1
  192. data/lib/gen/temporal/api/enums/v1/task_queue_pb.rb +1 -1
  193. data/lib/gen/temporal/api/enums/v1/update_pb.rb +7 -10
  194. data/lib/gen/temporal/api/enums/v1/workflow_pb.rb +1 -1
  195. data/lib/gen/temporal/api/errordetails/v1/message_pb.rb +1 -1
  196. data/lib/gen/temporal/api/failure/v1/message_pb.rb +1 -1
  197. data/lib/gen/temporal/api/filter/v1/message_pb.rb +1 -1
  198. data/lib/gen/temporal/api/history/v1/message_pb.rb +34 -25
  199. data/lib/gen/temporal/api/namespace/v1/message_pb.rb +2 -1
  200. data/lib/gen/temporal/api/operatorservice/v1/request_response_pb.rb +14 -51
  201. data/lib/gen/temporal/api/operatorservice/v1/service_pb.rb +1 -1
  202. data/lib/gen/temporal/api/protocol/v1/message_pb.rb +30 -0
  203. data/lib/gen/temporal/api/query/v1/message_pb.rb +1 -1
  204. data/lib/gen/temporal/api/replication/v1/message_pb.rb +1 -1
  205. data/lib/gen/temporal/api/schedule/v1/message_pb.rb +22 -1
  206. data/lib/gen/temporal/api/sdk/v1/task_complete_metadata_pb.rb +23 -0
  207. data/lib/gen/temporal/api/taskqueue/v1/message_pb.rb +2 -2
  208. data/lib/gen/temporal/api/testservice/v1/request_response_pb.rb +49 -0
  209. data/lib/gen/temporal/api/testservice/v1/service_pb.rb +21 -0
  210. data/lib/gen/temporal/api/update/v1/message_pb.rb +49 -3
  211. data/lib/gen/temporal/api/version/v1/message_pb.rb +1 -1
  212. data/lib/gen/temporal/api/workflow/v1/message_pb.rb +2 -1
  213. data/lib/gen/temporal/api/workflowservice/v1/request_response_pb.rb +47 -20
  214. data/lib/gen/temporal/api/workflowservice/v1/service_pb.rb +1 -1
  215. data/lib/gen/temporal/sdk/core/activity_result/activity_result_pb.rb +13 -9
  216. data/lib/gen/temporal/sdk/core/activity_task/activity_task_pb.rb +10 -6
  217. data/lib/gen/temporal/sdk/core/child_workflow/child_workflow_pb.rb +13 -9
  218. data/lib/gen/temporal/sdk/core/common/common_pb.rb +7 -3
  219. data/lib/gen/temporal/sdk/core/core_interface_pb.rb +9 -3
  220. data/lib/gen/temporal/sdk/core/external_data/external_data_pb.rb +7 -3
  221. data/lib/gen/temporal/sdk/core/workflow_activation/workflow_activation_pb.rb +28 -21
  222. data/lib/gen/temporal/sdk/core/workflow_commands/workflow_commands_pb.rb +32 -24
  223. data/lib/gen/temporal/sdk/core/workflow_completion/workflow_completion_pb.rb +12 -5
  224. data/lib/temporalio/activity/context.rb +102 -0
  225. data/lib/temporalio/activity/info.rb +67 -0
  226. data/lib/temporalio/activity.rb +85 -0
  227. data/lib/temporalio/bridge/connect_options.rb +15 -0
  228. data/lib/temporalio/bridge/error.rb +8 -0
  229. data/lib/temporalio/bridge/retry_config.rb +24 -0
  230. data/lib/temporalio/bridge/tls_options.rb +19 -0
  231. data/lib/temporalio/bridge.rb +14 -0
  232. data/lib/{temporal → temporalio}/client/implementation.rb +57 -56
  233. data/lib/{temporal → temporalio}/client/workflow_handle.rb +35 -35
  234. data/lib/{temporal → temporalio}/client.rb +19 -32
  235. data/lib/temporalio/connection/retry_config.rb +44 -0
  236. data/lib/temporalio/connection/service.rb +20 -0
  237. data/lib/temporalio/connection/test_service.rb +92 -0
  238. data/lib/temporalio/connection/tls_options.rb +51 -0
  239. data/lib/temporalio/connection/workflow_service.rb +731 -0
  240. data/lib/temporalio/connection.rb +86 -0
  241. data/lib/{temporal → temporalio}/data_converter.rb +76 -35
  242. data/lib/{temporal → temporalio}/error/failure.rb +6 -6
  243. data/lib/{temporal → temporalio}/error/workflow_failure.rb +4 -2
  244. data/lib/{temporal → temporalio}/errors.rb +19 -1
  245. data/lib/{temporal → temporalio}/failure_converter/base.rb +5 -5
  246. data/lib/{temporal → temporalio}/failure_converter/basic.rb +58 -52
  247. data/lib/temporalio/failure_converter.rb +7 -0
  248. data/lib/temporalio/interceptor/activity_inbound.rb +22 -0
  249. data/lib/temporalio/interceptor/activity_outbound.rb +24 -0
  250. data/lib/{temporal → temporalio}/interceptor/chain.rb +7 -6
  251. data/lib/{temporal → temporalio}/interceptor/client.rb +27 -2
  252. data/lib/temporalio/interceptor.rb +22 -0
  253. data/lib/{temporal → temporalio}/payload_codec/base.rb +5 -5
  254. data/lib/{temporal → temporalio}/payload_converter/base.rb +3 -3
  255. data/lib/{temporal → temporalio}/payload_converter/bytes.rb +4 -3
  256. data/lib/{temporal → temporalio}/payload_converter/composite.rb +7 -5
  257. data/lib/{temporal → temporalio}/payload_converter/encoding_base.rb +4 -4
  258. data/lib/{temporal → temporalio}/payload_converter/json.rb +4 -3
  259. data/lib/{temporal → temporalio}/payload_converter/nil.rb +4 -3
  260. data/lib/temporalio/payload_converter.rb +14 -0
  261. data/lib/{temporal → temporalio}/retry_policy.rb +17 -7
  262. data/lib/{temporal → temporalio}/retry_state.rb +1 -1
  263. data/lib/temporalio/runtime.rb +25 -0
  264. data/lib/temporalio/testing/time_skipping_handle.rb +32 -0
  265. data/lib/temporalio/testing/time_skipping_interceptor.rb +23 -0
  266. data/lib/temporalio/testing/workflow_environment.rb +112 -0
  267. data/lib/temporalio/testing.rb +175 -0
  268. data/lib/{temporal → temporalio}/timeout_type.rb +2 -2
  269. data/lib/temporalio/version.rb +3 -0
  270. data/lib/temporalio/worker/activity_runner.rb +114 -0
  271. data/lib/temporalio/worker/activity_worker.rb +164 -0
  272. data/lib/temporalio/worker/reactor.rb +46 -0
  273. data/lib/temporalio/worker/runner.rb +63 -0
  274. data/lib/temporalio/worker/sync_worker.rb +124 -0
  275. data/lib/temporalio/worker/thread_pool_executor.rb +51 -0
  276. data/lib/temporalio/worker.rb +204 -0
  277. data/lib/temporalio/workflow/async.rb +46 -0
  278. data/lib/{temporal → temporalio}/workflow/execution_info.rb +4 -4
  279. data/lib/{temporal → temporalio}/workflow/execution_status.rb +1 -1
  280. data/lib/temporalio/workflow/future.rb +138 -0
  281. data/lib/{temporal → temporalio}/workflow/id_reuse_policy.rb +6 -6
  282. data/lib/temporalio/workflow/info.rb +76 -0
  283. data/lib/{temporal → temporalio}/workflow/query_reject_condition.rb +5 -5
  284. data/lib/temporalio.rb +12 -3
  285. data/temporalio.gemspec +11 -6
  286. metadata +137 -64
  287. data/bridge/sdk-core/Cargo.lock +0 -2606
  288. data/bridge/sdk-core/bridge-ffi/Cargo.toml +0 -24
  289. data/bridge/sdk-core/bridge-ffi/LICENSE.txt +0 -23
  290. data/bridge/sdk-core/bridge-ffi/build.rs +0 -25
  291. data/bridge/sdk-core/bridge-ffi/include/sdk-core-bridge.h +0 -249
  292. data/bridge/sdk-core/bridge-ffi/src/lib.rs +0 -825
  293. data/bridge/sdk-core/bridge-ffi/src/wrappers.rs +0 -211
  294. data/bridge/sdk-core/core/src/log_export.rs +0 -62
  295. data/bridge/sdk-core/core/src/worker/workflow/machines/mutable_side_effect_state_machine.rs +0 -127
  296. data/bridge/sdk-core/core/src/worker/workflow/machines/side_effect_state_machine.rs +0 -71
  297. data/bridge/sdk-core/protos/api_upstream/temporal/api/cluster/v1/message.proto +0 -83
  298. data/bridge/sdk-core/protos/local/temporal/sdk/core/bridge/bridge.proto +0 -210
  299. data/bridge/sdk-core/sdk/src/conversions.rs +0 -8
  300. data/lib/bridge.so +0 -0
  301. data/lib/gen/temporal/api/cluster/v1/message_pb.rb +0 -67
  302. data/lib/gen/temporal/api/enums/v1/cluster_pb.rb +0 -26
  303. data/lib/gen/temporal/sdk/core/bridge/bridge_pb.rb +0 -222
  304. data/lib/temporal/bridge.rb +0 -14
  305. data/lib/temporal/connection.rb +0 -736
  306. data/lib/temporal/failure_converter.rb +0 -8
  307. data/lib/temporal/payload_converter.rb +0 -14
  308. data/lib/temporal/runtime.rb +0 -22
  309. data/lib/temporal/version.rb +0 -3
  310. data/lib/temporal.rb +0 -8
@@ -5,23 +5,20 @@ require 'google/protobuf'
5
5
 
6
6
  Google::Protobuf::DescriptorPool.generated_pool.build do
7
7
  add_file("temporal/api/enums/v1/update.proto", :syntax => :proto3) do
8
- add_enum "temporal.api.enums.v1.WorkflowUpdateResultAccessStyle" do
9
- value :WORKFLOW_UPDATE_RESULT_ACCESS_STYLE_UNSPECIFIED, 0
10
- value :WORKFLOW_UPDATE_RESULT_ACCESS_STYLE_REQUIRE_INLINE, 1
11
- end
12
- add_enum "temporal.api.enums.v1.WorkflowUpdateDurabilityPreference" do
13
- value :WORKFLOW_UPDATE_DURABILITY_PREFERENCE_UNSPECIFIED, 0
14
- value :WORKFLOW_UPDATE_DURABILITY_PREFERENCE_BYPASS, 1
8
+ add_enum "temporal.api.enums.v1.UpdateWorkflowExecutionLifecycleStage" do
9
+ value :UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_UNSPECIFIED, 0
10
+ value :UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_ADMITTED, 1
11
+ value :UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_ACCEPTED, 2
12
+ value :UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_COMPLETED, 3
15
13
  end
16
14
  end
17
15
  end
18
16
 
19
- module Temporal
17
+ module Temporalio
20
18
  module Api
21
19
  module Enums
22
20
  module V1
23
- WorkflowUpdateResultAccessStyle = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.enums.v1.WorkflowUpdateResultAccessStyle").enummodule
24
- WorkflowUpdateDurabilityPreference = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.enums.v1.WorkflowUpdateDurabilityPreference").enummodule
21
+ UpdateWorkflowExecutionLifecycleStage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.enums.v1.UpdateWorkflowExecutionLifecycleStage").enummodule
25
22
  end
26
23
  end
27
24
  end
@@ -70,7 +70,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
70
70
  end
71
71
  end
72
72
 
73
- module Temporal
73
+ module Temporalio
74
74
  module Api
75
75
  module Enums
76
76
  module V1
@@ -60,7 +60,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
60
60
  end
61
61
  end
62
62
 
63
- module Temporal
63
+ module Temporalio
64
64
  module Api
65
65
  module ErrorDetails
66
66
  module V1
@@ -64,7 +64,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
64
64
  end
65
65
  end
66
66
 
67
- module Temporal
67
+ module Temporalio
68
68
  module Api
69
69
  module Failure
70
70
  module V1
@@ -26,7 +26,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
26
26
  end
27
27
  end
28
28
 
29
- module Temporal
29
+ module Temporalio
30
30
  module Api
31
31
  module Filter
32
32
  module V1
@@ -14,6 +14,7 @@ require 'temporal/api/failure/v1/message_pb'
14
14
  require 'temporal/api/taskqueue/v1/message_pb'
15
15
  require 'temporal/api/update/v1/message_pb'
16
16
  require 'temporal/api/workflow/v1/message_pb'
17
+ require 'temporal/api/sdk/v1/task_complete_metadata_pb'
17
18
 
18
19
  Google::Protobuf::DescriptorPool.generated_pool.build do
19
20
  add_file("temporal/api/history/v1/message.proto", :syntax => :proto3) do
@@ -94,6 +95,9 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
94
95
  optional :started_event_id, :int64, 2
95
96
  optional :identity, :string, 3
96
97
  optional :binary_checksum, :string, 4
98
+ optional :worker_versioning_id, :message, 5, "temporal.api.taskqueue.v1.VersionId"
99
+ optional :sdk_metadata, :message, 6, "temporal.api.sdk.v1.WorkflowTaskCompletedMetadata"
100
+ optional :metering_metadata, :message, 13, "temporal.api.common.v1.MeteringMetadata"
97
101
  end
98
102
  add_message "temporal.api.history.v1.WorkflowTaskTimedOutEventAttributes" do
99
103
  optional :scheduled_event_id, :int64, 1
@@ -259,6 +263,10 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
259
263
  optional :workflow_task_completed_event_id, :int64, 1
260
264
  optional :search_attributes, :message, 2, "temporal.api.common.v1.SearchAttributes"
261
265
  end
266
+ add_message "temporal.api.history.v1.WorkflowPropertiesModifiedEventAttributes" do
267
+ optional :workflow_task_completed_event_id, :int64, 1
268
+ optional :upserted_memo, :message, 2, "temporal.api.common.v1.Memo"
269
+ end
262
270
  add_message "temporal.api.history.v1.StartChildWorkflowExecutionInitiatedEventAttributes" do
263
271
  optional :namespace, :string, 1
264
272
  optional :namespace_id, :string, 18
@@ -342,24 +350,6 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
342
350
  optional :initiated_event_id, :int64, 4
343
351
  optional :started_event_id, :int64, 5
344
352
  end
345
- add_message "temporal.api.history.v1.WorkflowUpdateRequestedEventAttributes" do
346
- optional :header, :message, 1, "temporal.api.common.v1.Header"
347
- optional :request_id, :string, 2
348
- optional :update_id, :string, 3
349
- optional :update, :message, 4, "temporal.api.update.v1.WorkflowUpdate"
350
- end
351
- add_message "temporal.api.history.v1.WorkflowUpdateAcceptedEventAttributes" do
352
- optional :header, :message, 1, "temporal.api.common.v1.Header"
353
- optional :update_id, :string, 2
354
- end
355
- add_message "temporal.api.history.v1.WorkflowUpdateCompletedEventAttributes" do
356
- optional :system_header, :message, 1, "temporal.api.common.v1.Header"
357
- optional :update_id, :string, 3
358
- oneof :result do
359
- optional :success, :message, 4, "temporal.api.common.v1.Payloads"
360
- optional :failure, :message, 5, "temporal.api.failure.v1.Failure"
361
- end
362
- end
363
353
  add_message "temporal.api.history.v1.WorkflowPropertiesModifiedExternallyEventAttributes" do
364
354
  optional :new_task_queue, :string, 1
365
355
  optional :new_workflow_task_timeout, :message, 2, "google.protobuf.Duration"
@@ -371,6 +361,23 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
371
361
  optional :scheduled_event_id, :int64, 1
372
362
  optional :new_retry_policy, :message, 2, "temporal.api.common.v1.RetryPolicy"
373
363
  end
364
+ add_message "temporal.api.history.v1.WorkflowExecutionUpdateAcceptedEventAttributes" do
365
+ optional :protocol_instance_id, :string, 1
366
+ optional :accepted_request_message_id, :string, 2
367
+ optional :accepted_request_sequencing_event_id, :int64, 3
368
+ optional :accepted_request, :message, 4, "temporal.api.update.v1.Request"
369
+ end
370
+ add_message "temporal.api.history.v1.WorkflowExecutionUpdateCompletedEventAttributes" do
371
+ optional :meta, :message, 1, "temporal.api.update.v1.Meta"
372
+ optional :outcome, :message, 2, "temporal.api.update.v1.Outcome"
373
+ end
374
+ add_message "temporal.api.history.v1.WorkflowExecutionUpdateRejectedEventAttributes" do
375
+ optional :protocol_instance_id, :string, 1
376
+ optional :rejected_request_message_id, :string, 2
377
+ optional :rejected_request_sequencing_event_id, :int64, 3
378
+ optional :rejected_request, :message, 4, "temporal.api.update.v1.Request"
379
+ optional :failure, :message, 5, "temporal.api.failure.v1.Failure"
380
+ end
374
381
  add_message "temporal.api.history.v1.HistoryEvent" do
375
382
  optional :event_id, :int64, 1
376
383
  optional :event_time, :message, 2, "google.protobuf.Timestamp"
@@ -419,11 +426,12 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
419
426
  optional :signal_external_workflow_execution_failed_event_attributes, :message, 43, "temporal.api.history.v1.SignalExternalWorkflowExecutionFailedEventAttributes"
420
427
  optional :external_workflow_execution_signaled_event_attributes, :message, 44, "temporal.api.history.v1.ExternalWorkflowExecutionSignaledEventAttributes"
421
428
  optional :upsert_workflow_search_attributes_event_attributes, :message, 45, "temporal.api.history.v1.UpsertWorkflowSearchAttributesEventAttributes"
422
- optional :workflow_update_requested_event_attributes, :message, 46, "temporal.api.history.v1.WorkflowUpdateRequestedEventAttributes"
423
- optional :workflow_update_accepted_event_attributes, :message, 47, "temporal.api.history.v1.WorkflowUpdateAcceptedEventAttributes"
424
- optional :workflow_update_completed_event_attributes, :message, 48, "temporal.api.history.v1.WorkflowUpdateCompletedEventAttributes"
429
+ optional :workflow_execution_update_accepted_event_attributes, :message, 46, "temporal.api.history.v1.WorkflowExecutionUpdateAcceptedEventAttributes"
430
+ optional :workflow_execution_update_rejected_event_attributes, :message, 47, "temporal.api.history.v1.WorkflowExecutionUpdateRejectedEventAttributes"
431
+ optional :workflow_execution_update_completed_event_attributes, :message, 48, "temporal.api.history.v1.WorkflowExecutionUpdateCompletedEventAttributes"
425
432
  optional :workflow_properties_modified_externally_event_attributes, :message, 49, "temporal.api.history.v1.WorkflowPropertiesModifiedExternallyEventAttributes"
426
433
  optional :activity_properties_modified_externally_event_attributes, :message, 50, "temporal.api.history.v1.ActivityPropertiesModifiedExternallyEventAttributes"
434
+ optional :workflow_properties_modified_event_attributes, :message, 51, "temporal.api.history.v1.WorkflowPropertiesModifiedEventAttributes"
427
435
  end
428
436
  end
429
437
  add_message "temporal.api.history.v1.History" do
@@ -432,7 +440,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
432
440
  end
433
441
  end
434
442
 
435
- module Temporal
443
+ module Temporalio
436
444
  module Api
437
445
  module History
438
446
  module V1
@@ -468,6 +476,7 @@ module Temporal
468
476
  SignalExternalWorkflowExecutionFailedEventAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.history.v1.SignalExternalWorkflowExecutionFailedEventAttributes").msgclass
469
477
  ExternalWorkflowExecutionSignaledEventAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.history.v1.ExternalWorkflowExecutionSignaledEventAttributes").msgclass
470
478
  UpsertWorkflowSearchAttributesEventAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.history.v1.UpsertWorkflowSearchAttributesEventAttributes").msgclass
479
+ WorkflowPropertiesModifiedEventAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.history.v1.WorkflowPropertiesModifiedEventAttributes").msgclass
471
480
  StartChildWorkflowExecutionInitiatedEventAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.history.v1.StartChildWorkflowExecutionInitiatedEventAttributes").msgclass
472
481
  StartChildWorkflowExecutionFailedEventAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.history.v1.StartChildWorkflowExecutionFailedEventAttributes").msgclass
473
482
  ChildWorkflowExecutionStartedEventAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.history.v1.ChildWorkflowExecutionStartedEventAttributes").msgclass
@@ -476,11 +485,11 @@ module Temporal
476
485
  ChildWorkflowExecutionCanceledEventAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.history.v1.ChildWorkflowExecutionCanceledEventAttributes").msgclass
477
486
  ChildWorkflowExecutionTimedOutEventAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.history.v1.ChildWorkflowExecutionTimedOutEventAttributes").msgclass
478
487
  ChildWorkflowExecutionTerminatedEventAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.history.v1.ChildWorkflowExecutionTerminatedEventAttributes").msgclass
479
- WorkflowUpdateRequestedEventAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.history.v1.WorkflowUpdateRequestedEventAttributes").msgclass
480
- WorkflowUpdateAcceptedEventAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.history.v1.WorkflowUpdateAcceptedEventAttributes").msgclass
481
- WorkflowUpdateCompletedEventAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.history.v1.WorkflowUpdateCompletedEventAttributes").msgclass
482
488
  WorkflowPropertiesModifiedExternallyEventAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.history.v1.WorkflowPropertiesModifiedExternallyEventAttributes").msgclass
483
489
  ActivityPropertiesModifiedExternallyEventAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.history.v1.ActivityPropertiesModifiedExternallyEventAttributes").msgclass
490
+ WorkflowExecutionUpdateAcceptedEventAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.history.v1.WorkflowExecutionUpdateAcceptedEventAttributes").msgclass
491
+ WorkflowExecutionUpdateCompletedEventAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.history.v1.WorkflowExecutionUpdateCompletedEventAttributes").msgclass
492
+ WorkflowExecutionUpdateRejectedEventAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.history.v1.WorkflowExecutionUpdateRejectedEventAttributes").msgclass
484
493
  HistoryEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.history.v1.HistoryEvent").msgclass
485
494
  History = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.history.v1.History").msgclass
486
495
  end
@@ -26,6 +26,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
26
26
  optional :history_archival_uri, :string, 4
27
27
  optional :visibility_archival_state, :enum, 5, "temporal.api.enums.v1.ArchivalState"
28
28
  optional :visibility_archival_uri, :string, 6
29
+ map :custom_search_attribute_aliases, :string, :string, 7
29
30
  end
30
31
  add_message "temporal.api.namespace.v1.BadBinaries" do
31
32
  map :binaries, :string, :message, 1, "temporal.api.namespace.v1.BadBinaryInfo"
@@ -47,7 +48,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
47
48
  end
48
49
  end
49
50
 
50
- module Temporal
51
+ module Temporalio
51
52
  module Api
52
53
  module Namespace
53
54
  module V1
@@ -3,28 +3,24 @@
3
3
 
4
4
  require 'google/protobuf'
5
5
 
6
- require 'dependencies/gogoproto/gogo_pb'
7
- require 'google/protobuf/timestamp_pb'
8
- require 'google/protobuf/duration_pb'
9
- require 'temporal/api/cluster/v1/message_pb'
10
- require 'temporal/api/common/v1/message_pb'
11
- require 'temporal/api/enums/v1/cluster_pb'
12
6
  require 'temporal/api/enums/v1/common_pb'
13
- require 'temporal/api/version/v1/message_pb'
14
7
 
15
8
  Google::Protobuf::DescriptorPool.generated_pool.build do
16
9
  add_file("temporal/api/operatorservice/v1/request_response.proto", :syntax => :proto3) do
17
10
  add_message "temporal.api.operatorservice.v1.AddSearchAttributesRequest" do
18
11
  map :search_attributes, :string, :enum, 1, "temporal.api.enums.v1.IndexedValueType"
12
+ optional :namespace, :string, 2
19
13
  end
20
14
  add_message "temporal.api.operatorservice.v1.AddSearchAttributesResponse" do
21
15
  end
22
16
  add_message "temporal.api.operatorservice.v1.RemoveSearchAttributesRequest" do
23
17
  repeated :search_attributes, :string, 1
18
+ optional :namespace, :string, 2
24
19
  end
25
20
  add_message "temporal.api.operatorservice.v1.RemoveSearchAttributesResponse" do
26
21
  end
27
22
  add_message "temporal.api.operatorservice.v1.ListSearchAttributesRequest" do
23
+ optional :namespace, :string, 1
28
24
  end
29
25
  add_message "temporal.api.operatorservice.v1.ListSearchAttributesResponse" do
30
26
  map :custom_attributes, :string, :enum, 1, "temporal.api.enums.v1.IndexedValueType"
@@ -37,12 +33,6 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
37
33
  add_message "temporal.api.operatorservice.v1.DeleteNamespaceResponse" do
38
34
  optional :deleted_namespace, :string, 1
39
35
  end
40
- add_message "temporal.api.operatorservice.v1.DeleteWorkflowExecutionRequest" do
41
- optional :namespace, :string, 1
42
- optional :workflow_execution, :message, 2, "temporal.api.common.v1.WorkflowExecution"
43
- end
44
- add_message "temporal.api.operatorservice.v1.DeleteWorkflowExecutionResponse" do
45
- end
46
36
  add_message "temporal.api.operatorservice.v1.AddOrUpdateRemoteClusterRequest" do
47
37
  optional :frontend_address, :string, 1
48
38
  optional :enable_remote_cluster_connection, :bool, 2
@@ -54,48 +44,26 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
54
44
  end
55
45
  add_message "temporal.api.operatorservice.v1.RemoveRemoteClusterResponse" do
56
46
  end
57
- add_message "temporal.api.operatorservice.v1.DescribeClusterRequest" do
58
- optional :cluster_name, :string, 1
59
- end
60
- add_message "temporal.api.operatorservice.v1.DescribeClusterResponse" do
61
- map :supported_clients, :string, :string, 1
62
- optional :server_version, :string, 2
63
- optional :membership_info, :message, 3, "temporal.api.cluster.v1.MembershipInfo"
64
- optional :cluster_id, :string, 4
65
- optional :cluster_name, :string, 5
66
- optional :history_shard_count, :int32, 6
67
- optional :persistence_store, :string, 7
68
- optional :visibility_store, :string, 8
69
- optional :version_info, :message, 9, "temporal.api.version.v1.VersionInfo"
70
- optional :failover_version_increment, :int64, 10
71
- optional :initial_failover_version, :int64, 11
72
- optional :is_global_namespace_enabled, :bool, 12
73
- end
74
47
  add_message "temporal.api.operatorservice.v1.ListClustersRequest" do
75
48
  optional :page_size, :int32, 1
76
49
  optional :next_page_token, :bytes, 2
77
50
  end
78
51
  add_message "temporal.api.operatorservice.v1.ListClustersResponse" do
79
- repeated :clusters, :message, 1, "temporal.api.cluster.v1.ClusterMetadata"
80
- optional :next_page_token, :bytes, 2
52
+ repeated :clusters, :message, 1, "temporal.api.operatorservice.v1.ClusterMetadata"
53
+ optional :next_page_token, :bytes, 4
81
54
  end
82
- add_message "temporal.api.operatorservice.v1.ListClusterMembersRequest" do
83
- optional :last_heartbeat_within, :message, 1, "google.protobuf.Duration"
84
- optional :rpc_address, :string, 2
85
- optional :host_id, :string, 3
86
- optional :role, :enum, 4, "temporal.api.enums.v1.ClusterMemberRole"
87
- optional :session_started_after_time, :message, 5, "google.protobuf.Timestamp"
88
- optional :page_size, :int32, 6
89
- optional :next_page_token, :bytes, 7
90
- end
91
- add_message "temporal.api.operatorservice.v1.ListClusterMembersResponse" do
92
- repeated :active_members, :message, 1, "temporal.api.cluster.v1.ClusterMember"
93
- optional :next_page_token, :bytes, 2
55
+ add_message "temporal.api.operatorservice.v1.ClusterMetadata" do
56
+ optional :cluster_name, :string, 1
57
+ optional :cluster_id, :string, 2
58
+ optional :address, :string, 3
59
+ optional :initial_failover_version, :int64, 4
60
+ optional :history_shard_count, :int32, 5
61
+ optional :is_connection_enabled, :bool, 6
94
62
  end
95
63
  end
96
64
  end
97
65
 
98
- module Temporal
66
+ module Temporalio
99
67
  module Api
100
68
  module OperatorService
101
69
  module V1
@@ -107,18 +75,13 @@ module Temporal
107
75
  ListSearchAttributesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.operatorservice.v1.ListSearchAttributesResponse").msgclass
108
76
  DeleteNamespaceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.operatorservice.v1.DeleteNamespaceRequest").msgclass
109
77
  DeleteNamespaceResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.operatorservice.v1.DeleteNamespaceResponse").msgclass
110
- DeleteWorkflowExecutionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.operatorservice.v1.DeleteWorkflowExecutionRequest").msgclass
111
- DeleteWorkflowExecutionResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.operatorservice.v1.DeleteWorkflowExecutionResponse").msgclass
112
78
  AddOrUpdateRemoteClusterRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.operatorservice.v1.AddOrUpdateRemoteClusterRequest").msgclass
113
79
  AddOrUpdateRemoteClusterResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.operatorservice.v1.AddOrUpdateRemoteClusterResponse").msgclass
114
80
  RemoveRemoteClusterRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.operatorservice.v1.RemoveRemoteClusterRequest").msgclass
115
81
  RemoveRemoteClusterResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.operatorservice.v1.RemoveRemoteClusterResponse").msgclass
116
- DescribeClusterRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.operatorservice.v1.DescribeClusterRequest").msgclass
117
- DescribeClusterResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.operatorservice.v1.DescribeClusterResponse").msgclass
118
82
  ListClustersRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.operatorservice.v1.ListClustersRequest").msgclass
119
83
  ListClustersResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.operatorservice.v1.ListClustersResponse").msgclass
120
- ListClusterMembersRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.operatorservice.v1.ListClusterMembersRequest").msgclass
121
- ListClusterMembersResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.operatorservice.v1.ListClusterMembersResponse").msgclass
84
+ ClusterMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.operatorservice.v1.ClusterMetadata").msgclass
122
85
  end
123
86
  end
124
87
  end
@@ -10,7 +10,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
10
10
  end
11
11
  end
12
12
 
13
- module Temporal
13
+ module Temporalio
14
14
  module Api
15
15
  module OperatorService
16
16
  module V1
@@ -0,0 +1,30 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: temporal/api/protocol/v1/message.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ require 'google/protobuf/any_pb'
7
+
8
+ Google::Protobuf::DescriptorPool.generated_pool.build do
9
+ add_file("temporal/api/protocol/v1/message.proto", :syntax => :proto3) do
10
+ add_message "temporal.api.protocol.v1.Message" do
11
+ optional :id, :string, 1
12
+ optional :protocol_instance_id, :string, 2
13
+ optional :body, :message, 5, "google.protobuf.Any"
14
+ oneof :sequencing_id do
15
+ optional :event_id, :int64, 3
16
+ optional :command_index, :int64, 4
17
+ end
18
+ end
19
+ end
20
+ end
21
+
22
+ module Temporalio
23
+ module Api
24
+ module Protocol
25
+ module V1
26
+ Message = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.protocol.v1.Message").msgclass
27
+ end
28
+ end
29
+ end
30
+ end
@@ -25,7 +25,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
25
25
  end
26
26
  end
27
27
 
28
- module Temporal
28
+ module Temporalio
29
29
  module Api
30
30
  module Query
31
31
  module V1
@@ -24,7 +24,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
24
24
  end
25
25
  end
26
26
 
27
- module Temporal
27
+ module Temporalio
28
28
  module Api
29
29
  module Replication
30
30
  module V1
@@ -20,15 +20,34 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
20
20
  optional :month, :string, 5
21
21
  optional :year, :string, 6
22
22
  optional :day_of_week, :string, 7
23
+ optional :comment, :string, 8
24
+ end
25
+ add_message "temporal.api.schedule.v1.Range" do
26
+ optional :start, :int32, 1
27
+ optional :end, :int32, 2
28
+ optional :step, :int32, 3
29
+ end
30
+ add_message "temporal.api.schedule.v1.StructuredCalendarSpec" do
31
+ repeated :second, :message, 1, "temporal.api.schedule.v1.Range"
32
+ repeated :minute, :message, 2, "temporal.api.schedule.v1.Range"
33
+ repeated :hour, :message, 3, "temporal.api.schedule.v1.Range"
34
+ repeated :day_of_month, :message, 4, "temporal.api.schedule.v1.Range"
35
+ repeated :month, :message, 5, "temporal.api.schedule.v1.Range"
36
+ repeated :year, :message, 6, "temporal.api.schedule.v1.Range"
37
+ repeated :day_of_week, :message, 7, "temporal.api.schedule.v1.Range"
38
+ optional :comment, :string, 8
23
39
  end
24
40
  add_message "temporal.api.schedule.v1.IntervalSpec" do
25
41
  optional :interval, :message, 1, "google.protobuf.Duration"
26
42
  optional :phase, :message, 2, "google.protobuf.Duration"
27
43
  end
28
44
  add_message "temporal.api.schedule.v1.ScheduleSpec" do
45
+ repeated :structured_calendar, :message, 7, "temporal.api.schedule.v1.StructuredCalendarSpec"
46
+ repeated :cron_string, :string, 8
29
47
  repeated :calendar, :message, 1, "temporal.api.schedule.v1.CalendarSpec"
30
48
  repeated :interval, :message, 2, "temporal.api.schedule.v1.IntervalSpec"
31
49
  repeated :exclude_calendar, :message, 3, "temporal.api.schedule.v1.CalendarSpec"
50
+ repeated :exclude_structured_calendar, :message, 9, "temporal.api.schedule.v1.StructuredCalendarSpec"
32
51
  optional :start_time, :message, 4, "google.protobuf.Timestamp"
33
52
  optional :end_time, :message, 5, "google.protobuf.Timestamp"
34
53
  optional :jitter, :message, 6, "google.protobuf.Duration"
@@ -104,11 +123,13 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
104
123
  end
105
124
  end
106
125
 
107
- module Temporal
126
+ module Temporalio
108
127
  module Api
109
128
  module Schedule
110
129
  module V1
111
130
  CalendarSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.schedule.v1.CalendarSpec").msgclass
131
+ Range = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.schedule.v1.Range").msgclass
132
+ StructuredCalendarSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.schedule.v1.StructuredCalendarSpec").msgclass
112
133
  IntervalSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.schedule.v1.IntervalSpec").msgclass
113
134
  ScheduleSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.schedule.v1.ScheduleSpec").msgclass
114
135
  SchedulePolicies = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.schedule.v1.SchedulePolicies").msgclass
@@ -0,0 +1,23 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: temporal/api/sdk/v1/task_complete_metadata.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ Google::Protobuf::DescriptorPool.generated_pool.build do
7
+ add_file("temporal/api/sdk/v1/task_complete_metadata.proto", :syntax => :proto3) do
8
+ add_message "temporal.api.sdk.v1.WorkflowTaskCompletedMetadata" do
9
+ repeated :core_used_flags, :uint32, 1
10
+ repeated :lang_used_flags, :uint32, 2
11
+ end
12
+ end
13
+ end
14
+
15
+ module Temporalio
16
+ module Api
17
+ module Sdk
18
+ module V1
19
+ WorkflowTaskCompletedMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.sdk.v1.WorkflowTaskCompletedMetadata").msgclass
20
+ end
21
+ end
22
+ end
23
+ end
@@ -37,7 +37,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
37
37
  optional :last_access_time, :message, 1, "google.protobuf.Timestamp"
38
38
  optional :identity, :string, 2
39
39
  optional :rate_per_second, :double, 3
40
- optional :worker_versioning_build_id, :string, 4
40
+ optional :worker_versioning_id, :message, 4, "temporal.api.taskqueue.v1.VersionId"
41
41
  end
42
42
  add_message "temporal.api.taskqueue.v1.StickyExecutionAttributes" do
43
43
  optional :worker_task_queue, :message, 1, "temporal.api.taskqueue.v1.TaskQueue"
@@ -54,7 +54,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
54
54
  end
55
55
  end
56
56
 
57
- module Temporal
57
+ module Temporalio
58
58
  module Api
59
59
  module TaskQueue
60
60
  module V1
@@ -0,0 +1,49 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: temporal/api/testservice/v1/request_response.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ require 'google/protobuf/duration_pb'
7
+ require 'google/protobuf/timestamp_pb'
8
+ require 'dependencies/gogoproto/gogo_pb'
9
+
10
+ Google::Protobuf::DescriptorPool.generated_pool.build do
11
+ add_file("temporal/api/testservice/v1/request_response.proto", :syntax => :proto3) do
12
+ add_message "temporal.api.testservice.v1.LockTimeSkippingRequest" do
13
+ end
14
+ add_message "temporal.api.testservice.v1.LockTimeSkippingResponse" do
15
+ end
16
+ add_message "temporal.api.testservice.v1.UnlockTimeSkippingRequest" do
17
+ end
18
+ add_message "temporal.api.testservice.v1.UnlockTimeSkippingResponse" do
19
+ end
20
+ add_message "temporal.api.testservice.v1.SleepUntilRequest" do
21
+ optional :timestamp, :message, 1, "google.protobuf.Timestamp"
22
+ end
23
+ add_message "temporal.api.testservice.v1.SleepRequest" do
24
+ optional :duration, :message, 1, "google.protobuf.Duration"
25
+ end
26
+ add_message "temporal.api.testservice.v1.SleepResponse" do
27
+ end
28
+ add_message "temporal.api.testservice.v1.GetCurrentTimeResponse" do
29
+ optional :time, :message, 1, "google.protobuf.Timestamp"
30
+ end
31
+ end
32
+ end
33
+
34
+ module Temporalio
35
+ module Api
36
+ module TestService
37
+ module V1
38
+ LockTimeSkippingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.testservice.v1.LockTimeSkippingRequest").msgclass
39
+ LockTimeSkippingResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.testservice.v1.LockTimeSkippingResponse").msgclass
40
+ UnlockTimeSkippingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.testservice.v1.UnlockTimeSkippingRequest").msgclass
41
+ UnlockTimeSkippingResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.testservice.v1.UnlockTimeSkippingResponse").msgclass
42
+ SleepUntilRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.testservice.v1.SleepUntilRequest").msgclass
43
+ SleepRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.testservice.v1.SleepRequest").msgclass
44
+ SleepResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.testservice.v1.SleepResponse").msgclass
45
+ GetCurrentTimeResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.testservice.v1.GetCurrentTimeResponse").msgclass
46
+ end
47
+ end
48
+ end
49
+ end
@@ -0,0 +1,21 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: temporal/api/testservice/v1/service.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ require 'temporal/api/testservice/v1/request_response_pb'
7
+ require 'google/protobuf/empty_pb'
8
+
9
+ Google::Protobuf::DescriptorPool.generated_pool.build do
10
+ add_file("temporal/api/testservice/v1/service.proto", :syntax => :proto3) do
11
+ end
12
+ end
13
+
14
+ module Temporalio
15
+ module Api
16
+ module TestService
17
+ module V1
18
+ end
19
+ end
20
+ end
21
+ end
@@ -4,22 +4,68 @@
4
4
  require 'google/protobuf'
5
5
 
6
6
  require 'temporal/api/common/v1/message_pb'
7
+ require 'temporal/api/enums/v1/update_pb'
8
+ require 'temporal/api/failure/v1/message_pb'
7
9
 
8
10
  Google::Protobuf::DescriptorPool.generated_pool.build do
9
11
  add_file("temporal/api/update/v1/message.proto", :syntax => :proto3) do
10
- add_message "temporal.api.update.v1.WorkflowUpdate" do
12
+ add_message "temporal.api.update.v1.WaitPolicy" do
13
+ optional :lifecycle_stage, :enum, 1, "temporal.api.enums.v1.UpdateWorkflowExecutionLifecycleStage"
14
+ end
15
+ add_message "temporal.api.update.v1.UpdateRef" do
16
+ optional :workflow_execution, :message, 1, "temporal.api.common.v1.WorkflowExecution"
17
+ optional :update_id, :string, 2
18
+ end
19
+ add_message "temporal.api.update.v1.Outcome" do
20
+ oneof :value do
21
+ optional :success, :message, 1, "temporal.api.common.v1.Payloads"
22
+ optional :failure, :message, 2, "temporal.api.failure.v1.Failure"
23
+ end
24
+ end
25
+ add_message "temporal.api.update.v1.Meta" do
26
+ optional :update_id, :string, 1
27
+ optional :identity, :string, 2
28
+ end
29
+ add_message "temporal.api.update.v1.Input" do
11
30
  optional :header, :message, 1, "temporal.api.common.v1.Header"
12
31
  optional :name, :string, 2
13
32
  optional :args, :message, 3, "temporal.api.common.v1.Payloads"
14
33
  end
34
+ add_message "temporal.api.update.v1.Request" do
35
+ optional :meta, :message, 1, "temporal.api.update.v1.Meta"
36
+ optional :input, :message, 2, "temporal.api.update.v1.Input"
37
+ end
38
+ add_message "temporal.api.update.v1.Rejection" do
39
+ optional :rejected_request_message_id, :string, 1
40
+ optional :rejected_request_sequencing_event_id, :int64, 2
41
+ optional :rejected_request, :message, 3, "temporal.api.update.v1.Request"
42
+ optional :failure, :message, 4, "temporal.api.failure.v1.Failure"
43
+ end
44
+ add_message "temporal.api.update.v1.Acceptance" do
45
+ optional :accepted_request_message_id, :string, 1
46
+ optional :accepted_request_sequencing_event_id, :int64, 2
47
+ optional :accepted_request, :message, 3, "temporal.api.update.v1.Request"
48
+ end
49
+ add_message "temporal.api.update.v1.Response" do
50
+ optional :meta, :message, 1, "temporal.api.update.v1.Meta"
51
+ optional :outcome, :message, 2, "temporal.api.update.v1.Outcome"
52
+ end
15
53
  end
16
54
  end
17
55
 
18
- module Temporal
56
+ module Temporalio
19
57
  module Api
20
58
  module Update
21
59
  module V1
22
- WorkflowUpdate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.update.v1.WorkflowUpdate").msgclass
60
+ WaitPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.update.v1.WaitPolicy").msgclass
61
+ UpdateRef = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.update.v1.UpdateRef").msgclass
62
+ Outcome = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.update.v1.Outcome").msgclass
63
+ Meta = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.update.v1.Meta").msgclass
64
+ Input = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.update.v1.Input").msgclass
65
+ Request = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.update.v1.Request").msgclass
66
+ Rejection = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.update.v1.Rejection").msgclass
67
+ Acceptance = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.update.v1.Acceptance").msgclass
68
+ Response = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.update.v1.Response").msgclass
23
69
  end
24
70
  end
25
71
  end