floe 0.20.0 → 0.20.1
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 +6 -1
- data/lib/floe/version.rb +1 -1
- data/lib/floe/workflow/context.rb +19 -3
- data/lib/floe/workflow/states/parallel.rb +3 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f9620d0ace078bd773422b4a4a2f47c41891a312260f64a3a79c140aef0f9991
|
|
4
|
+
data.tar.gz: afd5e5e8c2f72845df2a0851714b77a08d2cd34dfdc081542b52bbeb63a90a23
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 89130117cdb776734d58e28961a61e0c4fce39e465097e15200a907139bdd9c7597b05a0123099d8fdd5b186d349df6a0aacf971fc96cb436ffb415670c60a56
|
|
7
|
+
data.tar.gz: 152b98a4c2dae077b54a122dca7e2b138dc03c6b04809316c60709c53a550af109d5bf8cfef458a49882179360ef48d1427344bccf995517145f49a84e80245a
|
data/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,10 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
|
|
4
4
|
|
|
5
5
|
## [Unreleased]
|
|
6
6
|
|
|
7
|
+
## [0.20.1] - 2026-09-15
|
|
8
|
+
### Fixed
|
|
9
|
+
- Fix Execution Context not passed to Parallel branches ([#348](https://github.com/ManageIQ/floe/pull/348))
|
|
10
|
+
|
|
7
11
|
## [0.20.0] - 2026-07-08
|
|
8
12
|
### Fixed
|
|
9
13
|
- Update to support io-wait v0.4 which drops the `IO#ready?` method ([#340](https://github.com/ManageIQ/floe/pull/340))
|
|
@@ -347,7 +351,8 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
|
|
347
351
|
### Added
|
|
348
352
|
- Initial release
|
|
349
353
|
|
|
350
|
-
[Unreleased]: https://github.com/ManageIQ/floe/compare/v0.20.
|
|
354
|
+
[Unreleased]: https://github.com/ManageIQ/floe/compare/v0.20.1...HEAD
|
|
355
|
+
[0.20.1]: https://github.com/ManageIQ/floe/compare/v0.20.0...v0.20.1
|
|
351
356
|
[0.20.0]: https://github.com/ManageIQ/floe/compare/v0.19.2...v0.20.0
|
|
352
357
|
[0.19.2]: https://github.com/ManageIQ/floe/compare/v0.19.1...v0.19.2
|
|
353
358
|
[0.19.1]: https://github.com/ManageIQ/floe/compare/v0.19.0...v0.19.1
|
data/lib/floe/version.rb
CHANGED
|
@@ -8,15 +8,14 @@ module Floe
|
|
|
8
8
|
include Logging
|
|
9
9
|
|
|
10
10
|
# @param context [Json|Hash] (default, create another with input and execution params)
|
|
11
|
-
# @param input [
|
|
11
|
+
# @param input [Json] (default: '{}')
|
|
12
12
|
def initialize(context = nil, input: nil, credentials: nil, logger: nil)
|
|
13
13
|
context = JSON.parse(context) if context.kind_of?(String)
|
|
14
|
-
input = JSON.parse(input || "{}")
|
|
15
14
|
|
|
16
15
|
@context = context || {}
|
|
17
16
|
self["Credentials"] ||= credentials || {}
|
|
18
17
|
self["Execution"] ||= {}
|
|
19
|
-
self["Execution"]["Input"] ||= input
|
|
18
|
+
self["Execution"]["Input"] ||= JSON.parse(input || "{}")
|
|
20
19
|
self["State"] ||= {}
|
|
21
20
|
self["StateHistory"] ||= []
|
|
22
21
|
self["StateMachine"] ||= {}
|
|
@@ -160,6 +159,23 @@ module Floe
|
|
|
160
159
|
@context.dig(*args)
|
|
161
160
|
end
|
|
162
161
|
|
|
162
|
+
def child_context(input)
|
|
163
|
+
require "active_support/core_ext/object/deep_dup"
|
|
164
|
+
|
|
165
|
+
# Copy the Execution context minus any keys which are set at runtime.
|
|
166
|
+
# This allows any user defined state-machine execution values be used
|
|
167
|
+
# by child workflows.
|
|
168
|
+
#
|
|
169
|
+
# The deep_dup is important here, otherwise the Execution hash object is
|
|
170
|
+
# shared between all child workflows.
|
|
171
|
+
child_execution = execution
|
|
172
|
+
.except("Input", "StartTime", "EndTime")
|
|
173
|
+
.deep_dup
|
|
174
|
+
.merge("Input" => input)
|
|
175
|
+
|
|
176
|
+
self.class.new({"Execution" => child_execution})
|
|
177
|
+
end
|
|
178
|
+
|
|
163
179
|
def inspect
|
|
164
180
|
"#<#{self.class.name}: #{safe_context.inspect}>"
|
|
165
181
|
end
|
|
@@ -36,7 +36,9 @@ module Floe
|
|
|
36
36
|
|
|
37
37
|
input = process_input(context)
|
|
38
38
|
|
|
39
|
-
context.state["BranchContext"] = branches.map
|
|
39
|
+
context.state["BranchContext"] = branches.map do |_branch|
|
|
40
|
+
context.child_context(input).to_h
|
|
41
|
+
end
|
|
40
42
|
end
|
|
41
43
|
|
|
42
44
|
def end?
|