dynflow 1.6.7 → 1.6.10
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/action/with_sub_plans.rb +7 -1
- data/lib/dynflow/director.rb +3 -1
- data/lib/dynflow/executors/sidekiq/core.rb +3 -0
- data/lib/dynflow/persistence_adapters/sequel.rb +10 -0
- 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
- 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: 79387ebdc9ad0bbae88897885da885483c4d57e08af9be69f6f2369be67bbe5b
|
4
|
+
data.tar.gz: aa5413ff3913decab84dc70e86f94f4293acfcc16340e7ad6216abf9943335b1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 99132ff502c108b47595d211caba78c3034adb05390937269814d09a8da67c546b9bc2e7a2c776bcba0596d76ee50b7229c7497aad77e2d2483c43351d4a65a5
|
7
|
+
data.tar.gz: 52e2bb51d1fdc668c8837646635c37c58c65761d5ef3812294838dfacc54dfc48ae26550bd132a077dfc8579ee4fa86787fe17d27f45389a6a536328276de897
|
@@ -3,6 +3,12 @@ module Dynflow
|
|
3
3
|
module Action::WithSubPlans
|
4
4
|
include Dynflow::Action::Cancellable
|
5
5
|
|
6
|
+
class SubtaskFailedException < RuntimeError
|
7
|
+
def backtrace
|
8
|
+
[]
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
6
12
|
SubPlanFinished = Algebrick.type do
|
7
13
|
fields! :execution_plan_id => String,
|
8
14
|
:success => type { variants TrueClass, FalseClass }
|
@@ -228,7 +234,7 @@ module Dynflow
|
|
228
234
|
end
|
229
235
|
|
230
236
|
def check_for_errors!
|
231
|
-
|
237
|
+
raise SubtaskFailedException.new("A sub task failed") if output[:failed_count] > 0
|
232
238
|
end
|
233
239
|
|
234
240
|
def uses_concurrency_control
|
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
|
|
@@ -335,6 +335,8 @@ module Dynflow
|
|
335
335
|
if value
|
336
336
|
record = prepare_record(what, value, (existing_record || condition), with_data)
|
337
337
|
if existing_record
|
338
|
+
record = prune_unchanged(what, existing_record, record)
|
339
|
+
return value if record.empty?
|
338
340
|
condition = update_conditions.merge(condition)
|
339
341
|
return with_retry { table.where(condition).update(record) }
|
340
342
|
else
|
@@ -356,6 +358,14 @@ module Dynflow
|
|
356
358
|
end
|
357
359
|
end
|
358
360
|
|
361
|
+
def prune_unchanged(what, object, record)
|
362
|
+
record = record.dup
|
363
|
+
table(what).columns.each do |column|
|
364
|
+
record.delete(column) if object[column] == record[column]
|
365
|
+
end
|
366
|
+
record
|
367
|
+
end
|
368
|
+
|
359
369
|
alias_method :load, :load_record
|
360
370
|
|
361
371
|
def load_records(what, condition, keys = nil)
|
@@ -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
|
|
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.10
|
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-03-01 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.3.20
|
682
682
|
signing_key:
|
683
683
|
specification_version: 4
|
684
684
|
summary: DYNamic workFLOW engine
|