hatchet-sdk 0.13.0 → 0.13.2
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/CHANGELOG.md +13 -0
- data/lib/hatchet/clients/rest/.openapi-generator/FILES +15 -0
- data/lib/hatchet/clients/rest/README.md +26 -6
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/api_token_api.rb +71 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/concurrency_api.rb +71 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/sandbox_provider_api.rb +474 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/tenant_api.rb +71 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/api_token.rb +16 -4
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/create_api_token_request.rb +32 -1
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/tenant_role.rb +321 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/tenant_role_list.rb +239 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/token_capability.rb +341 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/token_capability_list.rb +239 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_concurrency_key.rb +1 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_concurrency_strategy.rb +1 -1
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_concurrency_totals.rb +320 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_create_sandbox_provider_request.rb +393 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_sandbox_provider.rb +486 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_sandbox_provider_event.rb +374 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_sandbox_provider_event_kind.rb +46 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_sandbox_provider_event_list.rb +239 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_sandbox_provider_kind.rb +44 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_sandbox_provider_list.rb +231 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_sandbox_provider_status.rb +242 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_update_sandbox_provider_request.rb +329 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest.rb +15 -0
- data/lib/hatchet/version.rb +1 -1
- data/lib/hatchet/worker/durable_event_listener.rb +7 -7
- metadata +17 -2
data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_update_sandbox_provider_request.rb
ADDED
|
@@ -0,0 +1,329 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Hatchet API
|
|
3
|
+
|
|
4
|
+
#The Hatchet API
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.14.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module HatchetSdkRest
|
|
17
|
+
# Fields to update on a sandbox provider. Omitted fields are left unchanged.
|
|
18
|
+
class V1UpdateSandboxProviderRequest
|
|
19
|
+
attr_accessor :name
|
|
20
|
+
|
|
21
|
+
# A new sandbox provider API key. Provide a value to rotate the key. It is never returned.
|
|
22
|
+
attr_accessor :api_key
|
|
23
|
+
|
|
24
|
+
# Replaces the existing config.
|
|
25
|
+
attr_accessor :config
|
|
26
|
+
|
|
27
|
+
attr_accessor :default_template
|
|
28
|
+
|
|
29
|
+
attr_accessor :max_idle_ttl_seconds
|
|
30
|
+
|
|
31
|
+
# Replaces the default sandbox metadata.
|
|
32
|
+
attr_accessor :labels
|
|
33
|
+
|
|
34
|
+
attr_accessor :enabled
|
|
35
|
+
|
|
36
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
37
|
+
def self.attribute_map
|
|
38
|
+
{
|
|
39
|
+
:'name' => :'name',
|
|
40
|
+
:'api_key' => :'apiKey',
|
|
41
|
+
:'config' => :'config',
|
|
42
|
+
:'default_template' => :'defaultTemplate',
|
|
43
|
+
:'max_idle_ttl_seconds' => :'maxIdleTtlSeconds',
|
|
44
|
+
:'labels' => :'labels',
|
|
45
|
+
:'enabled' => :'enabled'
|
|
46
|
+
}
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
# Returns attribute mapping this model knows about
|
|
50
|
+
def self.acceptable_attribute_map
|
|
51
|
+
attribute_map
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
# Returns all the JSON keys this model knows about
|
|
55
|
+
def self.acceptable_attributes
|
|
56
|
+
acceptable_attribute_map.values
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
# Attribute type mapping.
|
|
60
|
+
def self.openapi_types
|
|
61
|
+
{
|
|
62
|
+
:'name' => :'String',
|
|
63
|
+
:'api_key' => :'String',
|
|
64
|
+
:'config' => :'Hash<String, Object>',
|
|
65
|
+
:'default_template' => :'String',
|
|
66
|
+
:'max_idle_ttl_seconds' => :'Integer',
|
|
67
|
+
:'labels' => :'Hash<String, String>',
|
|
68
|
+
:'enabled' => :'Boolean'
|
|
69
|
+
}
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
# List of attributes with nullable: true
|
|
73
|
+
def self.openapi_nullable
|
|
74
|
+
Set.new([
|
|
75
|
+
])
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
# Initializes the object
|
|
79
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
80
|
+
def initialize(attributes = {})
|
|
81
|
+
if (!attributes.is_a?(Hash))
|
|
82
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `HatchetSdkRest::V1UpdateSandboxProviderRequest` initialize method"
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
86
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
87
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
88
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
89
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `HatchetSdkRest::V1UpdateSandboxProviderRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
90
|
+
end
|
|
91
|
+
h[k.to_sym] = v
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
if attributes.key?(:'name')
|
|
95
|
+
self.name = attributes[:'name']
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
if attributes.key?(:'api_key')
|
|
99
|
+
self.api_key = attributes[:'api_key']
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
if attributes.key?(:'config')
|
|
103
|
+
if (value = attributes[:'config']).is_a?(Hash)
|
|
104
|
+
self.config = value
|
|
105
|
+
end
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
if attributes.key?(:'default_template')
|
|
109
|
+
self.default_template = attributes[:'default_template']
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
if attributes.key?(:'max_idle_ttl_seconds')
|
|
113
|
+
self.max_idle_ttl_seconds = attributes[:'max_idle_ttl_seconds']
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
if attributes.key?(:'labels')
|
|
117
|
+
if (value = attributes[:'labels']).is_a?(Hash)
|
|
118
|
+
self.labels = value
|
|
119
|
+
end
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
if attributes.key?(:'enabled')
|
|
123
|
+
self.enabled = attributes[:'enabled']
|
|
124
|
+
end
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
128
|
+
# @return Array for valid properties with the reasons
|
|
129
|
+
def list_invalid_properties
|
|
130
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
131
|
+
invalid_properties = Array.new
|
|
132
|
+
if !@name.nil? && @name.to_s.length > 255
|
|
133
|
+
invalid_properties.push('invalid value for "name", the character length must be smaller than or equal to 255.')
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
if !@name.nil? && @name.to_s.length < 1
|
|
137
|
+
invalid_properties.push('invalid value for "name", the character length must be greater than or equal to 1.')
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
if !@api_key.nil? && @api_key.to_s.length < 1
|
|
141
|
+
invalid_properties.push('invalid value for "api_key", the character length must be greater than or equal to 1.')
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
invalid_properties
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
# Check to see if the all the properties in the model are valid
|
|
148
|
+
# @return true if the model is valid
|
|
149
|
+
def valid?
|
|
150
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
151
|
+
return false if !@name.nil? && @name.to_s.length > 255
|
|
152
|
+
return false if !@name.nil? && @name.to_s.length < 1
|
|
153
|
+
return false if !@api_key.nil? && @api_key.to_s.length < 1
|
|
154
|
+
true
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
# Custom attribute writer method with validation
|
|
158
|
+
# @param [Object] name Value to be assigned
|
|
159
|
+
def name=(name)
|
|
160
|
+
if name.nil?
|
|
161
|
+
fail ArgumentError, 'name cannot be nil'
|
|
162
|
+
end
|
|
163
|
+
|
|
164
|
+
if name.to_s.length > 255
|
|
165
|
+
fail ArgumentError, 'invalid value for "name", the character length must be smaller than or equal to 255.'
|
|
166
|
+
end
|
|
167
|
+
|
|
168
|
+
if name.to_s.length < 1
|
|
169
|
+
fail ArgumentError, 'invalid value for "name", the character length must be greater than or equal to 1.'
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
@name = name
|
|
173
|
+
end
|
|
174
|
+
|
|
175
|
+
# Custom attribute writer method with validation
|
|
176
|
+
# @param [Object] api_key Value to be assigned
|
|
177
|
+
def api_key=(api_key)
|
|
178
|
+
if api_key.nil?
|
|
179
|
+
fail ArgumentError, 'api_key cannot be nil'
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
if api_key.to_s.length < 1
|
|
183
|
+
fail ArgumentError, 'invalid value for "api_key", the character length must be greater than or equal to 1.'
|
|
184
|
+
end
|
|
185
|
+
|
|
186
|
+
@api_key = api_key
|
|
187
|
+
end
|
|
188
|
+
|
|
189
|
+
# Checks equality by comparing each attribute.
|
|
190
|
+
# @param [Object] Object to be compared
|
|
191
|
+
def ==(o)
|
|
192
|
+
return true if self.equal?(o)
|
|
193
|
+
self.class == o.class &&
|
|
194
|
+
name == o.name &&
|
|
195
|
+
api_key == o.api_key &&
|
|
196
|
+
config == o.config &&
|
|
197
|
+
default_template == o.default_template &&
|
|
198
|
+
max_idle_ttl_seconds == o.max_idle_ttl_seconds &&
|
|
199
|
+
labels == o.labels &&
|
|
200
|
+
enabled == o.enabled
|
|
201
|
+
end
|
|
202
|
+
|
|
203
|
+
# @see the `==` method
|
|
204
|
+
# @param [Object] Object to be compared
|
|
205
|
+
def eql?(o)
|
|
206
|
+
self == o
|
|
207
|
+
end
|
|
208
|
+
|
|
209
|
+
# Calculates hash code according to all attributes.
|
|
210
|
+
# @return [Integer] Hash code
|
|
211
|
+
def hash
|
|
212
|
+
[name, api_key, config, default_template, max_idle_ttl_seconds, labels, enabled].hash
|
|
213
|
+
end
|
|
214
|
+
|
|
215
|
+
# Builds the object from hash
|
|
216
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
217
|
+
# @return [Object] Returns the model itself
|
|
218
|
+
def self.build_from_hash(attributes)
|
|
219
|
+
return nil unless attributes.is_a?(Hash)
|
|
220
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
221
|
+
transformed_hash = {}
|
|
222
|
+
openapi_types.each_pair do |key, type|
|
|
223
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
224
|
+
transformed_hash["#{key}"] = nil
|
|
225
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
226
|
+
# check to ensure the input is an array given that the attribute
|
|
227
|
+
# is documented as an array but the input is not
|
|
228
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
229
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
230
|
+
end
|
|
231
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
232
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
233
|
+
end
|
|
234
|
+
end
|
|
235
|
+
new(transformed_hash)
|
|
236
|
+
end
|
|
237
|
+
|
|
238
|
+
# Deserializes the data based on type
|
|
239
|
+
# @param string type Data type
|
|
240
|
+
# @param string value Value to be deserialized
|
|
241
|
+
# @return [Object] Deserialized data
|
|
242
|
+
def self._deserialize(type, value)
|
|
243
|
+
case type.to_sym
|
|
244
|
+
when :Time
|
|
245
|
+
Time.parse(value)
|
|
246
|
+
when :Date
|
|
247
|
+
Date.parse(value)
|
|
248
|
+
when :String
|
|
249
|
+
value.to_s
|
|
250
|
+
when :Integer
|
|
251
|
+
value.to_i
|
|
252
|
+
when :Float
|
|
253
|
+
value.to_f
|
|
254
|
+
when :Boolean
|
|
255
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
256
|
+
true
|
|
257
|
+
else
|
|
258
|
+
false
|
|
259
|
+
end
|
|
260
|
+
when :Object
|
|
261
|
+
# generic object (usually a Hash), return directly
|
|
262
|
+
value
|
|
263
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
264
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
265
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
266
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
267
|
+
k_type = Regexp.last_match[:k_type]
|
|
268
|
+
v_type = Regexp.last_match[:v_type]
|
|
269
|
+
{}.tap do |hash|
|
|
270
|
+
value.each do |k, v|
|
|
271
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
272
|
+
end
|
|
273
|
+
end
|
|
274
|
+
else # model
|
|
275
|
+
# models (e.g. Pet) or oneOf
|
|
276
|
+
klass = HatchetSdkRest.const_get(type)
|
|
277
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
278
|
+
end
|
|
279
|
+
end
|
|
280
|
+
|
|
281
|
+
# Returns the string representation of the object
|
|
282
|
+
# @return [String] String presentation of the object
|
|
283
|
+
def to_s
|
|
284
|
+
to_hash.to_s
|
|
285
|
+
end
|
|
286
|
+
|
|
287
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
288
|
+
# @return [Hash] Returns the object in the form of hash
|
|
289
|
+
def to_body
|
|
290
|
+
to_hash
|
|
291
|
+
end
|
|
292
|
+
|
|
293
|
+
# Returns the object in the form of hash
|
|
294
|
+
# @return [Hash] Returns the object in the form of hash
|
|
295
|
+
def to_hash
|
|
296
|
+
hash = {}
|
|
297
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
298
|
+
value = self.send(attr)
|
|
299
|
+
if value.nil?
|
|
300
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
301
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
302
|
+
end
|
|
303
|
+
|
|
304
|
+
hash[param] = _to_hash(value)
|
|
305
|
+
end
|
|
306
|
+
hash
|
|
307
|
+
end
|
|
308
|
+
|
|
309
|
+
# Outputs non-array value in the form of hash
|
|
310
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
311
|
+
# @param [Object] value Any valid value
|
|
312
|
+
# @return [Hash] Returns the value in the form of hash
|
|
313
|
+
def _to_hash(value)
|
|
314
|
+
if value.is_a?(Array)
|
|
315
|
+
value.compact.map { |v| _to_hash(v) }
|
|
316
|
+
elsif value.is_a?(Hash)
|
|
317
|
+
{}.tap do |hash|
|
|
318
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
319
|
+
end
|
|
320
|
+
elsif value.respond_to? :to_hash
|
|
321
|
+
value.to_hash
|
|
322
|
+
else
|
|
323
|
+
value
|
|
324
|
+
end
|
|
325
|
+
end
|
|
326
|
+
|
|
327
|
+
end
|
|
328
|
+
|
|
329
|
+
end
|
|
@@ -136,8 +136,12 @@ HatchetSdkRest.autoload :TenantQueueMetrics, 'hatchet-sdk-rest/models/tenant_que
|
|
|
136
136
|
HatchetSdkRest.autoload :TenantResource, 'hatchet-sdk-rest/models/tenant_resource'
|
|
137
137
|
HatchetSdkRest.autoload :TenantResourceLimit, 'hatchet-sdk-rest/models/tenant_resource_limit'
|
|
138
138
|
HatchetSdkRest.autoload :TenantResourcePolicy, 'hatchet-sdk-rest/models/tenant_resource_policy'
|
|
139
|
+
HatchetSdkRest.autoload :TenantRole, 'hatchet-sdk-rest/models/tenant_role'
|
|
140
|
+
HatchetSdkRest.autoload :TenantRoleList, 'hatchet-sdk-rest/models/tenant_role_list'
|
|
139
141
|
HatchetSdkRest.autoload :TenantStepRunQueueMetrics, 'hatchet-sdk-rest/models/tenant_step_run_queue_metrics'
|
|
140
142
|
HatchetSdkRest.autoload :TenantVersion, 'hatchet-sdk-rest/models/tenant_version'
|
|
143
|
+
HatchetSdkRest.autoload :TokenCapability, 'hatchet-sdk-rest/models/token_capability'
|
|
144
|
+
HatchetSdkRest.autoload :TokenCapabilityList, 'hatchet-sdk-rest/models/token_capability_list'
|
|
141
145
|
HatchetSdkRest.autoload :TriggerRunResult, 'hatchet-sdk-rest/models/trigger_run_result'
|
|
142
146
|
HatchetSdkRest.autoload :TriggerWorkflowRunRequest, 'hatchet-sdk-rest/models/trigger_workflow_run_request'
|
|
143
147
|
HatchetSdkRest.autoload :UpdateCronWorkflowTriggerRequest, 'hatchet-sdk-rest/models/update_cron_workflow_trigger_request'
|
|
@@ -169,7 +173,9 @@ HatchetSdkRest.autoload :V1ConcurrencyScope, 'hatchet-sdk-rest/models/v1_concurr
|
|
|
169
173
|
HatchetSdkRest.autoload :V1ConcurrencyStrategy, 'hatchet-sdk-rest/models/v1_concurrency_strategy'
|
|
170
174
|
HatchetSdkRest.autoload :V1ConcurrencyStrategyList, 'hatchet-sdk-rest/models/v1_concurrency_strategy_list'
|
|
171
175
|
HatchetSdkRest.autoload :V1ConcurrencyStrategyUsage, 'hatchet-sdk-rest/models/v1_concurrency_strategy_usage'
|
|
176
|
+
HatchetSdkRest.autoload :V1ConcurrencyTotals, 'hatchet-sdk-rest/models/v1_concurrency_totals'
|
|
172
177
|
HatchetSdkRest.autoload :V1CreateFilterRequest, 'hatchet-sdk-rest/models/v1_create_filter_request'
|
|
178
|
+
HatchetSdkRest.autoload :V1CreateSandboxProviderRequest, 'hatchet-sdk-rest/models/v1_create_sandbox_provider_request'
|
|
173
179
|
HatchetSdkRest.autoload :V1CreateServerlessEndpointRequest, 'hatchet-sdk-rest/models/v1_create_serverless_endpoint_request'
|
|
174
180
|
HatchetSdkRest.autoload :V1CreateWebhookRequest, 'hatchet-sdk-rest/models/v1_create_webhook_request'
|
|
175
181
|
HatchetSdkRest.autoload :V1CreateWebhookRequestAPIKey, 'hatchet-sdk-rest/models/v1_create_webhook_request_api_key'
|
|
@@ -198,6 +204,13 @@ HatchetSdkRest.autoload :V1ReplayedTasks, 'hatchet-sdk-rest/models/v1_replayed_t
|
|
|
198
204
|
HatchetSdkRest.autoload :V1RestoreTaskResponse, 'hatchet-sdk-rest/models/v1_restore_task_response'
|
|
199
205
|
HatchetSdkRest.autoload :V1RunningDetailCount, 'hatchet-sdk-rest/models/v1_running_detail_count'
|
|
200
206
|
HatchetSdkRest.autoload :V1RunningFilter, 'hatchet-sdk-rest/models/v1_running_filter'
|
|
207
|
+
HatchetSdkRest.autoload :V1SandboxProvider, 'hatchet-sdk-rest/models/v1_sandbox_provider'
|
|
208
|
+
HatchetSdkRest.autoload :V1SandboxProviderEvent, 'hatchet-sdk-rest/models/v1_sandbox_provider_event'
|
|
209
|
+
HatchetSdkRest.autoload :V1SandboxProviderEventKind, 'hatchet-sdk-rest/models/v1_sandbox_provider_event_kind'
|
|
210
|
+
HatchetSdkRest.autoload :V1SandboxProviderEventList, 'hatchet-sdk-rest/models/v1_sandbox_provider_event_list'
|
|
211
|
+
HatchetSdkRest.autoload :V1SandboxProviderKind, 'hatchet-sdk-rest/models/v1_sandbox_provider_kind'
|
|
212
|
+
HatchetSdkRest.autoload :V1SandboxProviderList, 'hatchet-sdk-rest/models/v1_sandbox_provider_list'
|
|
213
|
+
HatchetSdkRest.autoload :V1SandboxProviderStatus, 'hatchet-sdk-rest/models/v1_sandbox_provider_status'
|
|
201
214
|
HatchetSdkRest.autoload :V1ServerlessEndpoint, 'hatchet-sdk-rest/models/v1_serverless_endpoint'
|
|
202
215
|
HatchetSdkRest.autoload :V1ServerlessEndpointCheckStage, 'hatchet-sdk-rest/models/v1_serverless_endpoint_check_stage'
|
|
203
216
|
HatchetSdkRest.autoload :V1ServerlessEndpointEvent, 'hatchet-sdk-rest/models/v1_serverless_endpoint_event'
|
|
@@ -225,6 +238,7 @@ HatchetSdkRest.autoload :V1TaskTiming, 'hatchet-sdk-rest/models/v1_task_timing'
|
|
|
225
238
|
HatchetSdkRest.autoload :V1TaskTimingList, 'hatchet-sdk-rest/models/v1_task_timing_list'
|
|
226
239
|
HatchetSdkRest.autoload :V1TriggerWorkflowRunRequest, 'hatchet-sdk-rest/models/v1_trigger_workflow_run_request'
|
|
227
240
|
HatchetSdkRest.autoload :V1UpdateFilterRequest, 'hatchet-sdk-rest/models/v1_update_filter_request'
|
|
241
|
+
HatchetSdkRest.autoload :V1UpdateSandboxProviderRequest, 'hatchet-sdk-rest/models/v1_update_sandbox_provider_request'
|
|
228
242
|
HatchetSdkRest.autoload :V1UpdateServerlessEndpointRequest, 'hatchet-sdk-rest/models/v1_update_serverless_endpoint_request'
|
|
229
243
|
HatchetSdkRest.autoload :V1UpdateWebhookRequest, 'hatchet-sdk-rest/models/v1_update_webhook_request'
|
|
230
244
|
HatchetSdkRest.autoload :V1WaitItem, 'hatchet-sdk-rest/models/v1_wait_item'
|
|
@@ -303,6 +317,7 @@ HatchetSdkRest.autoload :MetadataApi, 'hatchet-sdk-rest/api/metadata_api'
|
|
|
303
317
|
HatchetSdkRest.autoload :ObservabilityApi, 'hatchet-sdk-rest/api/observability_api'
|
|
304
318
|
HatchetSdkRest.autoload :RateLimitsApi, 'hatchet-sdk-rest/api/rate_limits_api'
|
|
305
319
|
HatchetSdkRest.autoload :SNSApi, 'hatchet-sdk-rest/api/sns_api'
|
|
320
|
+
HatchetSdkRest.autoload :SandboxProviderApi, 'hatchet-sdk-rest/api/sandbox_provider_api'
|
|
306
321
|
HatchetSdkRest.autoload :ServerlessApi, 'hatchet-sdk-rest/api/serverless_api'
|
|
307
322
|
HatchetSdkRest.autoload :SlackApi, 'hatchet-sdk-rest/api/slack_api'
|
|
308
323
|
HatchetSdkRest.autoload :StepRunApi, 'hatchet-sdk-rest/api/step_run_api'
|
data/lib/hatchet/version.rb
CHANGED
|
@@ -70,7 +70,7 @@ module Hatchet
|
|
|
70
70
|
# pending callback key => monotonic time it was registered at
|
|
71
71
|
@waiting_since = {}
|
|
72
72
|
# key -> [inserted_at, result] (rudimentary TTL cache)
|
|
73
|
-
@
|
|
73
|
+
@buffered_satisfied_entries = {}
|
|
74
74
|
@received_satisfied_orders = ReceivedSatisfiedOrders.new
|
|
75
75
|
|
|
76
76
|
@running = false
|
|
@@ -156,10 +156,10 @@ module Hatchet
|
|
|
156
156
|
def wait_for_callback(durable_task_external_id, invocation_count, branch_id, node_id)
|
|
157
157
|
key = [durable_task_external_id, invocation_count, branch_id, node_id]
|
|
158
158
|
|
|
159
|
-
buffered = @mu.synchronize { @
|
|
159
|
+
buffered = @mu.synchronize { @buffered_satisfied_entries.delete(key) }
|
|
160
160
|
if buffered
|
|
161
161
|
@logger&.debug(
|
|
162
|
-
"durable event listener wait_for_callback: buffered
|
|
162
|
+
"durable event listener wait_for_callback: buffered satisfied entry hit " \
|
|
163
163
|
"task=#{durable_task_external_id} invocation=#{invocation_count} " \
|
|
164
164
|
"branch_id=#{branch_id} node_id=#{node_id}",
|
|
165
165
|
)
|
|
@@ -244,7 +244,7 @@ module Hatchet
|
|
|
244
244
|
@request_queue << ::V1::DurableTaskRequest.new(complete_memo: complete)
|
|
245
245
|
end
|
|
246
246
|
|
|
247
|
-
# Drop pending callbacks / acks / buffered
|
|
247
|
+
# Drop pending callbacks / acks / buffered satisfied entries whose invocation
|
|
248
248
|
# count is ``<= invocation_count`` for the given task id.
|
|
249
249
|
def cleanup_task_state(durable_task_external_id, invocation_count)
|
|
250
250
|
@mu.synchronize do
|
|
@@ -260,7 +260,7 @@ module Hatchet
|
|
|
260
260
|
@pending_event_acks.delete(k)&.close
|
|
261
261
|
end
|
|
262
262
|
|
|
263
|
-
@
|
|
263
|
+
@buffered_satisfied_entries.delete_if { |k, _| k[0] == durable_task_external_id && k[1] <= invocation_count }
|
|
264
264
|
@received_satisfied_orders.delete_through(durable_task_external_id, invocation_count)
|
|
265
265
|
end
|
|
266
266
|
end
|
|
@@ -665,7 +665,7 @@ module Hatchet
|
|
|
665
665
|
if queue
|
|
666
666
|
queue << [:ok, result]
|
|
667
667
|
else
|
|
668
|
-
@
|
|
668
|
+
@buffered_satisfied_entries[key] = [Time.now, result]
|
|
669
669
|
end
|
|
670
670
|
end
|
|
671
671
|
end
|
|
@@ -772,7 +772,7 @@ module Hatchet
|
|
|
772
772
|
@mu.synchronize do
|
|
773
773
|
@pending_callbacks.each_value { |q| q << [:err, exc] }
|
|
774
774
|
@pending_callbacks.clear
|
|
775
|
-
@
|
|
775
|
+
@buffered_satisfied_entries.clear
|
|
776
776
|
end
|
|
777
777
|
end
|
|
778
778
|
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: hatchet-sdk
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.13.
|
|
4
|
+
version: 0.13.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- gabriel ruttner
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-
|
|
11
|
+
date: 2026-12-03 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: faraday
|
|
@@ -220,6 +220,7 @@ files:
|
|
|
220
220
|
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/metadata_api.rb
|
|
221
221
|
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/observability_api.rb
|
|
222
222
|
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/rate_limits_api.rb
|
|
223
|
+
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/sandbox_provider_api.rb
|
|
223
224
|
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/serverless_api.rb
|
|
224
225
|
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/slack_api.rb
|
|
225
226
|
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/sns_api.rb
|
|
@@ -356,8 +357,12 @@ files:
|
|
|
356
357
|
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/tenant_resource.rb
|
|
357
358
|
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/tenant_resource_limit.rb
|
|
358
359
|
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/tenant_resource_policy.rb
|
|
360
|
+
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/tenant_role.rb
|
|
361
|
+
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/tenant_role_list.rb
|
|
359
362
|
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/tenant_step_run_queue_metrics.rb
|
|
360
363
|
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/tenant_version.rb
|
|
364
|
+
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/token_capability.rb
|
|
365
|
+
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/token_capability_list.rb
|
|
361
366
|
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/trigger_run_result.rb
|
|
362
367
|
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/trigger_workflow_run_request.rb
|
|
363
368
|
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/update_cron_workflow_trigger_request.rb
|
|
@@ -389,7 +394,9 @@ files:
|
|
|
389
394
|
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_concurrency_strategy.rb
|
|
390
395
|
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_concurrency_strategy_list.rb
|
|
391
396
|
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_concurrency_strategy_usage.rb
|
|
397
|
+
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_concurrency_totals.rb
|
|
392
398
|
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_create_filter_request.rb
|
|
399
|
+
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_create_sandbox_provider_request.rb
|
|
393
400
|
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_create_serverless_endpoint_request.rb
|
|
394
401
|
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_create_webhook_request.rb
|
|
395
402
|
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_create_webhook_request_api_key.rb
|
|
@@ -418,6 +425,13 @@ files:
|
|
|
418
425
|
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_restore_task_response.rb
|
|
419
426
|
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_running_detail_count.rb
|
|
420
427
|
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_running_filter.rb
|
|
428
|
+
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_sandbox_provider.rb
|
|
429
|
+
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_sandbox_provider_event.rb
|
|
430
|
+
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_sandbox_provider_event_kind.rb
|
|
431
|
+
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_sandbox_provider_event_list.rb
|
|
432
|
+
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_sandbox_provider_kind.rb
|
|
433
|
+
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_sandbox_provider_list.rb
|
|
434
|
+
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_sandbox_provider_status.rb
|
|
421
435
|
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_serverless_endpoint.rb
|
|
422
436
|
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_serverless_endpoint_check_stage.rb
|
|
423
437
|
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_serverless_endpoint_event.rb
|
|
@@ -445,6 +459,7 @@ files:
|
|
|
445
459
|
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_task_timing_list.rb
|
|
446
460
|
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_trigger_workflow_run_request.rb
|
|
447
461
|
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_update_filter_request.rb
|
|
462
|
+
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_update_sandbox_provider_request.rb
|
|
448
463
|
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_update_serverless_endpoint_request.rb
|
|
449
464
|
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_update_webhook_request.rb
|
|
450
465
|
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_wait_item.rb
|