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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7276764c838fbe619e9dfbd03ef63ee48d654cb51e1c90338bd221312c35bac3
4
- data.tar.gz: 61541bf22ba9193628978471a418d351aac5576cbdf3dc186374da04319dbec1
3
+ metadata.gz: f9620d0ace078bd773422b4a4a2f47c41891a312260f64a3a79c140aef0f9991
4
+ data.tar.gz: afd5e5e8c2f72845df2a0851714b77a08d2cd34dfdc081542b52bbeb63a90a23
5
5
  SHA512:
6
- metadata.gz: 4f295717a57a70e71683ec8e82b0755452cb5e740ffad204c40aa8d6970e78f159559c784541694982326a09e7437fea579202e77a34caa2f075293b4c11c421
7
- data.tar.gz: 6ec1d9c222569c4bfa9d5decab841aa87fd8206bf69f753aa77dad6b182e680f9e0252f8be29cd8a93965ef91e1a92a290bc13bcb941c802dcb983ab289582a9
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.0...HEAD
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Floe
4
- VERSION = "0.20.0"
4
+ VERSION = "0.20.1"
5
5
  end
@@ -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 [Hash] (default: {})
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 { |_branch| Context.new({"Execution" => {"Id" => context.execution["Id"]}}, :input => input.to_json).to_h }
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?
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: floe
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.20.0
4
+ version: 0.20.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - ManageIQ Developers