dynflow 1.6.10 → 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/persistence_adapters/sequel.rb +2 -2
- data/lib/dynflow/version.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
|
@@ -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
|
data/lib/dynflow/version.rb
CHANGED
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: 2023-
|
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
|