temporalio 0.5.0-x86_64-linux → 1.0.0-x86_64-linux
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/temporalio/activity/info.rb +5 -0
- data/lib/temporalio/api/batch/v1/message.rb +4 -1
- data/lib/temporalio/api/cloud/cloudservice/v1/request_response.rb +12 -1
- data/lib/temporalio/api/cloud/cloudservice/v1/service.rb +1 -1
- data/lib/temporalio/api/cloud/connectivityrule/v1/message.rb +29 -0
- data/lib/temporalio/api/cloud/identity/v1/message.rb +1 -1
- data/lib/temporalio/api/cloud/namespace/v1/message.rb +2 -1
- data/lib/temporalio/api/cloud/operation/v1/message.rb +1 -1
- data/lib/temporalio/api/common/v1/message.rb +2 -1
- data/lib/temporalio/api/enums/v1/batch_operation.rb +1 -1
- data/lib/temporalio/api/enums/v1/task_queue.rb +2 -1
- data/lib/temporalio/api/history/v1/message.rb +1 -1
- data/lib/temporalio/api/payload_visitor.rb +19 -1
- data/lib/temporalio/api/sdk/v1/worker_config.rb +23 -0
- data/lib/temporalio/api/taskqueue/v1/message.rb +5 -1
- data/lib/temporalio/api/worker/v1/message.rb +2 -1
- data/lib/temporalio/api/workflowservice/v1/request_response.rb +10 -1
- data/lib/temporalio/api/workflowservice/v1/service.rb +1 -1
- data/lib/temporalio/cancellation.rb +16 -12
- data/lib/temporalio/client/async_activity_handle.rb +1 -0
- data/lib/temporalio/client/connection/cloud_service.rb +75 -0
- data/lib/temporalio/client/connection/workflow_service.rb +45 -0
- data/lib/temporalio/client/connection.rb +2 -1
- data/lib/temporalio/contrib/open_telemetry.rb +9 -13
- data/lib/temporalio/converters/payload_converter/json_plain.rb +22 -5
- data/lib/temporalio/env_config.rb +343 -0
- data/lib/temporalio/error.rb +5 -1
- data/lib/temporalio/internal/bridge/3.2/temporalio_bridge.so +0 -0
- data/lib/temporalio/internal/bridge/3.3/temporalio_bridge.so +0 -0
- data/lib/temporalio/internal/bridge/3.4/temporalio_bridge.so +0 -0
- data/lib/temporalio/internal/bridge/api/workflow_activation/workflow_activation.rb +1 -1
- data/lib/temporalio/internal/bridge/worker.rb +50 -0
- data/lib/temporalio/internal/client/implementation.rb +7 -2
- data/lib/temporalio/internal/worker/activity_worker.rb +1 -0
- data/lib/temporalio/internal/worker/workflow_instance/context.rb +7 -4
- data/lib/temporalio/internal/worker/workflow_instance/externally_immutable_hash.rb +2 -0
- data/lib/temporalio/internal/worker/workflow_instance/illegal_call_tracer.rb +18 -11
- data/lib/temporalio/internal/worker/workflow_instance/outbound_implementation.rb +6 -5
- data/lib/temporalio/internal/worker/workflow_instance/replay_safe_logger.rb +5 -2
- data/lib/temporalio/internal/worker/workflow_instance/scheduler.rb +10 -4
- data/lib/temporalio/internal/worker/workflow_instance.rb +77 -80
- data/lib/temporalio/priority.rb +47 -6
- data/lib/temporalio/scoped_logger.rb +1 -1
- data/lib/temporalio/testing/activity_environment.rb +1 -0
- data/lib/temporalio/version.rb +1 -1
- data/lib/temporalio/worker/illegal_workflow_call_validator.rb +9 -0
- data/lib/temporalio/worker/interceptor.rb +1 -0
- data/lib/temporalio/worker/tuner.rb +185 -16
- data/lib/temporalio/worker.rb +10 -1
- data/lib/temporalio/workflow/definition.rb +4 -6
- data/lib/temporalio/workflow/info.rb +3 -0
- data/lib/temporalio/workflow.rb +80 -6
- metadata +5 -2
@@ -780,6 +780,81 @@ module Temporalio
|
|
780
780
|
rpc_options:
|
781
781
|
)
|
782
782
|
end
|
783
|
+
|
784
|
+
# Calls CloudService.UpdateNamespaceTags API call.
|
785
|
+
#
|
786
|
+
# @param request [Temporalio::Api::Cloud::CloudService::V1::UpdateNamespaceTagsRequest] API request.
|
787
|
+
# @param rpc_options [RPCOptions, nil] Advanced RPC options.
|
788
|
+
# @return [Temporalio::Api::Cloud::CloudService::V1::UpdateNamespaceTagsResponse] API response.
|
789
|
+
def update_namespace_tags(request, rpc_options: nil)
|
790
|
+
invoke_rpc(
|
791
|
+
rpc: 'update_namespace_tags',
|
792
|
+
request_class: Temporalio::Api::Cloud::CloudService::V1::UpdateNamespaceTagsRequest,
|
793
|
+
response_class: Temporalio::Api::Cloud::CloudService::V1::UpdateNamespaceTagsResponse,
|
794
|
+
request:,
|
795
|
+
rpc_options:
|
796
|
+
)
|
797
|
+
end
|
798
|
+
|
799
|
+
# Calls CloudService.CreateConnectivityRule API call.
|
800
|
+
#
|
801
|
+
# @param request [Temporalio::Api::Cloud::CloudService::V1::CreateConnectivityRuleRequest] API request.
|
802
|
+
# @param rpc_options [RPCOptions, nil] Advanced RPC options.
|
803
|
+
# @return [Temporalio::Api::Cloud::CloudService::V1::CreateConnectivityRuleResponse] API response.
|
804
|
+
def create_connectivity_rule(request, rpc_options: nil)
|
805
|
+
invoke_rpc(
|
806
|
+
rpc: 'create_connectivity_rule',
|
807
|
+
request_class: Temporalio::Api::Cloud::CloudService::V1::CreateConnectivityRuleRequest,
|
808
|
+
response_class: Temporalio::Api::Cloud::CloudService::V1::CreateConnectivityRuleResponse,
|
809
|
+
request:,
|
810
|
+
rpc_options:
|
811
|
+
)
|
812
|
+
end
|
813
|
+
|
814
|
+
# Calls CloudService.GetConnectivityRule API call.
|
815
|
+
#
|
816
|
+
# @param request [Temporalio::Api::Cloud::CloudService::V1::GetConnectivityRuleRequest] API request.
|
817
|
+
# @param rpc_options [RPCOptions, nil] Advanced RPC options.
|
818
|
+
# @return [Temporalio::Api::Cloud::CloudService::V1::GetConnectivityRuleResponse] API response.
|
819
|
+
def get_connectivity_rule(request, rpc_options: nil)
|
820
|
+
invoke_rpc(
|
821
|
+
rpc: 'get_connectivity_rule',
|
822
|
+
request_class: Temporalio::Api::Cloud::CloudService::V1::GetConnectivityRuleRequest,
|
823
|
+
response_class: Temporalio::Api::Cloud::CloudService::V1::GetConnectivityRuleResponse,
|
824
|
+
request:,
|
825
|
+
rpc_options:
|
826
|
+
)
|
827
|
+
end
|
828
|
+
|
829
|
+
# Calls CloudService.GetConnectivityRules API call.
|
830
|
+
#
|
831
|
+
# @param request [Temporalio::Api::Cloud::CloudService::V1::GetConnectivityRulesRequest] API request.
|
832
|
+
# @param rpc_options [RPCOptions, nil] Advanced RPC options.
|
833
|
+
# @return [Temporalio::Api::Cloud::CloudService::V1::GetConnectivityRulesResponse] API response.
|
834
|
+
def get_connectivity_rules(request, rpc_options: nil)
|
835
|
+
invoke_rpc(
|
836
|
+
rpc: 'get_connectivity_rules',
|
837
|
+
request_class: Temporalio::Api::Cloud::CloudService::V1::GetConnectivityRulesRequest,
|
838
|
+
response_class: Temporalio::Api::Cloud::CloudService::V1::GetConnectivityRulesResponse,
|
839
|
+
request:,
|
840
|
+
rpc_options:
|
841
|
+
)
|
842
|
+
end
|
843
|
+
|
844
|
+
# Calls CloudService.DeleteConnectivityRule API call.
|
845
|
+
#
|
846
|
+
# @param request [Temporalio::Api::Cloud::CloudService::V1::DeleteConnectivityRuleRequest] API request.
|
847
|
+
# @param rpc_options [RPCOptions, nil] Advanced RPC options.
|
848
|
+
# @return [Temporalio::Api::Cloud::CloudService::V1::DeleteConnectivityRuleResponse] API response.
|
849
|
+
def delete_connectivity_rule(request, rpc_options: nil)
|
850
|
+
invoke_rpc(
|
851
|
+
rpc: 'delete_connectivity_rule',
|
852
|
+
request_class: Temporalio::Api::Cloud::CloudService::V1::DeleteConnectivityRuleRequest,
|
853
|
+
response_class: Temporalio::Api::Cloud::CloudService::V1::DeleteConnectivityRuleResponse,
|
854
|
+
request:,
|
855
|
+
rpc_options:
|
856
|
+
)
|
857
|
+
end
|
783
858
|
end
|
784
859
|
end
|
785
860
|
end
|
@@ -1350,6 +1350,51 @@ module Temporalio
|
|
1350
1350
|
rpc_options:
|
1351
1351
|
)
|
1352
1352
|
end
|
1353
|
+
|
1354
|
+
# Calls WorkflowService.UpdateTaskQueueConfig API call.
|
1355
|
+
#
|
1356
|
+
# @param request [Temporalio::Api::WorkflowService::V1::UpdateTaskQueueConfigRequest] API request.
|
1357
|
+
# @param rpc_options [RPCOptions, nil] Advanced RPC options.
|
1358
|
+
# @return [Temporalio::Api::WorkflowService::V1::UpdateTaskQueueConfigResponse] API response.
|
1359
|
+
def update_task_queue_config(request, rpc_options: nil)
|
1360
|
+
invoke_rpc(
|
1361
|
+
rpc: 'update_task_queue_config',
|
1362
|
+
request_class: Temporalio::Api::WorkflowService::V1::UpdateTaskQueueConfigRequest,
|
1363
|
+
response_class: Temporalio::Api::WorkflowService::V1::UpdateTaskQueueConfigResponse,
|
1364
|
+
request:,
|
1365
|
+
rpc_options:
|
1366
|
+
)
|
1367
|
+
end
|
1368
|
+
|
1369
|
+
# Calls WorkflowService.FetchWorkerConfig API call.
|
1370
|
+
#
|
1371
|
+
# @param request [Temporalio::Api::WorkflowService::V1::FetchWorkerConfigRequest] API request.
|
1372
|
+
# @param rpc_options [RPCOptions, nil] Advanced RPC options.
|
1373
|
+
# @return [Temporalio::Api::WorkflowService::V1::FetchWorkerConfigResponse] API response.
|
1374
|
+
def fetch_worker_config(request, rpc_options: nil)
|
1375
|
+
invoke_rpc(
|
1376
|
+
rpc: 'fetch_worker_config',
|
1377
|
+
request_class: Temporalio::Api::WorkflowService::V1::FetchWorkerConfigRequest,
|
1378
|
+
response_class: Temporalio::Api::WorkflowService::V1::FetchWorkerConfigResponse,
|
1379
|
+
request:,
|
1380
|
+
rpc_options:
|
1381
|
+
)
|
1382
|
+
end
|
1383
|
+
|
1384
|
+
# Calls WorkflowService.UpdateWorkerConfig API call.
|
1385
|
+
#
|
1386
|
+
# @param request [Temporalio::Api::WorkflowService::V1::UpdateWorkerConfigRequest] API request.
|
1387
|
+
# @param rpc_options [RPCOptions, nil] Advanced RPC options.
|
1388
|
+
# @return [Temporalio::Api::WorkflowService::V1::UpdateWorkerConfigResponse] API response.
|
1389
|
+
def update_worker_config(request, rpc_options: nil)
|
1390
|
+
invoke_rpc(
|
1391
|
+
rpc: 'update_worker_config',
|
1392
|
+
request_class: Temporalio::Api::WorkflowService::V1::UpdateWorkerConfigRequest,
|
1393
|
+
response_class: Temporalio::Api::WorkflowService::V1::UpdateWorkerConfigResponse,
|
1394
|
+
request:,
|
1395
|
+
rpc_options:
|
1396
|
+
)
|
1397
|
+
end
|
1353
1398
|
end
|
1354
1399
|
end
|
1355
1400
|
end
|
@@ -124,7 +124,8 @@ module Temporalio
|
|
124
124
|
# Options for HTTP CONNECT proxy for client connections.
|
125
125
|
#
|
126
126
|
# @!attribute target_host
|
127
|
-
# @return [String] Target
|
127
|
+
# @return [String] Target for the HTTP CONNECT proxy. Use host:port for TCP, or unix:/path/to/unix.sock for Unix
|
128
|
+
# socket (meaning it'll start with "unix:/").
|
128
129
|
# @!attribute basic_auth_user
|
129
130
|
# @return [String, nil] User for HTTP basic auth for the proxy, must be combined with {basic_auth_pass}.
|
130
131
|
# @!attribute basic_auth_pass
|
@@ -453,19 +453,15 @@ module Temporalio
|
|
453
453
|
'temporalRunID' => Temporalio::Workflow.info.run_id }.merge(attributes)
|
454
454
|
|
455
455
|
time = Temporalio::Workflow.now.dup
|
456
|
-
# Disable
|
457
|
-
#
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
#
|
462
|
-
|
463
|
-
|
464
|
-
|
465
|
-
span.record_exception(exception) if exception
|
466
|
-
# Finish the span (returns self)
|
467
|
-
span.finish(end_timestamp: time)
|
468
|
-
end
|
456
|
+
# Disable durable scheduler because 1) synchronous/non-batch span processors in OTel use network (though could
|
457
|
+
# have just used Unafe.io_enabled for this if not for the next point) and 2) OTel uses Ruby Timeout which we
|
458
|
+
# don't want to use durable timers.
|
459
|
+
Temporalio::Workflow::Unsafe.durable_scheduler_disabled do
|
460
|
+
span = root.tracer.start_span(name, attributes:, links:, start_timestamp: time, kind:) # steep:ignore
|
461
|
+
# Record exception if present
|
462
|
+
span.record_exception(exception) if exception
|
463
|
+
# Finish the span (returns self)
|
464
|
+
span.finish(end_timestamp: time)
|
469
465
|
end
|
470
466
|
end
|
471
467
|
end
|
@@ -3,6 +3,7 @@
|
|
3
3
|
require 'json'
|
4
4
|
require 'temporalio/api'
|
5
5
|
require 'temporalio/converters/payload_converter/encoding'
|
6
|
+
require 'temporalio/workflow'
|
6
7
|
|
7
8
|
module Temporalio
|
8
9
|
module Converters
|
@@ -28,15 +29,31 @@ module Temporalio
|
|
28
29
|
|
29
30
|
# (see Encoding.to_payload)
|
30
31
|
def to_payload(value, hint: nil) # rubocop:disable Lint/UnusedMethodArgument
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
32
|
+
# For generate and parse, if we are in a workflow, we need to do this outside of the durable scheduler since
|
33
|
+
# some things like the recent https://github.com/ruby/json/pull/832 may make illegal File.expand_path calls.
|
34
|
+
# And other future things may be slightly illegal in JSON generate/parse and we don't want to break everyone
|
35
|
+
# when it happens.
|
36
|
+
data = if Temporalio::Workflow.in_workflow?
|
37
|
+
Temporalio::Workflow::Unsafe.durable_scheduler_disabled do
|
38
|
+
JSON.generate(value, @generate_options).b
|
39
|
+
end
|
40
|
+
else
|
41
|
+
JSON.generate(value, @generate_options).b
|
42
|
+
end
|
43
|
+
|
44
|
+
Api::Common::V1::Payload.new(metadata: { 'encoding' => ENCODING }, data:)
|
35
45
|
end
|
36
46
|
|
37
47
|
# (see Encoding.from_payload)
|
38
48
|
def from_payload(payload, hint: nil) # rubocop:disable Lint/UnusedMethodArgument
|
39
|
-
|
49
|
+
# See comment in to_payload about why we have to do something different in workflow
|
50
|
+
if Temporalio::Workflow.in_workflow?
|
51
|
+
Temporalio::Workflow::Unsafe.durable_scheduler_disabled do
|
52
|
+
JSON.parse(payload.data, @parse_options)
|
53
|
+
end
|
54
|
+
else
|
55
|
+
JSON.parse(payload.data, @parse_options)
|
56
|
+
end
|
40
57
|
end
|
41
58
|
end
|
42
59
|
end
|
@@ -0,0 +1,343 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'pathname'
|
4
|
+
require 'temporalio/internal/bridge'
|
5
|
+
|
6
|
+
module Temporalio
|
7
|
+
# Environment and file-based configuration for Temporal clients
|
8
|
+
#
|
9
|
+
# WARNING: Experimental API.
|
10
|
+
module EnvConfig
|
11
|
+
# This module provides utilities to load Temporal client configuration from TOML files
|
12
|
+
# and environment variables.
|
13
|
+
|
14
|
+
# TLS configuration as specified as part of client configuration
|
15
|
+
#
|
16
|
+
# @!attribute [r] disabled
|
17
|
+
# @return [Boolean, nil] If true, TLS is explicitly disabled; if nil, not specified
|
18
|
+
# @!attribute [r] server_name
|
19
|
+
# @return [String, nil] SNI override
|
20
|
+
# @!attribute [r] server_root_ca_cert
|
21
|
+
# @return [Pathname, String, nil] Server CA certificate source
|
22
|
+
# @!attribute [r] client_cert
|
23
|
+
# @return [Pathname, String, nil] Client certificate source
|
24
|
+
# @!attribute [r] client_private_key
|
25
|
+
# @return [Pathname, String, nil] Client key source
|
26
|
+
ClientConfigTLS = Data.define(:disabled, :server_name, :server_root_ca_cert, :client_cert, :client_private_key)
|
27
|
+
|
28
|
+
# TLS configuration for Temporal client connections.
|
29
|
+
#
|
30
|
+
# This class provides methods for creating, serializing, and converting
|
31
|
+
# TLS configuration objects used by Temporal clients.
|
32
|
+
class ClientConfigTLS
|
33
|
+
# Create a ClientConfigTLS from a hash
|
34
|
+
# @param hash [Hash, nil] Hash representation
|
35
|
+
# @return [ClientConfigTLS, nil] The TLS configuration or nil if hash is nil/empty
|
36
|
+
def self.from_h(hash)
|
37
|
+
return nil if hash.nil? || hash.empty?
|
38
|
+
|
39
|
+
new(
|
40
|
+
disabled: hash[:disabled],
|
41
|
+
server_name: hash[:server_name],
|
42
|
+
server_root_ca_cert: hash_to_source(hash[:server_ca_cert]),
|
43
|
+
client_cert: hash_to_source(hash[:client_cert]),
|
44
|
+
client_private_key: hash_to_source(hash[:client_key])
|
45
|
+
)
|
46
|
+
end
|
47
|
+
|
48
|
+
# Set default values
|
49
|
+
def initialize(disabled: nil, server_name: nil, server_root_ca_cert: nil, client_cert: nil,
|
50
|
+
client_private_key: nil)
|
51
|
+
super
|
52
|
+
end
|
53
|
+
|
54
|
+
# Convert to a hash that can be used for TOML serialization
|
55
|
+
# @return [Hash] Dictionary representation
|
56
|
+
def to_h
|
57
|
+
{
|
58
|
+
disabled:,
|
59
|
+
server_name:,
|
60
|
+
server_ca_cert: server_root_ca_cert ? source_to_hash(server_root_ca_cert) : nil,
|
61
|
+
client_cert: client_cert ? source_to_hash(client_cert) : nil,
|
62
|
+
client_key: client_private_key ? source_to_hash(client_private_key) : nil
|
63
|
+
}.compact
|
64
|
+
end
|
65
|
+
|
66
|
+
# Create a TLS configuration for use with connections
|
67
|
+
# @return [Connection::TLSOptions, false] TLS options or false if disabled
|
68
|
+
def to_client_tls_options
|
69
|
+
return false if disabled
|
70
|
+
|
71
|
+
Client::Connection::TLSOptions.new(
|
72
|
+
domain: server_name,
|
73
|
+
server_root_ca_cert: read_source(server_root_ca_cert),
|
74
|
+
client_cert: read_source(client_cert),
|
75
|
+
client_private_key: read_source(client_private_key)
|
76
|
+
)
|
77
|
+
end
|
78
|
+
|
79
|
+
private
|
80
|
+
|
81
|
+
class << self
|
82
|
+
private
|
83
|
+
|
84
|
+
# Convert hash to source object (Pathname or String)
|
85
|
+
def hash_to_source(hash)
|
86
|
+
return nil if hash.nil?
|
87
|
+
|
88
|
+
# Always expect a hash with path or data
|
89
|
+
if hash[:path]
|
90
|
+
Pathname.new(hash[:path])
|
91
|
+
elsif hash[:data]
|
92
|
+
hash[:data]
|
93
|
+
end
|
94
|
+
end
|
95
|
+
end
|
96
|
+
|
97
|
+
def source_to_hash(source)
|
98
|
+
case source
|
99
|
+
when Pathname
|
100
|
+
{ path: source.to_s }
|
101
|
+
when String
|
102
|
+
# String is always treated as data content
|
103
|
+
{ data: source }
|
104
|
+
when nil
|
105
|
+
nil
|
106
|
+
else
|
107
|
+
raise TypeError, "Source must be Pathname, String, or nil, got #{source.class}"
|
108
|
+
end
|
109
|
+
end
|
110
|
+
|
111
|
+
def read_source(source)
|
112
|
+
case source
|
113
|
+
when Pathname
|
114
|
+
File.read(source.to_s)
|
115
|
+
when String
|
116
|
+
# String is always treated as raw data content
|
117
|
+
source
|
118
|
+
when nil
|
119
|
+
nil
|
120
|
+
else
|
121
|
+
raise TypeError, "Source must be Pathname, String, or nil, got #{source.class}"
|
122
|
+
end
|
123
|
+
end
|
124
|
+
end
|
125
|
+
|
126
|
+
# Represents a client configuration profile.
|
127
|
+
#
|
128
|
+
# This class holds the configuration as loaded from a file or environment.
|
129
|
+
# See #to_client_connect_options to transform the profile to a connect config hash.
|
130
|
+
#
|
131
|
+
# @!attribute [r] address
|
132
|
+
# @return [String, nil] Client address
|
133
|
+
# @!attribute [r] namespace
|
134
|
+
# @return [String, nil] Client namespace
|
135
|
+
# @!attribute [r] api_key
|
136
|
+
# @return [String, nil] Client API key
|
137
|
+
# @!attribute [r] tls
|
138
|
+
# @return [Boolean, ClientConfigTLS, nil] TLS configuration
|
139
|
+
# @!attribute [r] grpc_meta
|
140
|
+
# @return [Hash] gRPC metadata
|
141
|
+
ClientConfigProfile = Data.define(:address, :namespace, :api_key, :tls, :grpc_meta)
|
142
|
+
|
143
|
+
# A client configuration profile loaded from environment and files.
|
144
|
+
#
|
145
|
+
# This class represents a complete client configuration profile that can be
|
146
|
+
# loaded from TOML files and environment variables, and converted to client
|
147
|
+
# connection options.
|
148
|
+
class ClientConfigProfile
|
149
|
+
# Create a ClientConfigProfile from a hash
|
150
|
+
# @param hash [Hash] Hash representation
|
151
|
+
# @return [ClientConfigProfile] The client profile
|
152
|
+
def self.from_h(hash)
|
153
|
+
new(
|
154
|
+
address: hash[:address],
|
155
|
+
namespace: hash[:namespace],
|
156
|
+
api_key: hash[:api_key],
|
157
|
+
tls: ClientConfigTLS.from_h(hash[:tls]),
|
158
|
+
grpc_meta: hash[:grpc_meta] || {}
|
159
|
+
)
|
160
|
+
end
|
161
|
+
|
162
|
+
# Load a single client profile from given sources, applying env overrides.
|
163
|
+
#
|
164
|
+
# @param profile [String, nil] Profile to load from the config
|
165
|
+
# @param config_source [Pathname, String, nil] Configuration source -
|
166
|
+
# Pathname for file path, String for TOML content
|
167
|
+
# @param disable_file [Boolean] If true, file loading is disabled
|
168
|
+
# @param disable_env [Boolean] If true, environment variable loading and overriding is disabled
|
169
|
+
# @param config_file_strict [Boolean] If true, will error on unrecognized keys
|
170
|
+
# @param override_env_vars [Hash, nil] Environment variables to use for loading and overrides
|
171
|
+
# @return [ClientConfigProfile] The client configuration profile
|
172
|
+
def self.load(
|
173
|
+
profile: nil,
|
174
|
+
config_source: nil,
|
175
|
+
disable_file: false,
|
176
|
+
disable_env: false,
|
177
|
+
config_file_strict: false,
|
178
|
+
override_env_vars: nil
|
179
|
+
)
|
180
|
+
path, data = EnvConfig._source_to_path_and_data(config_source)
|
181
|
+
|
182
|
+
raw_profile = Internal::Bridge::EnvConfig.load_client_connect_config(
|
183
|
+
profile,
|
184
|
+
path,
|
185
|
+
data,
|
186
|
+
disable_file,
|
187
|
+
disable_env,
|
188
|
+
config_file_strict,
|
189
|
+
override_env_vars || {}
|
190
|
+
)
|
191
|
+
|
192
|
+
from_h(raw_profile)
|
193
|
+
end
|
194
|
+
|
195
|
+
# Create a ClientConfigProfile instance with defaults
|
196
|
+
def initialize(address: nil, namespace: nil, api_key: nil, tls: nil, grpc_meta: {})
|
197
|
+
super
|
198
|
+
end
|
199
|
+
|
200
|
+
# Convert to a hash that can be used for TOML serialization
|
201
|
+
# @return [Hash] Dictionary representation
|
202
|
+
def to_h
|
203
|
+
{
|
204
|
+
address: address,
|
205
|
+
namespace: namespace,
|
206
|
+
api_key: api_key,
|
207
|
+
tls: tls&.to_h&.then { |tls_hash| tls_hash.empty? ? nil : tls_hash }, # steep:ignore
|
208
|
+
grpc_meta: grpc_meta && grpc_meta.empty? ? nil : grpc_meta
|
209
|
+
}.compact
|
210
|
+
end
|
211
|
+
|
212
|
+
# Create a client connect config from this profile
|
213
|
+
# @return [Array] Tuple of [positional_args, keyword_args] that can be splatted to Client.connect
|
214
|
+
def to_client_connect_options
|
215
|
+
positional_args = [address, namespace].compact
|
216
|
+
tls_value = false
|
217
|
+
if tls
|
218
|
+
tls_value = tls.to_client_tls_options
|
219
|
+
elsif api_key
|
220
|
+
tls_value = true
|
221
|
+
end
|
222
|
+
|
223
|
+
keyword_args = {
|
224
|
+
api_key: api_key,
|
225
|
+
rpc_metadata: (grpc_meta if grpc_meta && !grpc_meta.empty?),
|
226
|
+
tls: tls_value
|
227
|
+
}.compact
|
228
|
+
|
229
|
+
[positional_args, keyword_args]
|
230
|
+
end
|
231
|
+
end
|
232
|
+
|
233
|
+
# Client configuration loaded from TOML and environment variables.
|
234
|
+
#
|
235
|
+
# This contains a mapping of profile names to client profiles.
|
236
|
+
#
|
237
|
+
# @!attribute [r] profiles
|
238
|
+
# @return [Hash<String, ClientConfigProfile>] Map of profile name to its corresponding ClientConfigProfile
|
239
|
+
ClientConfig = Data.define(:profiles)
|
240
|
+
|
241
|
+
# Container for multiple client configuration profiles.
|
242
|
+
#
|
243
|
+
# This class holds a collection of named client profiles loaded from
|
244
|
+
# configuration sources and provides methods for profile management
|
245
|
+
# and client connection configuration.
|
246
|
+
class ClientConfig
|
247
|
+
# Create a ClientConfig from a hash
|
248
|
+
# @param hash [Hash] Hash representation
|
249
|
+
# @return [ClientConfig] The client configuration
|
250
|
+
def self.from_h(hash)
|
251
|
+
profiles = hash.transform_values do |profile_hash|
|
252
|
+
ClientConfigProfile.from_h(profile_hash)
|
253
|
+
end
|
254
|
+
new(profiles: profiles)
|
255
|
+
end
|
256
|
+
|
257
|
+
# Load all client profiles from given sources.
|
258
|
+
#
|
259
|
+
# This does not apply environment variable overrides to the profiles, it
|
260
|
+
# only uses an environment variable to find the default config file path
|
261
|
+
# (TEMPORAL_CONFIG_FILE).
|
262
|
+
#
|
263
|
+
# @param config_source [Pathname, String, nil] Configuration source
|
264
|
+
# @param config_file_strict [Boolean] If true, will error on unrecognized keys
|
265
|
+
# @param override_env_vars [Hash, nil] Environment variables to use
|
266
|
+
# @return [ClientConfig] The client configuration
|
267
|
+
def self.load(
|
268
|
+
config_source: nil,
|
269
|
+
config_file_strict: false,
|
270
|
+
override_env_vars: nil
|
271
|
+
)
|
272
|
+
path, data = EnvConfig._source_to_path_and_data(config_source)
|
273
|
+
|
274
|
+
loaded_profiles = Internal::Bridge::EnvConfig.load_client_config(
|
275
|
+
path,
|
276
|
+
data,
|
277
|
+
config_file_strict,
|
278
|
+
override_env_vars || {}
|
279
|
+
)
|
280
|
+
|
281
|
+
from_h(loaded_profiles)
|
282
|
+
end
|
283
|
+
|
284
|
+
# Load a single client profile and convert to connect config
|
285
|
+
#
|
286
|
+
# This is a convenience function that combines loading a profile and
|
287
|
+
# converting it to a connect config hash.
|
288
|
+
#
|
289
|
+
# @param profile [String, nil] The profile to load from the config
|
290
|
+
# @param config_source [Pathname, String, nil] Configuration source
|
291
|
+
# @param disable_file [Boolean] If true, file loading is disabled
|
292
|
+
# @param disable_env [Boolean] If true, environment variable loading and overriding is disabled
|
293
|
+
# @param config_file_strict [Boolean] If true, will error on unrecognized keys
|
294
|
+
# @param override_env_vars [Hash, nil] Environment variables to use for loading and overrides
|
295
|
+
# @return [Array] Tuple of [positional_args, keyword_args] that can be splatted to Client.connect
|
296
|
+
def self.load_client_connect_options(
|
297
|
+
profile: nil,
|
298
|
+
config_source: nil,
|
299
|
+
disable_file: false,
|
300
|
+
disable_env: false,
|
301
|
+
config_file_strict: false,
|
302
|
+
override_env_vars: nil
|
303
|
+
)
|
304
|
+
prof = ClientConfigProfile.load(
|
305
|
+
profile: profile,
|
306
|
+
config_source: config_source,
|
307
|
+
disable_file: disable_file,
|
308
|
+
disable_env: disable_env,
|
309
|
+
config_file_strict: config_file_strict,
|
310
|
+
override_env_vars: override_env_vars
|
311
|
+
)
|
312
|
+
prof.to_client_connect_options
|
313
|
+
end
|
314
|
+
|
315
|
+
# Create a ClientConfig instance with defaults
|
316
|
+
def initialize(profiles: {})
|
317
|
+
super
|
318
|
+
end
|
319
|
+
|
320
|
+
# Convert to a hash that can be used for TOML serialization
|
321
|
+
# @return [Hash] Dictionary representation
|
322
|
+
def to_h
|
323
|
+
profiles.transform_values(&:to_h)
|
324
|
+
end
|
325
|
+
end
|
326
|
+
|
327
|
+
# @param source [Pathname, String, nil] Configuration source
|
328
|
+
# @return [Array<String?, String?>] Tuple of [path, data]
|
329
|
+
# @!visibility private
|
330
|
+
def self._source_to_path_and_data(source)
|
331
|
+
case source
|
332
|
+
when Pathname
|
333
|
+
[source.to_s, nil]
|
334
|
+
when String
|
335
|
+
[nil, source]
|
336
|
+
when nil
|
337
|
+
[nil, nil]
|
338
|
+
else
|
339
|
+
raise TypeError, "Must be Pathname, String, or nil, got #{source.class}"
|
340
|
+
end
|
341
|
+
end
|
342
|
+
end
|
343
|
+
end
|
data/lib/temporalio/error.rb
CHANGED
@@ -97,9 +97,13 @@ module Temporalio
|
|
97
97
|
|
98
98
|
# Error that occurs when an async activity handle tries to heartbeat and the activity is marked as canceled.
|
99
99
|
class AsyncActivityCanceledError < Error
|
100
|
+
# @return [Activity::CancellationDetails]
|
101
|
+
attr_reader :details
|
102
|
+
|
100
103
|
# @!visibility private
|
101
|
-
def initialize
|
104
|
+
def initialize(details)
|
102
105
|
super('Activity canceled')
|
106
|
+
@details = details
|
103
107
|
end
|
104
108
|
end
|
105
109
|
|
Binary file
|
Binary file
|
Binary file
|
@@ -17,7 +17,7 @@ require 'temporalio/internal/bridge/api/common/common'
|
|
17
17
|
require 'temporalio/internal/bridge/api/nexus/nexus'
|
18
18
|
|
19
19
|
|
20
|
-
descriptor_data = "\n?temporal/sdk/core/workflow_activation/workflow_activation.proto\x12\x1b\x63oresdk.workflow_activation\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a%temporal/api/failure/v1/message.proto\x1a$temporal/api/update/v1/message.proto\x1a$temporal/api/common/v1/message.proto\x1a$temporal/api/enums/v1/workflow.proto\x1a\x37temporal/sdk/core/activity_result/activity_result.proto\x1a\x35temporal/sdk/core/child_workflow/child_workflow.proto\x1a%temporal/sdk/core/common/common.proto\x1a#temporal/sdk/core/nexus/nexus.proto\"\xfa\x02\n\x12WorkflowActivation\x12\x0e\n\x06run_id\x18\x01 \x01(\t\x12-\n\ttimestamp\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x14\n\x0cis_replaying\x18\x03 \x01(\x08\x12\x16\n\x0ehistory_length\x18\x04 \x01(\r\x12@\n\x04jobs\x18\x05 \x03(\x0b\x32\x32.coresdk.workflow_activation.WorkflowActivationJob\x12 \n\x18\x61vailable_internal_flags\x18\x06 \x03(\r\x12\x1a\n\x12history_size_bytes\x18\x07 \x01(\x04\x12!\n\x19\x63ontinue_as_new_suggested\x18\x08 \x01(\x08\x12T\n#deployment_version_for_current_task\x18\t \x01(\x0b\x32\'.coresdk.common.WorkerDeploymentVersion\"\xe0\n\n\x15WorkflowActivationJob\x12N\n\x13initialize_workflow\x18\x01 \x01(\x0b\x32/.coresdk.workflow_activation.InitializeWorkflowH\x00\x12<\n\nfire_timer\x18\x02 \x01(\x0b\x32&.coresdk.workflow_activation.FireTimerH\x00\x12K\n\x12update_random_seed\x18\x04 \x01(\x0b\x32-.coresdk.workflow_activation.UpdateRandomSeedH\x00\x12\x44\n\x0equery_workflow\x18\x05 \x01(\x0b\x32*.coresdk.workflow_activation.QueryWorkflowH\x00\x12\x46\n\x0f\x63\x61ncel_workflow\x18\x06 \x01(\x0b\x32+.coresdk.workflow_activation.CancelWorkflowH\x00\x12\x46\n\x0fsignal_workflow\x18\x07 \x01(\x0b\x32+.coresdk.workflow_activation.SignalWorkflowH\x00\x12H\n\x10resolve_activity\x18\x08 \x01(\x0b\x32,.coresdk.workflow_activation.ResolveActivityH\x00\x12G\n\x10notify_has_patch\x18\t \x01(\x0b\x32+.coresdk.workflow_activation.NotifyHasPatchH\x00\x12q\n&resolve_child_workflow_execution_start\x18\n \x01(\x0b\x32?.coresdk.workflow_activation.ResolveChildWorkflowExecutionStartH\x00\x12\x66\n resolve_child_workflow_execution\x18\x0b \x01(\x0b\x32:.coresdk.workflow_activation.ResolveChildWorkflowExecutionH\x00\x12\x66\n resolve_signal_external_workflow\x18\x0c \x01(\x0b\x32:.coresdk.workflow_activation.ResolveSignalExternalWorkflowH\x00\x12u\n(resolve_request_cancel_external_workflow\x18\r \x01(\x0b\x32\x41.coresdk.workflow_activation.ResolveRequestCancelExternalWorkflowH\x00\x12:\n\tdo_update\x18\x0e \x01(\x0b\x32%.coresdk.workflow_activation.DoUpdateH\x00\x12`\n\x1dresolve_nexus_operation_start\x18\x0f \x01(\x0b\x32\x37.coresdk.workflow_activation.ResolveNexusOperationStartH\x00\x12U\n\x17resolve_nexus_operation\x18\x10 \x01(\x0b\x32\x32.coresdk.workflow_activation.ResolveNexusOperationH\x00\x12I\n\x11remove_from_cache\x18\x32 \x01(\x0b\x32,.coresdk.workflow_activation.RemoveFromCacheH\x00\x42\t\n\x07variant\"\xd9\n\n\x12InitializeWorkflow\x12\x15\n\rworkflow_type\x18\x01 \x01(\t\x12\x13\n\x0bworkflow_id\x18\x02 \x01(\t\x12\x32\n\targuments\x18\x03 \x03(\x0b\x32\x1f.temporal.api.common.v1.Payload\x12\x17\n\x0frandomness_seed\x18\x04 \x01(\x04\x12M\n\x07headers\x18\x05 \x03(\x0b\x32<.coresdk.workflow_activation.InitializeWorkflow.HeadersEntry\x12\x10\n\x08identity\x18\x06 \x01(\t\x12I\n\x14parent_workflow_info\x18\x07 \x01(\x0b\x32+.coresdk.common.NamespacedWorkflowExecution\x12=\n\x1aworkflow_execution_timeout\x18\x08 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x37\n\x14workflow_run_timeout\x18\t \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x38\n\x15workflow_task_timeout\x18\n \x01(\x0b\x32\x19.google.protobuf.Duration\x12\'\n\x1f\x63ontinued_from_execution_run_id\x18\x0b \x01(\t\x12J\n\x13\x63ontinued_initiator\x18\x0c \x01(\x0e\x32-.temporal.api.enums.v1.ContinueAsNewInitiator\x12;\n\x11\x63ontinued_failure\x18\r \x01(\x0b\x32 .temporal.api.failure.v1.Failure\x12@\n\x16last_completion_result\x18\x0e \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12\x1e\n\x16\x66irst_execution_run_id\x18\x0f \x01(\t\x12\x39\n\x0cretry_policy\x18\x10 \x01(\x0b\x32#.temporal.api.common.v1.RetryPolicy\x12\x0f\n\x07\x61ttempt\x18\x11 \x01(\x05\x12\x15\n\rcron_schedule\x18\x12 \x01(\t\x12\x46\n\"workflow_execution_expiration_time\x18\x13 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x45\n\"cron_schedule_to_schedule_interval\x18\x14 \x01(\x0b\x32\x19.google.protobuf.Duration\x12*\n\x04memo\x18\x15 \x01(\x0b\x32\x1c.temporal.api.common.v1.Memo\x12\x43\n\x11search_attributes\x18\x16 \x01(\x0b\x32(.temporal.api.common.v1.SearchAttributes\x12.\n\nstart_time\x18\x17 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12@\n\rroot_workflow\x18\x18 \x01(\x0b\x32).temporal.api.common.v1.WorkflowExecution\x12\x32\n\x08priority\x18\x19 \x01(\x0b\x32 .temporal.api.common.v1.Priority\x1aO\n\x0cHeadersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12.\n\x05value\x18\x02 \x01(\x0b\x32\x1f.temporal.api.common.v1.Payload:\x02\x38\x01\"\x18\n\tFireTimer\x12\x0b\n\x03seq\x18\x01 \x01(\r\"m\n\x0fResolveActivity\x12\x0b\n\x03seq\x18\x01 \x01(\r\x12;\n\x06result\x18\x02 \x01(\x0b\x32+.coresdk.activity_result.ActivityResolution\x12\x10\n\x08is_local\x18\x03 \x01(\x08\"\xd1\x02\n\"ResolveChildWorkflowExecutionStart\x12\x0b\n\x03seq\x18\x01 \x01(\r\x12[\n\tsucceeded\x18\x02 \x01(\x0b\x32\x46.coresdk.workflow_activation.ResolveChildWorkflowExecutionStartSuccessH\x00\x12X\n\x06\x66\x61iled\x18\x03 \x01(\x0b\x32\x46.coresdk.workflow_activation.ResolveChildWorkflowExecutionStartFailureH\x00\x12]\n\tcancelled\x18\x04 \x01(\x0b\x32H.coresdk.workflow_activation.ResolveChildWorkflowExecutionStartCancelledH\x00\x42\x08\n\x06status\";\n)ResolveChildWorkflowExecutionStartSuccess\x12\x0e\n\x06run_id\x18\x01 \x01(\t\"\xa6\x01\n)ResolveChildWorkflowExecutionStartFailure\x12\x13\n\x0bworkflow_id\x18\x01 \x01(\t\x12\x15\n\rworkflow_type\x18\x02 \x01(\t\x12M\n\x05\x63\x61use\x18\x03 \x01(\x0e\x32>.coresdk.child_workflow.StartChildWorkflowExecutionFailedCause\"`\n+ResolveChildWorkflowExecutionStartCancelled\x12\x31\n\x07\x66\x61ilure\x18\x01 \x01(\x0b\x32 .temporal.api.failure.v1.Failure\"i\n\x1dResolveChildWorkflowExecution\x12\x0b\n\x03seq\x18\x01 \x01(\r\x12;\n\x06result\x18\x02 \x01(\x0b\x32+.coresdk.child_workflow.ChildWorkflowResult\"+\n\x10UpdateRandomSeed\x12\x17\n\x0frandomness_seed\x18\x01 \x01(\x04\"\x84\x02\n\rQueryWorkflow\x12\x10\n\x08query_id\x18\x01 \x01(\t\x12\x12\n\nquery_type\x18\x02 \x01(\t\x12\x32\n\targuments\x18\x03 \x03(\x0b\x32\x1f.temporal.api.common.v1.Payload\x12H\n\x07headers\x18\x05 \x03(\x0b\x32\x37.coresdk.workflow_activation.QueryWorkflow.HeadersEntry\x1aO\n\x0cHeadersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12.\n\x05value\x18\x02 \x01(\x0b\x32\x1f.temporal.api.common.v1.Payload:\x02\x38\x01\" \n\x0e\x43\x61ncelWorkflow\x12\x0e\n\x06reason\x18\x01 \x01(\t\"\x83\x02\n\x0eSignalWorkflow\x12\x13\n\x0bsignal_name\x18\x01 \x01(\t\x12.\n\x05input\x18\x02 \x03(\x0b\x32\x1f.temporal.api.common.v1.Payload\x12\x10\n\x08identity\x18\x03 \x01(\t\x12I\n\x07headers\x18\x05 \x03(\x0b\x32\x38.coresdk.workflow_activation.SignalWorkflow.HeadersEntry\x1aO\n\x0cHeadersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12.\n\x05value\x18\x02 \x01(\x0b\x32\x1f.temporal.api.common.v1.Payload:\x02\x38\x01\"\"\n\x0eNotifyHasPatch\x12\x10\n\x08patch_id\x18\x01 \x01(\t\"_\n\x1dResolveSignalExternalWorkflow\x12\x0b\n\x03seq\x18\x01 \x01(\r\x12\x31\n\x07\x66\x61ilure\x18\x02 \x01(\x0b\x32 .temporal.api.failure.v1.Failure\"f\n$ResolveRequestCancelExternalWorkflow\x12\x0b\n\x03seq\x18\x01 \x01(\r\x12\x31\n\x07\x66\x61ilure\x18\x02 \x01(\x0b\x32 .temporal.api.failure.v1.Failure\"\xcb\x02\n\x08\x44oUpdate\x12\n\n\x02id\x18\x01 \x01(\t\x12\x1c\n\x14protocol_instance_id\x18\x02 \x01(\t\x12\x0c\n\x04name\x18\x03 \x01(\t\x12.\n\x05input\x18\x04 \x03(\x0b\x32\x1f.temporal.api.common.v1.Payload\x12\x43\n\x07headers\x18\x05 \x03(\x0b\x32\x32.coresdk.workflow_activation.DoUpdate.HeadersEntry\x12*\n\x04meta\x18\x06 \x01(\x0b\x32\x1c.temporal.api.update.v1.Meta\x12\x15\n\rrun_validator\x18\x07 \x01(\x08\x1aO\n\x0cHeadersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12.\n\x05value\x18\x02 \x01(\x0b\x32\x1f.temporal.api.common.v1.Payload:\x02\x38\x01\"\
|
20
|
+
descriptor_data = "\n?temporal/sdk/core/workflow_activation/workflow_activation.proto\x12\x1b\x63oresdk.workflow_activation\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a%temporal/api/failure/v1/message.proto\x1a$temporal/api/update/v1/message.proto\x1a$temporal/api/common/v1/message.proto\x1a$temporal/api/enums/v1/workflow.proto\x1a\x37temporal/sdk/core/activity_result/activity_result.proto\x1a\x35temporal/sdk/core/child_workflow/child_workflow.proto\x1a%temporal/sdk/core/common/common.proto\x1a#temporal/sdk/core/nexus/nexus.proto\"\xfa\x02\n\x12WorkflowActivation\x12\x0e\n\x06run_id\x18\x01 \x01(\t\x12-\n\ttimestamp\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x14\n\x0cis_replaying\x18\x03 \x01(\x08\x12\x16\n\x0ehistory_length\x18\x04 \x01(\r\x12@\n\x04jobs\x18\x05 \x03(\x0b\x32\x32.coresdk.workflow_activation.WorkflowActivationJob\x12 \n\x18\x61vailable_internal_flags\x18\x06 \x03(\r\x12\x1a\n\x12history_size_bytes\x18\x07 \x01(\x04\x12!\n\x19\x63ontinue_as_new_suggested\x18\x08 \x01(\x08\x12T\n#deployment_version_for_current_task\x18\t \x01(\x0b\x32\'.coresdk.common.WorkerDeploymentVersion\"\xe0\n\n\x15WorkflowActivationJob\x12N\n\x13initialize_workflow\x18\x01 \x01(\x0b\x32/.coresdk.workflow_activation.InitializeWorkflowH\x00\x12<\n\nfire_timer\x18\x02 \x01(\x0b\x32&.coresdk.workflow_activation.FireTimerH\x00\x12K\n\x12update_random_seed\x18\x04 \x01(\x0b\x32-.coresdk.workflow_activation.UpdateRandomSeedH\x00\x12\x44\n\x0equery_workflow\x18\x05 \x01(\x0b\x32*.coresdk.workflow_activation.QueryWorkflowH\x00\x12\x46\n\x0f\x63\x61ncel_workflow\x18\x06 \x01(\x0b\x32+.coresdk.workflow_activation.CancelWorkflowH\x00\x12\x46\n\x0fsignal_workflow\x18\x07 \x01(\x0b\x32+.coresdk.workflow_activation.SignalWorkflowH\x00\x12H\n\x10resolve_activity\x18\x08 \x01(\x0b\x32,.coresdk.workflow_activation.ResolveActivityH\x00\x12G\n\x10notify_has_patch\x18\t \x01(\x0b\x32+.coresdk.workflow_activation.NotifyHasPatchH\x00\x12q\n&resolve_child_workflow_execution_start\x18\n \x01(\x0b\x32?.coresdk.workflow_activation.ResolveChildWorkflowExecutionStartH\x00\x12\x66\n resolve_child_workflow_execution\x18\x0b \x01(\x0b\x32:.coresdk.workflow_activation.ResolveChildWorkflowExecutionH\x00\x12\x66\n resolve_signal_external_workflow\x18\x0c \x01(\x0b\x32:.coresdk.workflow_activation.ResolveSignalExternalWorkflowH\x00\x12u\n(resolve_request_cancel_external_workflow\x18\r \x01(\x0b\x32\x41.coresdk.workflow_activation.ResolveRequestCancelExternalWorkflowH\x00\x12:\n\tdo_update\x18\x0e \x01(\x0b\x32%.coresdk.workflow_activation.DoUpdateH\x00\x12`\n\x1dresolve_nexus_operation_start\x18\x0f \x01(\x0b\x32\x37.coresdk.workflow_activation.ResolveNexusOperationStartH\x00\x12U\n\x17resolve_nexus_operation\x18\x10 \x01(\x0b\x32\x32.coresdk.workflow_activation.ResolveNexusOperationH\x00\x12I\n\x11remove_from_cache\x18\x32 \x01(\x0b\x32,.coresdk.workflow_activation.RemoveFromCacheH\x00\x42\t\n\x07variant\"\xd9\n\n\x12InitializeWorkflow\x12\x15\n\rworkflow_type\x18\x01 \x01(\t\x12\x13\n\x0bworkflow_id\x18\x02 \x01(\t\x12\x32\n\targuments\x18\x03 \x03(\x0b\x32\x1f.temporal.api.common.v1.Payload\x12\x17\n\x0frandomness_seed\x18\x04 \x01(\x04\x12M\n\x07headers\x18\x05 \x03(\x0b\x32<.coresdk.workflow_activation.InitializeWorkflow.HeadersEntry\x12\x10\n\x08identity\x18\x06 \x01(\t\x12I\n\x14parent_workflow_info\x18\x07 \x01(\x0b\x32+.coresdk.common.NamespacedWorkflowExecution\x12=\n\x1aworkflow_execution_timeout\x18\x08 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x37\n\x14workflow_run_timeout\x18\t \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x38\n\x15workflow_task_timeout\x18\n \x01(\x0b\x32\x19.google.protobuf.Duration\x12\'\n\x1f\x63ontinued_from_execution_run_id\x18\x0b \x01(\t\x12J\n\x13\x63ontinued_initiator\x18\x0c \x01(\x0e\x32-.temporal.api.enums.v1.ContinueAsNewInitiator\x12;\n\x11\x63ontinued_failure\x18\r \x01(\x0b\x32 .temporal.api.failure.v1.Failure\x12@\n\x16last_completion_result\x18\x0e \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12\x1e\n\x16\x66irst_execution_run_id\x18\x0f \x01(\t\x12\x39\n\x0cretry_policy\x18\x10 \x01(\x0b\x32#.temporal.api.common.v1.RetryPolicy\x12\x0f\n\x07\x61ttempt\x18\x11 \x01(\x05\x12\x15\n\rcron_schedule\x18\x12 \x01(\t\x12\x46\n\"workflow_execution_expiration_time\x18\x13 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x45\n\"cron_schedule_to_schedule_interval\x18\x14 \x01(\x0b\x32\x19.google.protobuf.Duration\x12*\n\x04memo\x18\x15 \x01(\x0b\x32\x1c.temporal.api.common.v1.Memo\x12\x43\n\x11search_attributes\x18\x16 \x01(\x0b\x32(.temporal.api.common.v1.SearchAttributes\x12.\n\nstart_time\x18\x17 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12@\n\rroot_workflow\x18\x18 \x01(\x0b\x32).temporal.api.common.v1.WorkflowExecution\x12\x32\n\x08priority\x18\x19 \x01(\x0b\x32 .temporal.api.common.v1.Priority\x1aO\n\x0cHeadersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12.\n\x05value\x18\x02 \x01(\x0b\x32\x1f.temporal.api.common.v1.Payload:\x02\x38\x01\"\x18\n\tFireTimer\x12\x0b\n\x03seq\x18\x01 \x01(\r\"m\n\x0fResolveActivity\x12\x0b\n\x03seq\x18\x01 \x01(\r\x12;\n\x06result\x18\x02 \x01(\x0b\x32+.coresdk.activity_result.ActivityResolution\x12\x10\n\x08is_local\x18\x03 \x01(\x08\"\xd1\x02\n\"ResolveChildWorkflowExecutionStart\x12\x0b\n\x03seq\x18\x01 \x01(\r\x12[\n\tsucceeded\x18\x02 \x01(\x0b\x32\x46.coresdk.workflow_activation.ResolveChildWorkflowExecutionStartSuccessH\x00\x12X\n\x06\x66\x61iled\x18\x03 \x01(\x0b\x32\x46.coresdk.workflow_activation.ResolveChildWorkflowExecutionStartFailureH\x00\x12]\n\tcancelled\x18\x04 \x01(\x0b\x32H.coresdk.workflow_activation.ResolveChildWorkflowExecutionStartCancelledH\x00\x42\x08\n\x06status\";\n)ResolveChildWorkflowExecutionStartSuccess\x12\x0e\n\x06run_id\x18\x01 \x01(\t\"\xa6\x01\n)ResolveChildWorkflowExecutionStartFailure\x12\x13\n\x0bworkflow_id\x18\x01 \x01(\t\x12\x15\n\rworkflow_type\x18\x02 \x01(\t\x12M\n\x05\x63\x61use\x18\x03 \x01(\x0e\x32>.coresdk.child_workflow.StartChildWorkflowExecutionFailedCause\"`\n+ResolveChildWorkflowExecutionStartCancelled\x12\x31\n\x07\x66\x61ilure\x18\x01 \x01(\x0b\x32 .temporal.api.failure.v1.Failure\"i\n\x1dResolveChildWorkflowExecution\x12\x0b\n\x03seq\x18\x01 \x01(\r\x12;\n\x06result\x18\x02 \x01(\x0b\x32+.coresdk.child_workflow.ChildWorkflowResult\"+\n\x10UpdateRandomSeed\x12\x17\n\x0frandomness_seed\x18\x01 \x01(\x04\"\x84\x02\n\rQueryWorkflow\x12\x10\n\x08query_id\x18\x01 \x01(\t\x12\x12\n\nquery_type\x18\x02 \x01(\t\x12\x32\n\targuments\x18\x03 \x03(\x0b\x32\x1f.temporal.api.common.v1.Payload\x12H\n\x07headers\x18\x05 \x03(\x0b\x32\x37.coresdk.workflow_activation.QueryWorkflow.HeadersEntry\x1aO\n\x0cHeadersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12.\n\x05value\x18\x02 \x01(\x0b\x32\x1f.temporal.api.common.v1.Payload:\x02\x38\x01\" \n\x0e\x43\x61ncelWorkflow\x12\x0e\n\x06reason\x18\x01 \x01(\t\"\x83\x02\n\x0eSignalWorkflow\x12\x13\n\x0bsignal_name\x18\x01 \x01(\t\x12.\n\x05input\x18\x02 \x03(\x0b\x32\x1f.temporal.api.common.v1.Payload\x12\x10\n\x08identity\x18\x03 \x01(\t\x12I\n\x07headers\x18\x05 \x03(\x0b\x32\x38.coresdk.workflow_activation.SignalWorkflow.HeadersEntry\x1aO\n\x0cHeadersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12.\n\x05value\x18\x02 \x01(\x0b\x32\x1f.temporal.api.common.v1.Payload:\x02\x38\x01\"\"\n\x0eNotifyHasPatch\x12\x10\n\x08patch_id\x18\x01 \x01(\t\"_\n\x1dResolveSignalExternalWorkflow\x12\x0b\n\x03seq\x18\x01 \x01(\r\x12\x31\n\x07\x66\x61ilure\x18\x02 \x01(\x0b\x32 .temporal.api.failure.v1.Failure\"f\n$ResolveRequestCancelExternalWorkflow\x12\x0b\n\x03seq\x18\x01 \x01(\r\x12\x31\n\x07\x66\x61ilure\x18\x02 \x01(\x0b\x32 .temporal.api.failure.v1.Failure\"\xcb\x02\n\x08\x44oUpdate\x12\n\n\x02id\x18\x01 \x01(\t\x12\x1c\n\x14protocol_instance_id\x18\x02 \x01(\t\x12\x0c\n\x04name\x18\x03 \x01(\t\x12.\n\x05input\x18\x04 \x03(\x0b\x32\x1f.temporal.api.common.v1.Payload\x12\x43\n\x07headers\x18\x05 \x03(\x0b\x32\x32.coresdk.workflow_activation.DoUpdate.HeadersEntry\x12*\n\x04meta\x18\x06 \x01(\x0b\x32\x1c.temporal.api.update.v1.Meta\x12\x15\n\rrun_validator\x18\x07 \x01(\x08\x1aO\n\x0cHeadersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12.\n\x05value\x18\x02 \x01(\x0b\x32\x1f.temporal.api.common.v1.Payload:\x02\x38\x01\"\x9a\x01\n\x1aResolveNexusOperationStart\x12\x0b\n\x03seq\x18\x01 \x01(\r\x12\x19\n\x0foperation_token\x18\x02 \x01(\tH\x00\x12\x16\n\x0cstarted_sync\x18\x03 \x01(\x08H\x00\x12\x32\n\x06\x66\x61iled\x18\x04 \x01(\x0b\x32 .temporal.api.failure.v1.FailureH\x00\x42\x08\n\x06status\"Y\n\x15ResolveNexusOperation\x12\x0b\n\x03seq\x18\x01 \x01(\r\x12\x33\n\x06result\x18\x02 \x01(\x0b\x32#.coresdk.nexus.NexusOperationResult\"\xe0\x02\n\x0fRemoveFromCache\x12\x0f\n\x07message\x18\x01 \x01(\t\x12K\n\x06reason\x18\x02 \x01(\x0e\x32;.coresdk.workflow_activation.RemoveFromCache.EvictionReason\"\xee\x01\n\x0e\x45victionReason\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0e\n\nCACHE_FULL\x10\x01\x12\x0e\n\nCACHE_MISS\x10\x02\x12\x12\n\x0eNONDETERMINISM\x10\x03\x12\r\n\tLANG_FAIL\x10\x04\x12\x12\n\x0eLANG_REQUESTED\x10\x05\x12\x12\n\x0eTASK_NOT_FOUND\x10\x06\x12\x15\n\x11UNHANDLED_COMMAND\x10\x07\x12\t\n\x05\x46\x41TAL\x10\x08\x12\x1f\n\x1bPAGINATION_OR_HISTORY_FETCH\x10\t\x12\x1d\n\x19WORKFLOW_EXECUTION_ENDING\x10\nB8\xea\x02\x35Temporalio::Internal::Bridge::Api::WorkflowActivationb\x06proto3"
|
21
21
|
|
22
22
|
pool = ::Google::Protobuf::DescriptorPool.generated_pool
|
23
23
|
pool.add_serialized_file(descriptor_data)
|