dynflow 1.6.8 → 1.6.11
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/dynflow/director.rb +3 -1
- data/lib/dynflow/executors/sidekiq/core.rb +3 -0
- data/lib/dynflow/persistence_adapters/sequel.rb +2 -2
- data/lib/dynflow/rails/configuration.rb +3 -0
- data/lib/dynflow/rails.rb +3 -0
- data/lib/dynflow/testing/dummy_world.rb +1 -1
- data/lib/dynflow/version.rb +1 -1
- data/lib/dynflow/world.rb +1 -1
- data/test/persistence_test.rb +21 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: db2725603e440298025d434778ebf2e218e6c3e30fb7db07aaddea80648cbb2d
|
4
|
+
data.tar.gz: 4d8003de94bec301bd411c1c3ee92df9e1d10cc45bc36d4d843a75c2eb664171
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ab0fa706aa8b41c1197aef44bf57a87f4e5c37d7d343a9ca7e83e20af8de89b4e0fb2e72e7a1b93fffa05ac3265c78a48d598d7b8e0292785cd2276057edd0f0
|
7
|
+
data.tar.gz: 07e82b78806a61511b0ddff0240dd596172dfe79735bc8b931d7972b4d322d29bca1686be8be0087a105171e7348c0ee24cfdb2b01cc1a8dcf8d97ad8b0134c8
|
data/lib/dynflow/director.rb
CHANGED
@@ -167,7 +167,7 @@ module Dynflow
|
|
167
167
|
@logger = world.logger
|
168
168
|
@execution_plan_managers = {}
|
169
169
|
@rescued_steps = {}
|
170
|
-
@planning_plans =
|
170
|
+
@planning_plans = Set.new
|
171
171
|
end
|
172
172
|
|
173
173
|
def current_execution_plan_ids
|
@@ -175,6 +175,8 @@ module Dynflow
|
|
175
175
|
end
|
176
176
|
|
177
177
|
def handle_planning(execution_plan_uuid)
|
178
|
+
return [] if @planning_plans.include? execution_plan_uuid
|
179
|
+
|
178
180
|
@planning_plans << execution_plan_uuid
|
179
181
|
[PlanningWorkItem.new(execution_plan_uuid, :default, @world.id)]
|
180
182
|
end
|
@@ -85,6 +85,9 @@ module Dynflow
|
|
85
85
|
logger.info('Performing validity checks')
|
86
86
|
@world.perform_validity_checks
|
87
87
|
logger.info('Finished performing validity checks')
|
88
|
+
if @world.delayed_executor && !@world.delayed_executor.started?
|
89
|
+
@world.delayed_executor.start
|
90
|
+
end
|
88
91
|
@recovery = false
|
89
92
|
end
|
90
93
|
|
@@ -393,11 +393,11 @@ module Dynflow
|
|
393
393
|
hash = if record[:data].nil?
|
394
394
|
SERIALIZABLE_COLUMNS.fetch(what, []).each do |key|
|
395
395
|
key = key.to_sym
|
396
|
-
record[key] = MessagePack.unpack(
|
396
|
+
record[key] = MessagePack.unpack(record[key].to_s) unless record[key].nil?
|
397
397
|
end
|
398
398
|
record
|
399
399
|
else
|
400
|
-
MessagePack.unpack(record[:data])
|
400
|
+
MessagePack.unpack(record[:data].to_s)
|
401
401
|
end
|
402
402
|
Utils.indifferent_hash(hash)
|
403
403
|
end
|
@@ -152,6 +152,9 @@ module Dynflow
|
|
152
152
|
# we can't do any operation until the Rails.application.dynflow.world is set
|
153
153
|
config.auto_execute = false
|
154
154
|
config.auto_validity_check = false
|
155
|
+
if sidekiq_worker? && !Sidekiq.options[:queues].include?("dynflow_orchestrator")
|
156
|
+
config.delayed_executor = nil
|
157
|
+
end
|
155
158
|
end
|
156
159
|
end
|
157
160
|
|
data/lib/dynflow/rails.rb
CHANGED
@@ -46,6 +46,9 @@ module Dynflow
|
|
46
46
|
invalidated_worlds = world.perform_validity_checks
|
47
47
|
world.auto_execute
|
48
48
|
world.post_initialization if invalidated_worlds > 0
|
49
|
+
if @world.delayed_executor && !@world.delayed_executor.started?
|
50
|
+
@world.delayed_executor.start
|
51
|
+
end
|
49
52
|
config.run_post_executor_init_hooks(world)
|
50
53
|
end
|
51
54
|
end
|
data/lib/dynflow/version.rb
CHANGED
data/lib/dynflow/world.rb
CHANGED
@@ -77,7 +77,7 @@ module Dynflow
|
|
77
77
|
@delayed_executor ||= try_spawn(:delayed_executor, Coordinator::DelayedExecutorLock)
|
78
78
|
@execution_plan_cleaner ||= try_spawn(:execution_plan_cleaner, Coordinator::ExecutionPlanCleanerLock)
|
79
79
|
update_register
|
80
|
-
@delayed_executor.start if @delayed_executor && !@delayed_executor.started?
|
80
|
+
@delayed_executor.start if auto_validity_check && @delayed_executor && !@delayed_executor.started?
|
81
81
|
self.auto_execute if @config.auto_execute
|
82
82
|
end
|
83
83
|
|
data/test/persistence_test.rb
CHANGED
@@ -464,6 +464,27 @@ module Dynflow
|
|
464
464
|
loaded_plan = adapter.load_execution_plan(plan[:id])
|
465
465
|
assert_equal_attributes!(plan_data, loaded_plan)
|
466
466
|
end
|
467
|
+
|
468
|
+
it 'does not leak Sequel blobs' do
|
469
|
+
db = adapter.send(:db)
|
470
|
+
# Prepare records for saving
|
471
|
+
plan = prepare_plans.first
|
472
|
+
|
473
|
+
value = 'a' * 1000
|
474
|
+
|
475
|
+
adata = action_data.merge({:output => { :key => value }})
|
476
|
+
plan_record = adapter.send(:prepare_record, :execution_plan, plan.merge(:uuid => plan[:id]))
|
477
|
+
action_record = adapter.send(:prepare_record, :action, adata.dup)
|
478
|
+
|
479
|
+
# Insert the records
|
480
|
+
db[:dynflow_execution_plans].insert plan_record.merge(:uuid => plan[:id])
|
481
|
+
db[:dynflow_actions].insert action_record.merge(:execution_plan_uuid => plan[:id], :id => adata[:id])
|
482
|
+
|
483
|
+
# Load the saved records
|
484
|
+
loaded_action = adapter.load_action(plan[:id], adata[:id])
|
485
|
+
_(loaded_action[:output][:key].class).must_equal String
|
486
|
+
_(loaded_action[:output][:key]).must_equal value
|
487
|
+
end
|
467
488
|
end
|
468
489
|
end
|
469
490
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dynflow
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.6.
|
4
|
+
version: 1.6.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ivan Necas
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2023-05-09 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: multi_json
|
@@ -678,7 +678,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
678
678
|
- !ruby/object:Gem::Version
|
679
679
|
version: '0'
|
680
680
|
requirements: []
|
681
|
-
rubygems_version: 3.
|
681
|
+
rubygems_version: 3.4.12
|
682
682
|
signing_key:
|
683
683
|
specification_version: 4
|
684
684
|
summary: DYNamic workFLOW engine
|