floe 0.2.2 → 0.2.3
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 +16 -12
- data/lib/floe/version.rb +1 -1
- data/lib/floe/workflow.rb +12 -12
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 68fc7de6c5112f8717f2941c4f89f22d688092a2ab15a6fe5b859c0f6684c177
|
4
|
+
data.tar.gz: 23172e12b50792acbc0891dd9b0fa0a9e4d0583aa6e52e85fae408faa33ffdd4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 157482ec4fd0914d18cb87c06d1ee61f91668baf9c6592451f6c8c1e5de206f088256ef8c45ff29e6d26fb175e3750e1b0ed1008a76910f6520bd424977a0763
|
7
|
+
data.tar.gz: 7c5c586d0087914944e577a6af4f8ca99ebc8ef15798fcb6ed5f50b46a99e368c8315b087c1ad823e2809b24e8539f479f26699b56618324b4850e98bed9b63e
|
data/CHANGELOG.md
CHANGED
@@ -4,39 +4,43 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
|
4
4
|
|
5
5
|
## [Unreleased]
|
6
6
|
|
7
|
+
## [0.2.3] - 2023-07-28
|
8
|
+
### Fixed
|
9
|
+
- Fix storing next_state in Context ([#76])(https://github.com/ManageIQ/floe/pull/76)
|
10
|
+
|
7
11
|
## [0.2.2] - 2023-07-24
|
8
12
|
### Fixed
|
9
|
-
- Don't pick up real KUBECONFIG for tests (#73)
|
10
|
-
- Fix double json.parse and context default value (#69)
|
13
|
+
- Don't pick up real KUBECONFIG for tests ([#73](https://github.com/ManageIQ/floe/pull/73))
|
14
|
+
- Fix double json.parse and context default value ([#69](https://github.com/ManageIQ/floe/pull/69))
|
11
15
|
|
12
16
|
### Added
|
13
|
-
- Configure Renovate (#46)
|
17
|
+
- Configure Renovate ([#46](https://github.com/ManageIQ/floe/pull/46))
|
14
18
|
|
15
19
|
### Changed
|
16
|
-
- Simplify next state handling (#66)
|
17
|
-
- Refactor Input/Output path handling (#68)
|
20
|
+
- Simplify next state handling ([#66](https://github.com/ManageIQ/floe/pull/66))
|
21
|
+
- Refactor Input/Output path handling ([#68](https://github.com/ManageIQ/floe/pull/68))
|
18
22
|
|
19
23
|
## [0.2.1] - 2023-07-12
|
20
24
|
### Fixed
|
21
|
-
- Fix State EnteredTime and FinishedTime (#59)
|
25
|
+
- Fix State EnteredTime and FinishedTime ([#59](https://github.com/ManageIQ/floe/pull/59))
|
22
26
|
|
23
27
|
### Added
|
24
|
-
- Add workflow output (#57)
|
28
|
+
- Add workflow output ([#57](https://github.com/ManageIQ/floe/pull/57))
|
25
29
|
|
26
30
|
## [0.2.0] - 2023-07-05
|
27
31
|
### Added
|
28
|
-
- Add ability to pass options to `Floe::Workflow::Runner` (#48)
|
29
|
-
- Add kubeconfig file support to `Floe::Workflow::Runner::Kubernetes` (#53)
|
32
|
+
- Add ability to pass options to `Floe::Workflow::Runner` ([#48](https://github.com/ManageIQ/floe/pull/48))
|
33
|
+
- Add kubeconfig file support to `Floe::Workflow::Runner::Kubernetes` ([#53](https://github.com/ManageIQ/floe/pull/53))
|
30
34
|
|
31
35
|
### Removed
|
32
|
-
- Remove to_dot/to_svg code (#54)
|
36
|
+
- Remove to_dot/to_svg code ([#54](https://github.com/ManageIQ/floe/pull/54))
|
33
37
|
|
34
38
|
### Fixed
|
35
|
-
- Fixed default rake task to spec (#55)
|
39
|
+
- Fixed default rake task to spec ([#55](https://github.com/ManageIQ/floe/pull/55))
|
36
40
|
|
37
41
|
## [0.1.1] - 2023-06-05
|
38
42
|
### Fixed
|
39
|
-
- Fix States::Wait Path initializer arguments (#47)
|
43
|
+
- Fix States::Wait Path initializer arguments ([#47](https://github.com/ManageIQ/floe/pull/47))
|
40
44
|
|
41
45
|
## [0.1.0] - 2023-03-13
|
42
46
|
### Added
|
data/lib/floe/version.rb
CHANGED
data/lib/floe/workflow.rb
CHANGED
@@ -29,8 +29,10 @@ module Floe
|
|
29
29
|
@states_by_name = @states.each_with_object({}) { |state, result| result[state.name] = state }
|
30
30
|
start_at = @payload["StartAt"]
|
31
31
|
|
32
|
-
|
33
|
-
|
32
|
+
context.state["Name"] ||= start_at
|
33
|
+
|
34
|
+
current_state_name = context.state["Name"]
|
35
|
+
@current_state = @states_by_name[current_state_name]
|
34
36
|
|
35
37
|
@status = current_state_name == start_at ? "pending" : current_state.status
|
36
38
|
rescue JSON::ParserError => err
|
@@ -41,26 +43,22 @@ module Floe
|
|
41
43
|
@status = "running" if @status == "pending"
|
42
44
|
context.execution["StartTime"] ||= Time.now.utc
|
43
45
|
|
44
|
-
|
46
|
+
context.state["Guid"] = SecureRandom.uuid
|
47
|
+
context.state["Input"] ||= context.execution["Input"].dup
|
45
48
|
|
46
|
-
logger.info("Running state: [#{current_state.name}] with input [#{
|
49
|
+
logger.info("Running state: [#{current_state.name}] with input [#{context.state["Input"]}]...")
|
47
50
|
|
48
|
-
context.state =
|
49
|
-
"Guid" => SecureRandom.uuid,
|
50
|
-
"EnteredTime" => Time.now.utc,
|
51
|
-
"Input" => input,
|
52
|
-
"Name" => current_state.name
|
53
|
-
}
|
51
|
+
context.state["EnteredTime"] = Time.now.utc
|
54
52
|
|
55
53
|
tick = Process.clock_gettime(Process::CLOCK_MONOTONIC)
|
56
|
-
next_state, output = current_state.run!(
|
54
|
+
next_state, output = current_state.run!(context.state["Input"])
|
57
55
|
tock = Process.clock_gettime(Process::CLOCK_MONOTONIC)
|
58
56
|
|
59
57
|
context.state["FinishedTime"] = Time.now.utc
|
60
58
|
context.state["Duration"] = (tock - tick) / 1_000_000.0
|
61
59
|
context.state["Output"] = output
|
62
60
|
|
63
|
-
logger.info("Running state: [#{current_state.name}] with input [#{
|
61
|
+
logger.info("Running state: [#{current_state.name}] with input [#{context["Input"]}]...Complete - next state: [#{next_state}] output: [#{output}]")
|
64
62
|
|
65
63
|
context.states << context.state
|
66
64
|
|
@@ -68,6 +66,8 @@ module Floe
|
|
68
66
|
@current_state = next_state && @states_by_name[next_state]
|
69
67
|
@output = output if end?
|
70
68
|
|
69
|
+
context.state = {"Name" => next_state, "Input" => output} unless end?
|
70
|
+
|
71
71
|
self
|
72
72
|
end
|
73
73
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: floe
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ManageIQ Developers
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-07-
|
11
|
+
date: 2023-07-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: awesome_spawn
|