cpflow 4.0.0 → 4.0.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/.rubocop.yml +4 -0
- data/CHANGELOG.md +5 -0
- data/Gemfile.lock +1 -1
- data/lib/command/base.rb +26 -21
- data/lib/command/run.rb +1 -1
- data/lib/cpflow/version.rb +1 -1
- 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: 48de117fc2fbc2458b8469bfb3d93663c2950777803f84079dfdfa7cdbcda9e9
|
4
|
+
data.tar.gz: e3a8347bd330f6df7d2d5e98a3692144fa04d3c935241fbacf7ab06c8f039e79
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '06907b1c67896b14b71376bc88253fcd74a675fb088aab8f6c7bf051ebfaf3f463c3ab96bf33bf64abe6da5bf1dff22529503508176a6d1fc5c35517021c9dc4'
|
7
|
+
data.tar.gz: ae76127106fa6dc3544669163e94571d68ec149f22b8ed68d1cf0332c3f333b65e1a1d2f6f6b2cb75039d45bcf1f8418f1cb4d5ceba750cf11cc930ac5d38ac4
|
data/.rubocop.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -14,6 +14,11 @@ Changes since the last non-beta release.
|
|
14
14
|
|
15
15
|
_Please add entries here for your pull requests that have not yet been released._
|
16
16
|
|
17
|
+
### Fixed
|
18
|
+
|
19
|
+
- Fixed issue where `run` command fails when runner workload has ENV but original workload does not. [PR 227](https://github.com/shakacode/control-plane-flow/pull/227) by [Rafael Gomes](https://github.com/rafaelgomesxyz).
|
20
|
+
|
21
|
+
- Fixed potential infinite loop that could occur for a command if one of the execution steps fails and gets stuck. [PR 217](https://github.com/shakacode/control-plane-flow/pull/217) by [Zakir Dzhamaliddinov](https://github.com/zzaakiirr).
|
17
22
|
|
18
23
|
## [4.0.0] - 2024-08-21
|
19
24
|
|
data/Gemfile.lock
CHANGED
data/lib/command/base.rb
CHANGED
@@ -465,45 +465,50 @@ module Command
|
|
465
465
|
$stderr
|
466
466
|
end
|
467
467
|
|
468
|
-
def
|
469
|
-
message = error.message
|
470
|
-
if abort_on_error
|
471
|
-
progress.puts(" #{Shell.color('failed!', :red)}\n\n")
|
472
|
-
Shell.abort(message)
|
473
|
-
else
|
474
|
-
Shell.write_to_tmp_stderr(message)
|
475
|
-
end
|
476
|
-
end
|
477
|
-
|
478
|
-
def step_finish(success)
|
468
|
+
def step_finish(success, abort_on_error: true)
|
479
469
|
if success
|
480
470
|
progress.puts(" #{Shell.color('done!', :green)}")
|
481
471
|
else
|
482
472
|
progress.puts(" #{Shell.color('failed!', :red)}\n\n#{Shell.read_from_tmp_stderr}\n\n")
|
473
|
+
exit(ExitCode::ERROR_DEFAULT) if abort_on_error
|
483
474
|
end
|
484
475
|
end
|
485
476
|
|
486
|
-
def step(message, abort_on_error: true, retry_on_failure: false) # rubocop:disable Metrics/MethodLength
|
477
|
+
def step(message, abort_on_error: true, retry_on_failure: false, max_retry_count: 1000, wait: 1, &block) # rubocop:disable Metrics/MethodLength
|
487
478
|
progress.print("#{message}...")
|
488
479
|
|
489
480
|
Shell.use_tmp_stderr do
|
490
481
|
success = false
|
491
482
|
|
492
483
|
begin
|
493
|
-
|
494
|
-
|
495
|
-
|
496
|
-
|
484
|
+
success =
|
485
|
+
if retry_on_failure
|
486
|
+
with_retry(max_retry_count: max_retry_count, wait: wait, &block)
|
487
|
+
else
|
488
|
+
yield
|
497
489
|
end
|
498
|
-
else
|
499
|
-
success = yield
|
500
|
-
end
|
501
490
|
rescue RuntimeError => e
|
502
|
-
|
491
|
+
Shell.write_to_tmp_stderr(e.message)
|
503
492
|
end
|
504
493
|
|
505
|
-
step_finish(success)
|
494
|
+
step_finish(success, abort_on_error: abort_on_error)
|
495
|
+
end
|
496
|
+
end
|
497
|
+
|
498
|
+
def with_retry(max_retry_count:, wait:)
|
499
|
+
retry_count = 0
|
500
|
+
success = false
|
501
|
+
|
502
|
+
while !success && retry_count <= max_retry_count
|
503
|
+
success = yield
|
504
|
+
break if success
|
505
|
+
|
506
|
+
progress.print(".")
|
507
|
+
Kernel.sleep(wait)
|
508
|
+
retry_count += 1
|
506
509
|
end
|
510
|
+
|
511
|
+
success
|
507
512
|
end
|
508
513
|
|
509
514
|
def cp
|
data/lib/command/run.rb
CHANGED
@@ -207,7 +207,7 @@ module Command
|
|
207
207
|
original_env_str = original_container_spec["env"]&.sort_by { |env| env["name"] }.to_s
|
208
208
|
env_str = container_spec["env"]&.sort_by { |env| env["name"] }.to_s
|
209
209
|
if original_env_str != env_str
|
210
|
-
container_spec["env"] = original_container_spec["env"]
|
210
|
+
container_spec["env"] = original_container_spec["env"] || []
|
211
211
|
should_update = true
|
212
212
|
end
|
213
213
|
|
data/lib/cpflow/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cpflow
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.0.
|
4
|
+
version: 4.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Justin Gordon
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2024-08-
|
12
|
+
date: 2024-08-27 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: dotenv
|