temporalio 0.0.2 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +25 -23
- data/bridge/Cargo.lock +185 -76
- data/bridge/Cargo.toml +6 -4
- data/bridge/sdk-core/README.md +19 -6
- data/bridge/sdk-core/client/src/lib.rs +215 -39
- data/bridge/sdk-core/client/src/metrics.rs +17 -8
- data/bridge/sdk-core/client/src/raw.rs +4 -4
- data/bridge/sdk-core/client/src/retry.rs +32 -20
- data/bridge/sdk-core/core/Cargo.toml +22 -9
- data/bridge/sdk-core/core/src/abstractions.rs +203 -14
- data/bridge/sdk-core/core/src/core_tests/activity_tasks.rs +76 -41
- data/bridge/sdk-core/core/src/core_tests/determinism.rs +165 -2
- data/bridge/sdk-core/core/src/core_tests/local_activities.rs +204 -83
- data/bridge/sdk-core/core/src/core_tests/queries.rs +3 -4
- data/bridge/sdk-core/core/src/core_tests/workers.rs +1 -3
- data/bridge/sdk-core/core/src/core_tests/workflow_tasks.rs +397 -54
- data/bridge/sdk-core/core/src/ephemeral_server/mod.rs +106 -12
- data/bridge/sdk-core/core/src/internal_flags.rs +136 -0
- data/bridge/sdk-core/core/src/lib.rs +16 -9
- data/bridge/sdk-core/core/src/telemetry/log_export.rs +1 -1
- data/bridge/sdk-core/core/src/telemetry/metrics.rs +69 -35
- data/bridge/sdk-core/core/src/telemetry/mod.rs +29 -13
- data/bridge/sdk-core/core/src/telemetry/prometheus_server.rs +17 -12
- data/bridge/sdk-core/core/src/test_help/mod.rs +62 -12
- data/bridge/sdk-core/core/src/worker/activities/activity_heartbeat_manager.rs +112 -156
- data/bridge/sdk-core/core/src/worker/activities/activity_task_poller_stream.rs +89 -0
- data/bridge/sdk-core/core/src/worker/activities/local_activities.rs +352 -122
- data/bridge/sdk-core/core/src/worker/activities.rs +233 -157
- data/bridge/sdk-core/core/src/worker/client/mocks.rs +22 -2
- data/bridge/sdk-core/core/src/worker/client.rs +18 -2
- data/bridge/sdk-core/core/src/worker/mod.rs +165 -58
- data/bridge/sdk-core/core/src/worker/workflow/bridge.rs +1 -3
- data/bridge/sdk-core/core/src/worker/workflow/driven_workflow.rs +3 -5
- data/bridge/sdk-core/core/src/worker/workflow/history_update.rs +856 -277
- data/bridge/sdk-core/core/src/worker/workflow/machines/activity_state_machine.rs +100 -43
- data/bridge/sdk-core/core/src/worker/workflow/machines/cancel_external_state_machine.rs +7 -7
- data/bridge/sdk-core/core/src/worker/workflow/machines/cancel_workflow_state_machine.rs +5 -4
- data/bridge/sdk-core/core/src/worker/workflow/machines/child_workflow_state_machine.rs +87 -27
- data/bridge/sdk-core/core/src/worker/workflow/machines/complete_workflow_state_machine.rs +5 -4
- data/bridge/sdk-core/core/src/worker/workflow/machines/continue_as_new_workflow_state_machine.rs +5 -4
- data/bridge/sdk-core/core/src/worker/workflow/machines/fail_workflow_state_machine.rs +5 -4
- data/bridge/sdk-core/core/src/worker/workflow/machines/local_activity_state_machine.rs +137 -62
- data/bridge/sdk-core/core/src/worker/workflow/machines/mod.rs +25 -17
- data/bridge/sdk-core/core/src/worker/workflow/machines/modify_workflow_properties_state_machine.rs +7 -6
- data/bridge/sdk-core/core/src/worker/workflow/machines/patch_state_machine.rs +103 -152
- data/bridge/sdk-core/core/src/worker/workflow/machines/signal_external_state_machine.rs +7 -7
- data/bridge/sdk-core/core/src/worker/workflow/machines/timer_state_machine.rs +9 -9
- data/bridge/sdk-core/core/src/worker/workflow/machines/transition_coverage.rs +2 -2
- data/bridge/sdk-core/core/src/worker/workflow/machines/upsert_search_attributes_state_machine.rs +14 -7
- data/bridge/sdk-core/core/src/worker/workflow/machines/workflow_machines/local_acts.rs +5 -16
- data/bridge/sdk-core/core/src/worker/workflow/machines/workflow_machines.rs +201 -121
- data/bridge/sdk-core/core/src/worker/workflow/machines/workflow_task_state_machine.rs +11 -14
- data/bridge/sdk-core/core/src/worker/workflow/managed_run/managed_wf_test.rs +30 -15
- data/bridge/sdk-core/core/src/worker/workflow/managed_run.rs +1026 -376
- data/bridge/sdk-core/core/src/worker/workflow/mod.rs +460 -384
- data/bridge/sdk-core/core/src/worker/workflow/run_cache.rs +40 -57
- data/bridge/sdk-core/core/src/worker/workflow/wft_extraction.rs +125 -0
- data/bridge/sdk-core/core/src/worker/workflow/wft_poller.rs +1 -4
- data/bridge/sdk-core/core/src/worker/workflow/workflow_stream/saved_wf_inputs.rs +117 -0
- data/bridge/sdk-core/core/src/worker/workflow/workflow_stream/tonic_status_serde.rs +24 -0
- data/bridge/sdk-core/core/src/worker/workflow/workflow_stream.rs +448 -718
- data/bridge/sdk-core/core-api/Cargo.toml +2 -1
- data/bridge/sdk-core/core-api/src/errors.rs +1 -34
- data/bridge/sdk-core/core-api/src/lib.rs +6 -2
- data/bridge/sdk-core/core-api/src/telemetry.rs +0 -6
- data/bridge/sdk-core/core-api/src/worker.rs +14 -1
- data/bridge/sdk-core/fsm/rustfsm_procmacro/src/lib.rs +18 -15
- data/bridge/sdk-core/fsm/rustfsm_trait/src/lib.rs +8 -3
- data/bridge/sdk-core/histories/evict_while_la_running_no_interference-16_history.bin +0 -0
- data/bridge/sdk-core/protos/api_upstream/temporal/api/command/v1/message.proto +5 -17
- data/bridge/sdk-core/protos/api_upstream/temporal/api/common/v1/message.proto +11 -0
- data/bridge/sdk-core/protos/api_upstream/temporal/api/enums/v1/command_type.proto +1 -6
- data/bridge/sdk-core/protos/api_upstream/temporal/api/enums/v1/event_type.proto +6 -6
- data/bridge/sdk-core/protos/api_upstream/temporal/api/enums/v1/failed_cause.proto +5 -0
- data/bridge/sdk-core/protos/api_upstream/temporal/api/enums/v1/update.proto +22 -6
- data/bridge/sdk-core/protos/api_upstream/temporal/api/history/v1/message.proto +48 -19
- data/bridge/sdk-core/protos/api_upstream/temporal/api/namespace/v1/message.proto +2 -0
- data/bridge/sdk-core/protos/api_upstream/temporal/api/operatorservice/v1/request_response.proto +3 -0
- data/bridge/sdk-core/protos/api_upstream/temporal/api/{enums/v1/interaction_type.proto → protocol/v1/message.proto} +29 -11
- data/bridge/sdk-core/protos/api_upstream/temporal/api/sdk/v1/task_complete_metadata.proto +63 -0
- data/bridge/sdk-core/protos/api_upstream/temporal/api/update/v1/message.proto +111 -0
- data/bridge/sdk-core/protos/api_upstream/temporal/api/workflowservice/v1/request_response.proto +59 -28
- data/bridge/sdk-core/protos/api_upstream/temporal/api/workflowservice/v1/service.proto +2 -2
- data/bridge/sdk-core/protos/local/temporal/sdk/core/activity_result/activity_result.proto +1 -0
- data/bridge/sdk-core/protos/local/temporal/sdk/core/activity_task/activity_task.proto +1 -0
- data/bridge/sdk-core/protos/local/temporal/sdk/core/child_workflow/child_workflow.proto +1 -0
- data/bridge/sdk-core/protos/local/temporal/sdk/core/common/common.proto +1 -0
- data/bridge/sdk-core/protos/local/temporal/sdk/core/core_interface.proto +1 -0
- data/bridge/sdk-core/protos/local/temporal/sdk/core/external_data/external_data.proto +1 -0
- data/bridge/sdk-core/protos/local/temporal/sdk/core/workflow_activation/workflow_activation.proto +7 -0
- data/bridge/sdk-core/protos/local/temporal/sdk/core/workflow_commands/workflow_commands.proto +1 -0
- data/bridge/sdk-core/protos/local/temporal/sdk/core/workflow_completion/workflow_completion.proto +6 -0
- data/bridge/sdk-core/sdk/Cargo.toml +3 -2
- data/bridge/sdk-core/sdk/src/lib.rs +87 -20
- data/bridge/sdk-core/sdk/src/workflow_future.rs +9 -8
- data/bridge/sdk-core/sdk-core-protos/Cargo.toml +5 -2
- data/bridge/sdk-core/sdk-core-protos/build.rs +36 -1
- data/bridge/sdk-core/sdk-core-protos/src/history_builder.rs +100 -87
- data/bridge/sdk-core/sdk-core-protos/src/history_info.rs +5 -1
- data/bridge/sdk-core/sdk-core-protos/src/lib.rs +175 -57
- data/bridge/sdk-core/sdk-core-protos/src/task_token.rs +12 -2
- data/bridge/sdk-core/test-utils/Cargo.toml +3 -1
- data/bridge/sdk-core/test-utils/src/canned_histories.rs +106 -296
- data/bridge/sdk-core/test-utils/src/histfetch.rs +1 -1
- data/bridge/sdk-core/test-utils/src/lib.rs +82 -23
- data/bridge/sdk-core/test-utils/src/wf_input_saver.rs +50 -0
- data/bridge/sdk-core/test-utils/src/workflows.rs +29 -0
- data/bridge/sdk-core/tests/fuzzy_workflow.rs +130 -0
- data/bridge/sdk-core/tests/{load_tests.rs → heavy_tests.rs} +125 -51
- data/bridge/sdk-core/tests/integ_tests/ephemeral_server_tests.rs +25 -3
- data/bridge/sdk-core/tests/integ_tests/heartbeat_tests.rs +5 -3
- data/bridge/sdk-core/tests/integ_tests/metrics_tests.rs +218 -16
- data/bridge/sdk-core/tests/integ_tests/polling_tests.rs +4 -47
- data/bridge/sdk-core/tests/integ_tests/queries_tests.rs +5 -128
- data/bridge/sdk-core/tests/integ_tests/visibility_tests.rs +83 -25
- data/bridge/sdk-core/tests/integ_tests/workflow_tests/activities.rs +93 -69
- data/bridge/sdk-core/tests/integ_tests/workflow_tests/cancel_external.rs +1 -0
- data/bridge/sdk-core/tests/integ_tests/workflow_tests/cancel_wf.rs +6 -13
- data/bridge/sdk-core/tests/integ_tests/workflow_tests/child_workflows.rs +1 -0
- data/bridge/sdk-core/tests/integ_tests/workflow_tests/continue_as_new.rs +6 -2
- data/bridge/sdk-core/tests/integ_tests/workflow_tests/determinism.rs +3 -10
- data/bridge/sdk-core/tests/integ_tests/workflow_tests/local_activities.rs +72 -191
- data/bridge/sdk-core/tests/integ_tests/workflow_tests/modify_wf_properties.rs +1 -0
- data/bridge/sdk-core/tests/integ_tests/workflow_tests/patches.rs +7 -28
- data/bridge/sdk-core/tests/integ_tests/workflow_tests/replay.rs +12 -7
- data/bridge/sdk-core/tests/integ_tests/workflow_tests/resets.rs +1 -0
- data/bridge/sdk-core/tests/integ_tests/workflow_tests/signals.rs +18 -14
- data/bridge/sdk-core/tests/integ_tests/workflow_tests/stickyness.rs +6 -20
- data/bridge/sdk-core/tests/integ_tests/workflow_tests/timers.rs +10 -21
- data/bridge/sdk-core/tests/integ_tests/workflow_tests/upsert_search_attrs.rs +6 -4
- data/bridge/sdk-core/tests/integ_tests/workflow_tests.rs +10 -11
- data/bridge/sdk-core/tests/main.rs +3 -13
- data/bridge/sdk-core/tests/runner.rs +75 -36
- data/bridge/sdk-core/tests/wf_input_replay.rs +32 -0
- data/bridge/src/connection.rs +41 -25
- data/bridge/src/lib.rs +269 -14
- data/bridge/src/runtime.rs +1 -1
- data/bridge/src/test_server.rs +153 -0
- data/bridge/src/worker.rs +89 -16
- data/lib/gen/temporal/api/command/v1/message_pb.rb +4 -18
- data/lib/gen/temporal/api/common/v1/message_pb.rb +4 -0
- data/lib/gen/temporal/api/enums/v1/command_type_pb.rb +1 -3
- data/lib/gen/temporal/api/enums/v1/event_type_pb.rb +3 -3
- data/lib/gen/temporal/api/enums/v1/failed_cause_pb.rb +2 -0
- data/lib/gen/temporal/api/enums/v1/update_pb.rb +6 -4
- data/lib/gen/temporal/api/history/v1/message_pb.rb +27 -19
- data/lib/gen/temporal/api/namespace/v1/message_pb.rb +1 -0
- data/lib/gen/temporal/api/operatorservice/v1/request_response_pb.rb +3 -0
- data/lib/gen/temporal/api/protocol/v1/message_pb.rb +30 -0
- data/lib/gen/temporal/api/sdk/v1/task_complete_metadata_pb.rb +23 -0
- data/lib/gen/temporal/api/testservice/v1/request_response_pb.rb +49 -0
- data/lib/gen/temporal/api/testservice/v1/service_pb.rb +21 -0
- data/lib/gen/temporal/api/update/v1/message_pb.rb +72 -0
- data/lib/gen/temporal/api/workflowservice/v1/request_response_pb.rb +26 -16
- data/lib/gen/temporal/sdk/core/activity_result/activity_result_pb.rb +13 -9
- data/lib/gen/temporal/sdk/core/activity_task/activity_task_pb.rb +10 -6
- data/lib/gen/temporal/sdk/core/child_workflow/child_workflow_pb.rb +13 -9
- data/lib/gen/temporal/sdk/core/common/common_pb.rb +7 -3
- data/lib/gen/temporal/sdk/core/core_interface_pb.rb +9 -3
- data/lib/gen/temporal/sdk/core/external_data/external_data_pb.rb +7 -3
- data/lib/gen/temporal/sdk/core/workflow_activation/workflow_activation_pb.rb +27 -21
- data/lib/gen/temporal/sdk/core/workflow_commands/workflow_commands_pb.rb +28 -24
- data/lib/gen/temporal/sdk/core/workflow_completion/workflow_completion_pb.rb +12 -5
- data/lib/temporalio/activity/context.rb +13 -8
- data/lib/temporalio/activity/info.rb +1 -1
- data/lib/temporalio/bridge/connect_options.rb +15 -0
- data/lib/temporalio/bridge/retry_config.rb +24 -0
- data/lib/temporalio/bridge/tls_options.rb +19 -0
- data/lib/temporalio/bridge.rb +1 -1
- data/lib/temporalio/client/implementation.rb +8 -8
- data/lib/temporalio/connection/retry_config.rb +44 -0
- data/lib/temporalio/connection/service.rb +20 -0
- data/lib/temporalio/connection/test_service.rb +92 -0
- data/lib/temporalio/connection/tls_options.rb +51 -0
- data/lib/temporalio/connection/workflow_service.rb +731 -0
- data/lib/temporalio/connection.rb +55 -720
- data/lib/temporalio/interceptor/activity_inbound.rb +22 -0
- data/lib/temporalio/interceptor/activity_outbound.rb +24 -0
- data/lib/temporalio/interceptor/chain.rb +5 -5
- data/lib/temporalio/interceptor/client.rb +8 -4
- data/lib/temporalio/interceptor.rb +22 -0
- data/lib/temporalio/retry_policy.rb +13 -3
- data/lib/temporalio/testing/time_skipping_handle.rb +32 -0
- data/lib/temporalio/testing/time_skipping_interceptor.rb +23 -0
- data/lib/temporalio/testing/workflow_environment.rb +112 -0
- data/lib/temporalio/testing.rb +175 -0
- data/lib/temporalio/version.rb +1 -1
- data/lib/temporalio/worker/activity_runner.rb +26 -4
- data/lib/temporalio/worker/activity_worker.rb +44 -18
- data/lib/temporalio/worker/sync_worker.rb +47 -11
- data/lib/temporalio/worker.rb +27 -21
- data/lib/temporalio/workflow/async.rb +46 -0
- data/lib/temporalio/workflow/future.rb +138 -0
- data/lib/temporalio/workflow/info.rb +76 -0
- data/lib/thermite_patch.rb +10 -0
- data/sig/async.rbs +17 -0
- data/sig/protobuf.rbs +16 -0
- data/sig/protos/dependencies/gogoproto/gogo.rbs +914 -0
- data/sig/protos/google/protobuf/any.rbs +157 -0
- data/sig/protos/google/protobuf/descriptor.rbs +2825 -0
- data/sig/protos/google/protobuf/duration.rbs +114 -0
- data/sig/protos/google/protobuf/empty.rbs +36 -0
- data/sig/protos/google/protobuf/timestamp.rbs +145 -0
- data/sig/protos/google/protobuf/wrappers.rbs +358 -0
- data/sig/protos/temporal/api/batch/v1/message.rbs +300 -0
- data/sig/protos/temporal/api/command/v1/message.rbs +1399 -0
- data/sig/protos/temporal/api/common/v1/message.rbs +528 -0
- data/sig/protos/temporal/api/enums/v1/batch_operation.rbs +79 -0
- data/sig/protos/temporal/api/enums/v1/command_type.rbs +68 -0
- data/sig/protos/temporal/api/enums/v1/common.rbs +118 -0
- data/sig/protos/temporal/api/enums/v1/event_type.rbs +264 -0
- data/sig/protos/temporal/api/enums/v1/failed_cause.rbs +277 -0
- data/sig/protos/temporal/api/enums/v1/namespace.rbs +108 -0
- data/sig/protos/temporal/api/enums/v1/query.rbs +81 -0
- data/sig/protos/temporal/api/enums/v1/reset.rbs +44 -0
- data/sig/protos/temporal/api/enums/v1/schedule.rbs +72 -0
- data/sig/protos/temporal/api/enums/v1/task_queue.rbs +92 -0
- data/sig/protos/temporal/api/enums/v1/update.rbs +64 -0
- data/sig/protos/temporal/api/enums/v1/workflow.rbs +371 -0
- data/sig/protos/temporal/api/errordetails/v1/message.rbs +551 -0
- data/sig/protos/temporal/api/failure/v1/message.rbs +581 -0
- data/sig/protos/temporal/api/filter/v1/message.rbs +171 -0
- data/sig/protos/temporal/api/history/v1/message.rbs +4609 -0
- data/sig/protos/temporal/api/namespace/v1/message.rbs +410 -0
- data/sig/protos/temporal/api/operatorservice/v1/request_response.rbs +643 -0
- data/sig/protos/temporal/api/operatorservice/v1/service.rbs +17 -0
- data/sig/protos/temporal/api/protocol/v1/message.rbs +84 -0
- data/sig/protos/temporal/api/query/v1/message.rbs +182 -0
- data/sig/protos/temporal/api/replication/v1/message.rbs +148 -0
- data/sig/protos/temporal/api/schedule/v1/message.rbs +1488 -0
- data/sig/protos/temporal/api/sdk/v1/task_complete_metadata.rbs +110 -0
- data/sig/protos/temporal/api/taskqueue/v1/message.rbs +486 -0
- data/sig/protos/temporal/api/testservice/v1/request_response.rbs +249 -0
- data/sig/protos/temporal/api/testservice/v1/service.rbs +15 -0
- data/sig/protos/temporal/api/update/v1/message.rbs +489 -0
- data/sig/protos/temporal/api/version/v1/message.rbs +184 -0
- data/sig/protos/temporal/api/workflow/v1/message.rbs +824 -0
- data/sig/protos/temporal/api/workflowservice/v1/request_response.rbs +7250 -0
- data/sig/protos/temporal/api/workflowservice/v1/service.rbs +22 -0
- data/sig/protos/temporal/sdk/core/activity_result/activity_result.rbs +380 -0
- data/sig/protos/temporal/sdk/core/activity_task/activity_task.rbs +386 -0
- data/sig/protos/temporal/sdk/core/child_workflow/child_workflow.rbs +323 -0
- data/sig/protos/temporal/sdk/core/common/common.rbs +62 -0
- data/sig/protos/temporal/sdk/core/core_interface.rbs +101 -0
- data/sig/protos/temporal/sdk/core/external_data/external_data.rbs +119 -0
- data/sig/protos/temporal/sdk/core/workflow_activation/workflow_activation.rbs +1473 -0
- data/sig/protos/temporal/sdk/core/workflow_commands/workflow_commands.rbs +1784 -0
- data/sig/protos/temporal/sdk/core/workflow_completion/workflow_completion.rbs +180 -0
- data/sig/ruby.rbs +12 -0
- data/sig/temporalio/activity/context.rbs +29 -0
- data/sig/temporalio/activity/info.rbs +43 -0
- data/sig/temporalio/activity.rbs +19 -0
- data/sig/temporalio/bridge/connect_options.rbs +19 -0
- data/sig/temporalio/bridge/error.rbs +8 -0
- data/sig/temporalio/bridge/retry_config.rbs +21 -0
- data/sig/temporalio/bridge/tls_options.rbs +17 -0
- data/sig/temporalio/bridge.rbs +71 -0
- data/sig/temporalio/client/implementation.rbs +38 -0
- data/sig/temporalio/client/workflow_handle.rbs +41 -0
- data/sig/temporalio/client.rbs +35 -0
- data/sig/temporalio/connection/retry_config.rbs +37 -0
- data/sig/temporalio/connection/service.rbs +14 -0
- data/sig/temporalio/connection/test_service.rbs +13 -0
- data/sig/temporalio/connection/tls_options.rbs +43 -0
- data/sig/temporalio/connection/workflow_service.rbs +48 -0
- data/sig/temporalio/connection.rbs +30 -0
- data/sig/temporalio/data_converter.rbs +35 -0
- data/sig/temporalio/error/failure.rbs +121 -0
- data/sig/temporalio/error/workflow_failure.rbs +9 -0
- data/sig/temporalio/errors.rbs +36 -0
- data/sig/temporalio/failure_converter/base.rbs +12 -0
- data/sig/temporalio/failure_converter/basic.rbs +86 -0
- data/sig/temporalio/failure_converter.rbs +5 -0
- data/sig/temporalio/interceptor/activity_inbound.rbs +21 -0
- data/sig/temporalio/interceptor/activity_outbound.rbs +10 -0
- data/sig/temporalio/interceptor/chain.rbs +24 -0
- data/sig/temporalio/interceptor/client.rbs +148 -0
- data/sig/temporalio/interceptor.rbs +6 -0
- data/sig/temporalio/payload_codec/base.rbs +12 -0
- data/sig/temporalio/payload_converter/base.rbs +12 -0
- data/sig/temporalio/payload_converter/bytes.rbs +9 -0
- data/sig/temporalio/payload_converter/composite.rbs +19 -0
- data/sig/temporalio/payload_converter/encoding_base.rbs +14 -0
- data/sig/temporalio/payload_converter/json.rbs +9 -0
- data/sig/temporalio/payload_converter/nil.rbs +9 -0
- data/sig/temporalio/payload_converter.rbs +5 -0
- data/sig/temporalio/retry_policy.rbs +25 -0
- data/sig/temporalio/retry_state.rbs +20 -0
- data/sig/temporalio/runtime.rbs +12 -0
- data/sig/temporalio/testing/time_skipping_handle.rbs +15 -0
- data/sig/temporalio/testing/time_skipping_interceptor.rbs +13 -0
- data/sig/temporalio/testing/workflow_environment.rbs +22 -0
- data/sig/temporalio/testing.rbs +35 -0
- data/sig/temporalio/timeout_type.rbs +15 -0
- data/sig/temporalio/version.rbs +3 -0
- data/sig/temporalio/worker/activity_runner.rbs +35 -0
- data/sig/temporalio/worker/activity_worker.rbs +44 -0
- data/sig/temporalio/worker/reactor.rbs +22 -0
- data/sig/temporalio/worker/runner.rbs +21 -0
- data/sig/temporalio/worker/sync_worker.rbs +23 -0
- data/sig/temporalio/worker/thread_pool_executor.rbs +23 -0
- data/sig/temporalio/worker.rbs +46 -0
- data/sig/temporalio/workflow/async.rbs +9 -0
- data/sig/temporalio/workflow/execution_info.rbs +55 -0
- data/sig/temporalio/workflow/execution_status.rbs +21 -0
- data/sig/temporalio/workflow/future.rbs +40 -0
- data/sig/temporalio/workflow/id_reuse_policy.rbs +15 -0
- data/sig/temporalio/workflow/info.rbs +55 -0
- data/sig/temporalio/workflow/query_reject_condition.rbs +14 -0
- data/sig/temporalio.rbs +2 -0
- data/sig/thermite_patch.rbs +15 -0
- data/temporalio.gemspec +6 -4
- metadata +183 -17
- data/bridge/sdk-core/Cargo.lock +0 -2606
- data/bridge/sdk-core/protos/api_upstream/temporal/api/interaction/v1/message.proto +0 -87
- data/lib/bridge.so +0 -0
- data/lib/gen/temporal/api/enums/v1/interaction_type_pb.rb +0 -25
- data/lib/gen/temporal/api/interaction/v1/message_pb.rb +0 -49
- data/lib/gen/temporal/sdk/core/bridge/bridge_pb.rb +0 -222
data/bridge/src/worker.rs
CHANGED
@@ -1,14 +1,15 @@
|
|
1
1
|
use crate::connection::Client;
|
2
2
|
use crate::runtime::{Callback, Command, Runtime};
|
3
3
|
use prost::Message;
|
4
|
-
use std::sync::Arc;
|
5
4
|
use std::sync::mpsc::Sender;
|
6
|
-
use
|
7
|
-
use
|
5
|
+
use std::sync::Arc;
|
6
|
+
use temporal_sdk_core::api::Worker as WorkerTrait;
|
7
|
+
use temporal_sdk_core_api::errors::{PollActivityError, PollWfError};
|
8
8
|
use temporal_sdk_core_api::worker::{WorkerConfigBuilder, WorkerConfigBuilderError};
|
9
|
+
use temporal_sdk_core_protos::coresdk::workflow_completion::WorkflowActivationCompletion;
|
9
10
|
use temporal_sdk_core_protos::coresdk::{ActivityHeartbeat, ActivityTaskCompletion};
|
10
11
|
use thiserror::Error;
|
11
|
-
use tokio::runtime::
|
12
|
+
use tokio::runtime::Runtime as TokioRuntime;
|
12
13
|
|
13
14
|
#[derive(Error, Debug)]
|
14
15
|
pub enum WorkerError {
|
@@ -24,12 +25,24 @@ pub enum WorkerError {
|
|
24
25
|
#[error(transparent)]
|
25
26
|
UnableToPollActivityTask(#[from] temporal_sdk_core::api::errors::PollActivityError),
|
26
27
|
|
28
|
+
#[error(transparent)]
|
29
|
+
UnableToPollWorkflowActivation(#[from] temporal_sdk_core::api::errors::PollWfError),
|
30
|
+
|
27
31
|
#[error(transparent)]
|
28
32
|
UnableToCompleteActivityTask(#[from] temporal_sdk_core::api::errors::CompleteActivityError),
|
29
33
|
|
34
|
+
#[error(transparent)]
|
35
|
+
UnableToCompleteWorkflowActivation(#[from] temporal_sdk_core::api::errors::CompleteWfError),
|
36
|
+
|
30
37
|
#[error("Unable to send a request. Channel is closed")]
|
31
38
|
ChannelClosed(),
|
32
39
|
|
40
|
+
#[error("Worker has already been shutdown")]
|
41
|
+
WorkerHasBeenShutdown(),
|
42
|
+
|
43
|
+
#[error("Unexpected error: {0}")]
|
44
|
+
UnexpectedError(String),
|
45
|
+
|
33
46
|
#[error("Core worker is shutting down")]
|
34
47
|
Shutdown(),
|
35
48
|
}
|
@@ -37,18 +50,20 @@ pub enum WorkerError {
|
|
37
50
|
pub type WorkerResult = Result<Vec<u8>, WorkerError>;
|
38
51
|
|
39
52
|
pub struct Worker {
|
40
|
-
core_worker: Arc<temporal_sdk_core::Worker
|
53
|
+
core_worker: Option<Arc<temporal_sdk_core::Worker>>,
|
41
54
|
tokio_runtime: Arc<TokioRuntime>,
|
42
55
|
callback_tx: Sender<Command>,
|
43
56
|
}
|
44
57
|
|
45
58
|
impl Worker {
|
46
59
|
// TODO: Extend this to include full worker config
|
47
|
-
pub fn new(runtime: &Runtime, client: &Client, namespace: &str, task_queue: &str) -> Result<Worker, WorkerError> {
|
60
|
+
pub fn new(runtime: &Runtime, client: &Client, namespace: &str, task_queue: &str, max_cached_workflows: u32, no_remote_activity: bool) -> Result<Worker, WorkerError> {
|
48
61
|
let config = WorkerConfigBuilder::default()
|
49
62
|
.namespace(namespace)
|
50
63
|
.task_queue(task_queue)
|
51
64
|
.worker_build_id("test-worker-build") // TODO: replace this with an actual build id
|
65
|
+
.max_cached_workflows(usize::try_from(max_cached_workflows).unwrap())
|
66
|
+
.no_remote_activities(no_remote_activity)
|
52
67
|
.build()?;
|
53
68
|
|
54
69
|
let core_worker = runtime.tokio_runtime.block_on(async move {
|
@@ -56,14 +71,14 @@ impl Worker {
|
|
56
71
|
}).expect("Failed to initialize Core Worker");
|
57
72
|
|
58
73
|
Ok(Worker {
|
59
|
-
core_worker: Arc::new(core_worker),
|
74
|
+
core_worker: Some(Arc::new(core_worker)),
|
60
75
|
tokio_runtime: runtime.tokio_runtime.clone(),
|
61
76
|
callback_tx: runtime.callback_tx.clone(),
|
62
77
|
})
|
63
78
|
}
|
64
79
|
|
65
80
|
pub fn poll_activity_task<F>(&self, callback: F) -> Result<(), WorkerError> where F: FnOnce(WorkerResult) + Send + 'static {
|
66
|
-
let core_worker = self.core_worker.
|
81
|
+
let core_worker = Arc::clone(self.core_worker.as_ref().ok_or(WorkerError::WorkerHasBeenShutdown())?);
|
67
82
|
let callback_tx = self.callback_tx.clone();
|
68
83
|
|
69
84
|
self.tokio_runtime.spawn(async move {
|
@@ -85,7 +100,7 @@ impl Worker {
|
|
85
100
|
}
|
86
101
|
|
87
102
|
pub fn complete_activity_task<F>(&self, bytes: Vec<u8>, callback: F) -> Result<(), WorkerError> where F: FnOnce(WorkerResult) + Send + 'static {
|
88
|
-
let core_worker = self.core_worker.
|
103
|
+
let core_worker = Arc::clone(self.core_worker.as_ref().ok_or(WorkerError::WorkerHasBeenShutdown())?);
|
89
104
|
let callback_tx = self.callback_tx.clone();
|
90
105
|
let proto = ActivityTaskCompletion::decode(&*bytes)?;
|
91
106
|
|
@@ -104,21 +119,79 @@ impl Worker {
|
|
104
119
|
}
|
105
120
|
|
106
121
|
pub fn record_activity_heartbeat(&self, bytes: Vec<u8>) -> Result<(), WorkerError> {
|
122
|
+
let core_worker = Arc::clone(self.core_worker.as_ref().ok_or(WorkerError::WorkerHasBeenShutdown())?);
|
107
123
|
let proto = ActivityHeartbeat::decode(&*bytes)?;
|
108
|
-
|
124
|
+
|
125
|
+
core_worker.record_activity_heartbeat(proto);
|
126
|
+
|
127
|
+
Ok(())
|
128
|
+
}
|
129
|
+
|
130
|
+
pub fn poll_workflow_activation<F>(&self, callback: F) -> Result<(), WorkerError> where F: FnOnce(WorkerResult) + Send + 'static {
|
131
|
+
let core_worker = Arc::clone(self.core_worker.as_ref().ok_or(WorkerError::WorkerHasBeenShutdown())?);
|
132
|
+
let callback_tx = self.callback_tx.clone();
|
133
|
+
|
134
|
+
self.tokio_runtime.spawn(async move {
|
135
|
+
let result = core_worker.poll_workflow_activation().await;
|
136
|
+
|
137
|
+
let callback: Callback = match result {
|
138
|
+
Ok(task) => {
|
139
|
+
let bytes = task.encode_to_vec();
|
140
|
+
Box::new(move || callback(Ok(bytes)))
|
141
|
+
},
|
142
|
+
Err(PollWfError::ShutDown) => Box::new(move || callback(Err(WorkerError::Shutdown()))),
|
143
|
+
Err(e) => Box::new(move || callback(Err(WorkerError::UnableToPollWorkflowActivation(e))))
|
144
|
+
};
|
145
|
+
|
146
|
+
callback_tx.send(Command::RunCallback(callback)).expect("Unable to send a callback");
|
147
|
+
});
|
109
148
|
|
110
149
|
Ok(())
|
111
150
|
}
|
112
151
|
|
113
|
-
pub fn
|
114
|
-
self.core_worker.
|
152
|
+
pub fn complete_workflow_activation<F>(&self, bytes: Vec<u8>, callback: F) -> Result<(), WorkerError> where F: FnOnce(WorkerResult) + Send + 'static {
|
153
|
+
let core_worker = Arc::clone(self.core_worker.as_ref().ok_or(WorkerError::WorkerHasBeenShutdown())?);
|
154
|
+
let callback_tx = self.callback_tx.clone();
|
155
|
+
let proto = WorkflowActivationCompletion::decode(&*bytes)?;
|
156
|
+
|
157
|
+
self.tokio_runtime.spawn(async move {
|
158
|
+
let result = core_worker.complete_workflow_activation(proto).await;
|
159
|
+
|
160
|
+
let callback: Callback = match result {
|
161
|
+
Ok(()) => Box::new(move || callback(Ok(vec!()))),
|
162
|
+
Err(e) => Box::new(move || callback(Err(WorkerError::UnableToCompleteWorkflowActivation(e))))
|
163
|
+
};
|
164
|
+
|
165
|
+
callback_tx.send(Command::RunCallback(callback)).expect("Unable to send a callback");
|
166
|
+
});
|
167
|
+
|
168
|
+
Ok(())
|
115
169
|
}
|
116
170
|
|
117
|
-
pub fn
|
118
|
-
let core_worker = self.core_worker.
|
171
|
+
pub fn initiate_shutdown(&self) -> Result<(), WorkerError> {
|
172
|
+
let core_worker = Arc::clone(self.core_worker.as_ref().ok_or(WorkerError::WorkerHasBeenShutdown())?);
|
173
|
+
|
174
|
+
core_worker.initiate_shutdown();
|
175
|
+
|
176
|
+
Ok(())
|
177
|
+
}
|
178
|
+
|
179
|
+
pub fn finalize_shutdown(&mut self) -> Result<(), WorkerError> {
|
180
|
+
// Take the worker out of the option and leave None
|
181
|
+
let core_worker = self.core_worker.take().ok_or(WorkerError::WorkerHasBeenShutdown())?;
|
182
|
+
|
183
|
+
// By design, there should be no more task using the worker by the time the Ruby code calls finalize_shutdown.
|
184
|
+
// This should therefore be the very last reference remaining to the worker. This is a condition for try_unwrap to work.
|
185
|
+
let core_worker = Arc::try_unwrap(core_worker).map_err(|arc| {
|
186
|
+
WorkerError::UnexpectedError(format!(
|
187
|
+
"Can't finalize worker's shutdown because there are still active references to it (expected exactly 1 reference, but got {})",
|
188
|
+
Arc::strong_count(&arc)
|
189
|
+
))
|
190
|
+
})?;
|
119
191
|
|
120
192
|
self.tokio_runtime.block_on(async move {
|
121
|
-
core_worker.
|
122
|
-
|
193
|
+
core_worker.finalize_shutdown().await;
|
194
|
+
Ok(())
|
195
|
+
})
|
123
196
|
}
|
124
197
|
}
|
@@ -9,7 +9,6 @@ require 'temporal/api/enums/v1/workflow_pb'
|
|
9
9
|
require 'temporal/api/enums/v1/command_type_pb'
|
10
10
|
require 'temporal/api/common/v1/message_pb'
|
11
11
|
require 'temporal/api/failure/v1/message_pb'
|
12
|
-
require 'temporal/api/interaction/v1/message_pb'
|
13
12
|
require 'temporal/api/taskqueue/v1/message_pb'
|
14
13
|
|
15
14
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
@@ -109,17 +108,8 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
109
108
|
optional :memo, :message, 15, "temporal.api.common.v1.Memo"
|
110
109
|
optional :search_attributes, :message, 16, "temporal.api.common.v1.SearchAttributes"
|
111
110
|
end
|
112
|
-
add_message "temporal.api.command.v1.
|
113
|
-
optional :
|
114
|
-
optional :input, :message, 2, "temporal.api.interaction.v1.Input"
|
115
|
-
end
|
116
|
-
add_message "temporal.api.command.v1.CompleteWorkflowUpdateCommandAttributes" do
|
117
|
-
optional :meta, :message, 1, "temporal.api.interaction.v1.Meta"
|
118
|
-
optional :output, :message, 2, "temporal.api.interaction.v1.Output"
|
119
|
-
end
|
120
|
-
add_message "temporal.api.command.v1.RejectWorkflowUpdateCommandAttributes" do
|
121
|
-
optional :meta, :message, 1, "temporal.api.interaction.v1.Meta"
|
122
|
-
optional :failure, :message, 2, "temporal.api.failure.v1.Failure"
|
111
|
+
add_message "temporal.api.command.v1.ProtocolMessageCommandAttributes" do
|
112
|
+
optional :message_id, :string, 1
|
123
113
|
end
|
124
114
|
add_message "temporal.api.command.v1.Command" do
|
125
115
|
optional :command_type, :enum, 1, "temporal.api.enums.v1.CommandType"
|
@@ -137,10 +127,8 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
137
127
|
optional :start_child_workflow_execution_command_attributes, :message, 12, "temporal.api.command.v1.StartChildWorkflowExecutionCommandAttributes"
|
138
128
|
optional :signal_external_workflow_execution_command_attributes, :message, 13, "temporal.api.command.v1.SignalExternalWorkflowExecutionCommandAttributes"
|
139
129
|
optional :upsert_workflow_search_attributes_command_attributes, :message, 14, "temporal.api.command.v1.UpsertWorkflowSearchAttributesCommandAttributes"
|
140
|
-
optional :
|
141
|
-
optional :complete_workflow_update_command_attributes, :message, 16, "temporal.api.command.v1.CompleteWorkflowUpdateCommandAttributes"
|
130
|
+
optional :protocol_message_command_attributes, :message, 15, "temporal.api.command.v1.ProtocolMessageCommandAttributes"
|
142
131
|
optional :modify_workflow_properties_command_attributes, :message, 17, "temporal.api.command.v1.ModifyWorkflowPropertiesCommandAttributes"
|
143
|
-
optional :reject_workflow_update_command_attributes, :message, 18, "temporal.api.command.v1.RejectWorkflowUpdateCommandAttributes"
|
144
132
|
end
|
145
133
|
end
|
146
134
|
end
|
@@ -164,9 +152,7 @@ module Temporalio
|
|
164
152
|
RecordMarkerCommandAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.command.v1.RecordMarkerCommandAttributes").msgclass
|
165
153
|
ContinueAsNewWorkflowExecutionCommandAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.command.v1.ContinueAsNewWorkflowExecutionCommandAttributes").msgclass
|
166
154
|
StartChildWorkflowExecutionCommandAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.command.v1.StartChildWorkflowExecutionCommandAttributes").msgclass
|
167
|
-
|
168
|
-
CompleteWorkflowUpdateCommandAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.command.v1.CompleteWorkflowUpdateCommandAttributes").msgclass
|
169
|
-
RejectWorkflowUpdateCommandAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.command.v1.RejectWorkflowUpdateCommandAttributes").msgclass
|
155
|
+
ProtocolMessageCommandAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.command.v1.ProtocolMessageCommandAttributes").msgclass
|
170
156
|
Command = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.command.v1.Command").msgclass
|
171
157
|
end
|
172
158
|
end
|
@@ -46,6 +46,9 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
46
46
|
optional :maximum_attempts, :int32, 4
|
47
47
|
repeated :non_retryable_error_types, :string, 5
|
48
48
|
end
|
49
|
+
add_message "temporal.api.common.v1.MeteringMetadata" do
|
50
|
+
optional :nonfirst_local_activity_execution_attempts, :uint32, 13
|
51
|
+
end
|
49
52
|
end
|
50
53
|
end
|
51
54
|
|
@@ -63,6 +66,7 @@ module Temporalio
|
|
63
66
|
WorkflowType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.common.v1.WorkflowType").msgclass
|
64
67
|
ActivityType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.common.v1.ActivityType").msgclass
|
65
68
|
RetryPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.common.v1.RetryPolicy").msgclass
|
69
|
+
MeteringMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.common.v1.MeteringMetadata").msgclass
|
66
70
|
end
|
67
71
|
end
|
68
72
|
end
|
@@ -20,10 +20,8 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
20
20
|
value :COMMAND_TYPE_START_CHILD_WORKFLOW_EXECUTION, 11
|
21
21
|
value :COMMAND_TYPE_SIGNAL_EXTERNAL_WORKFLOW_EXECUTION, 12
|
22
22
|
value :COMMAND_TYPE_UPSERT_WORKFLOW_SEARCH_ATTRIBUTES, 13
|
23
|
-
value :
|
24
|
-
value :COMMAND_TYPE_COMPLETE_WORKFLOW_UPDATE, 15
|
23
|
+
value :COMMAND_TYPE_PROTOCOL_MESSAGE, 14
|
25
24
|
value :COMMAND_TYPE_MODIFY_WORKFLOW_PROPERTIES, 16
|
26
|
-
value :COMMAND_TYPE_REJECT_WORKFLOW_UPDATE, 17
|
27
25
|
end
|
28
26
|
end
|
29
27
|
end
|
@@ -47,9 +47,9 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
47
47
|
value :EVENT_TYPE_SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_FAILED, 38
|
48
48
|
value :EVENT_TYPE_EXTERNAL_WORKFLOW_EXECUTION_SIGNALED, 39
|
49
49
|
value :EVENT_TYPE_UPSERT_WORKFLOW_SEARCH_ATTRIBUTES, 40
|
50
|
-
value :
|
51
|
-
value :
|
52
|
-
value :
|
50
|
+
value :EVENT_TYPE_WORKFLOW_EXECUTION_UPDATE_ACCEPTED, 41
|
51
|
+
value :EVENT_TYPE_WORKFLOW_EXECUTION_UPDATE_REJECTED, 42
|
52
|
+
value :EVENT_TYPE_WORKFLOW_EXECUTION_UPDATE_COMPLETED, 43
|
53
53
|
value :EVENT_TYPE_WORKFLOW_PROPERTIES_MODIFIED_EXTERNALLY, 44
|
54
54
|
value :EVENT_TYPE_ACTIVITY_PROPERTIES_MODIFIED_EXTERNALLY, 45
|
55
55
|
value :EVENT_TYPE_WORKFLOW_PROPERTIES_MODIFIED, 46
|
@@ -36,6 +36,8 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
36
36
|
value :WORKFLOW_TASK_FAILED_CAUSE_PENDING_ACTIVITIES_LIMIT_EXCEEDED, 27
|
37
37
|
value :WORKFLOW_TASK_FAILED_CAUSE_PENDING_SIGNALS_LIMIT_EXCEEDED, 28
|
38
38
|
value :WORKFLOW_TASK_FAILED_CAUSE_PENDING_REQUEST_CANCEL_LIMIT_EXCEEDED, 29
|
39
|
+
value :WORKFLOW_TASK_FAILED_CAUSE_BAD_UPDATE_WORKFLOW_EXECUTION_MESSAGE, 30
|
40
|
+
value :WORKFLOW_TASK_FAILED_CAUSE_UNHANDLED_UPDATE, 31
|
39
41
|
end
|
40
42
|
add_enum "temporal.api.enums.v1.StartChildWorkflowExecutionFailedCause" do
|
41
43
|
value :START_CHILD_WORKFLOW_EXECUTION_FAILED_CAUSE_UNSPECIFIED, 0
|
@@ -5,9 +5,11 @@ 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.
|
9
|
-
value :
|
10
|
-
value :
|
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
|
11
13
|
end
|
12
14
|
end
|
13
15
|
end
|
@@ -16,7 +18,7 @@ module Temporalio
|
|
16
18
|
module Api
|
17
19
|
module Enums
|
18
20
|
module V1
|
19
|
-
|
21
|
+
UpdateWorkflowExecutionLifecycleStage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.enums.v1.UpdateWorkflowExecutionLifecycleStage").enummodule
|
20
22
|
end
|
21
23
|
end
|
22
24
|
end
|
@@ -11,9 +11,10 @@ require 'temporal/api/enums/v1/failed_cause_pb'
|
|
11
11
|
require 'temporal/api/enums/v1/workflow_pb'
|
12
12
|
require 'temporal/api/common/v1/message_pb'
|
13
13
|
require 'temporal/api/failure/v1/message_pb'
|
14
|
-
require 'temporal/api/interaction/v1/message_pb'
|
15
14
|
require 'temporal/api/taskqueue/v1/message_pb'
|
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
|
@@ -95,6 +96,8 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
95
96
|
optional :identity, :string, 3
|
96
97
|
optional :binary_checksum, :string, 4
|
97
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"
|
98
101
|
end
|
99
102
|
add_message "temporal.api.history.v1.WorkflowTaskTimedOutEventAttributes" do
|
100
103
|
optional :scheduled_event_id, :int64, 1
|
@@ -347,18 +350,6 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
347
350
|
optional :initiated_event_id, :int64, 4
|
348
351
|
optional :started_event_id, :int64, 5
|
349
352
|
end
|
350
|
-
add_message "temporal.api.history.v1.WorkflowUpdateAcceptedEventAttributes" do
|
351
|
-
optional :meta, :message, 1, "temporal.api.interaction.v1.Meta"
|
352
|
-
optional :input, :message, 2, "temporal.api.interaction.v1.Input"
|
353
|
-
end
|
354
|
-
add_message "temporal.api.history.v1.WorkflowUpdateCompletedEventAttributes" do
|
355
|
-
optional :meta, :message, 1, "temporal.api.interaction.v1.Meta"
|
356
|
-
optional :output, :message, 2, "temporal.api.interaction.v1.Output"
|
357
|
-
end
|
358
|
-
add_message "temporal.api.history.v1.WorkflowUpdateRejectedEventAttributes" do
|
359
|
-
optional :meta, :message, 1, "temporal.api.interaction.v1.Meta"
|
360
|
-
optional :failure, :message, 2, "temporal.api.failure.v1.Failure"
|
361
|
-
end
|
362
353
|
add_message "temporal.api.history.v1.WorkflowPropertiesModifiedExternallyEventAttributes" do
|
363
354
|
optional :new_task_queue, :string, 1
|
364
355
|
optional :new_workflow_task_timeout, :message, 2, "google.protobuf.Duration"
|
@@ -370,6 +361,23 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
370
361
|
optional :scheduled_event_id, :int64, 1
|
371
362
|
optional :new_retry_policy, :message, 2, "temporal.api.common.v1.RetryPolicy"
|
372
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
|
373
381
|
add_message "temporal.api.history.v1.HistoryEvent" do
|
374
382
|
optional :event_id, :int64, 1
|
375
383
|
optional :event_time, :message, 2, "google.protobuf.Timestamp"
|
@@ -418,9 +426,9 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
418
426
|
optional :signal_external_workflow_execution_failed_event_attributes, :message, 43, "temporal.api.history.v1.SignalExternalWorkflowExecutionFailedEventAttributes"
|
419
427
|
optional :external_workflow_execution_signaled_event_attributes, :message, 44, "temporal.api.history.v1.ExternalWorkflowExecutionSignaledEventAttributes"
|
420
428
|
optional :upsert_workflow_search_attributes_event_attributes, :message, 45, "temporal.api.history.v1.UpsertWorkflowSearchAttributesEventAttributes"
|
421
|
-
optional :
|
422
|
-
optional :
|
423
|
-
optional :
|
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"
|
424
432
|
optional :workflow_properties_modified_externally_event_attributes, :message, 49, "temporal.api.history.v1.WorkflowPropertiesModifiedExternallyEventAttributes"
|
425
433
|
optional :activity_properties_modified_externally_event_attributes, :message, 50, "temporal.api.history.v1.ActivityPropertiesModifiedExternallyEventAttributes"
|
426
434
|
optional :workflow_properties_modified_event_attributes, :message, 51, "temporal.api.history.v1.WorkflowPropertiesModifiedEventAttributes"
|
@@ -477,11 +485,11 @@ module Temporalio
|
|
477
485
|
ChildWorkflowExecutionCanceledEventAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.history.v1.ChildWorkflowExecutionCanceledEventAttributes").msgclass
|
478
486
|
ChildWorkflowExecutionTimedOutEventAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.history.v1.ChildWorkflowExecutionTimedOutEventAttributes").msgclass
|
479
487
|
ChildWorkflowExecutionTerminatedEventAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.history.v1.ChildWorkflowExecutionTerminatedEventAttributes").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
|
-
WorkflowUpdateRejectedEventAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.history.v1.WorkflowUpdateRejectedEventAttributes").msgclass
|
483
488
|
WorkflowPropertiesModifiedExternallyEventAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.history.v1.WorkflowPropertiesModifiedExternallyEventAttributes").msgclass
|
484
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
|
485
493
|
HistoryEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.history.v1.HistoryEvent").msgclass
|
486
494
|
History = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.history.v1.History").msgclass
|
487
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"
|
@@ -9,15 +9,18 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
9
9
|
add_file("temporal/api/operatorservice/v1/request_response.proto", :syntax => :proto3) do
|
10
10
|
add_message "temporal.api.operatorservice.v1.AddSearchAttributesRequest" do
|
11
11
|
map :search_attributes, :string, :enum, 1, "temporal.api.enums.v1.IndexedValueType"
|
12
|
+
optional :namespace, :string, 2
|
12
13
|
end
|
13
14
|
add_message "temporal.api.operatorservice.v1.AddSearchAttributesResponse" do
|
14
15
|
end
|
15
16
|
add_message "temporal.api.operatorservice.v1.RemoveSearchAttributesRequest" do
|
16
17
|
repeated :search_attributes, :string, 1
|
18
|
+
optional :namespace, :string, 2
|
17
19
|
end
|
18
20
|
add_message "temporal.api.operatorservice.v1.RemoveSearchAttributesResponse" do
|
19
21
|
end
|
20
22
|
add_message "temporal.api.operatorservice.v1.ListSearchAttributesRequest" do
|
23
|
+
optional :namespace, :string, 1
|
21
24
|
end
|
22
25
|
add_message "temporal.api.operatorservice.v1.ListSearchAttributesResponse" do
|
23
26
|
map :custom_attributes, :string, :enum, 1, "temporal.api.enums.v1.IndexedValueType"
|
@@ -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
|
@@ -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
|
@@ -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
|
@@ -0,0 +1,72 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: temporal/api/update/v1/message.proto
|
3
|
+
|
4
|
+
require 'google/protobuf'
|
5
|
+
|
6
|
+
require 'temporal/api/common/v1/message_pb'
|
7
|
+
require 'temporal/api/enums/v1/update_pb'
|
8
|
+
require 'temporal/api/failure/v1/message_pb'
|
9
|
+
|
10
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
11
|
+
add_file("temporal/api/update/v1/message.proto", :syntax => :proto3) 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
|
30
|
+
optional :header, :message, 1, "temporal.api.common.v1.Header"
|
31
|
+
optional :name, :string, 2
|
32
|
+
optional :args, :message, 3, "temporal.api.common.v1.Payloads"
|
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
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
module Temporalio
|
57
|
+
module Api
|
58
|
+
module Update
|
59
|
+
module V1
|
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
|
69
|
+
end
|
70
|
+
end
|
71
|
+
end
|
72
|
+
end
|