kettle-dev 3.0.3 → 3.0.4
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
- checksums.yaml.gz.sig +0 -0
- data/CHANGELOG.md +14 -1
- data/README.md +1 -1
- data/lib/kettle/dev/ci_monitor.rb +59 -28
- data/lib/kettle/dev/release_cli.rb +14 -3
- data/lib/kettle/dev/version.rb +1 -1
- data.tar.gz.sig +0 -0
- metadata +4 -4
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: df94b20fa384425972e6651ef34406c7dea92977a65ce2fc6cf2c1acfe49c864
|
|
4
|
+
data.tar.gz: adfd9376c8612bcc531c74de90c7bce8450b151e254ac07c4aaeb5387a4c766a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: cf7d1db4bc0047e21715ea03c53334586a96ac3e44a06dfe4c379d556b9ea2145fed6e936873910806a089bf0181c4f3092d0e8c039ca6476692abf611db6921
|
|
7
|
+
data.tar.gz: 90f4c57659ee5ea5503ee1d925e2cec6d158e8238a6251ab2dc54d8bd8e821bb5bcc73277e19ffbe572e8898c93511d2d76780e216baf05a78d2810d9d535772
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
data/CHANGELOG.md
CHANGED
|
@@ -30,6 +30,17 @@ Please file a bug if you notice a violation of semantic versioning.
|
|
|
30
30
|
|
|
31
31
|
### Security
|
|
32
32
|
|
|
33
|
+
## [3.0.4] - 2026-08-10
|
|
34
|
+
|
|
35
|
+
- TAG: [v3.0.4][3.0.4t]
|
|
36
|
+
- COVERAGE: 91.65% -- 5653/6168 lines in 47 files
|
|
37
|
+
- BRANCH COVERAGE: 76.13% -- 2146/2819 branches in 47 files
|
|
38
|
+
- 50.87% documented
|
|
39
|
+
|
|
40
|
+
### Fixed
|
|
41
|
+
|
|
42
|
+
- Honor K_RELEASE_CI_CONTINUE during GitHub Actions and GitLab release monitoring, continuing after failed checks instead of aborting.
|
|
43
|
+
|
|
33
44
|
## [3.0.3] - 2026-08-10
|
|
34
45
|
|
|
35
46
|
- TAG: [v3.0.3][3.0.3t]
|
|
@@ -3442,7 +3453,9 @@ Please file a bug if you notice a violation of semantic versioning.
|
|
|
3442
3453
|
- Selecting will run the selected workflow via `act`
|
|
3443
3454
|
- This may move to its own gem in the future.
|
|
3444
3455
|
|
|
3445
|
-
[Unreleased]: https://github.com/kettle-dev/kettle-dev/compare/v3.0.
|
|
3456
|
+
[Unreleased]: https://github.com/kettle-dev/kettle-dev/compare/v3.0.4...HEAD
|
|
3457
|
+
[3.0.4]: https://github.com/kettle-dev/kettle-dev/compare/v3.0.3...v3.0.4
|
|
3458
|
+
[3.0.4t]: https://github.com/kettle-dev/kettle-dev/releases/tag/v3.0.4
|
|
3446
3459
|
[3.0.3]: https://github.com/kettle-dev/kettle-dev/compare/v3.0.2...v3.0.3
|
|
3447
3460
|
[3.0.3t]: https://github.com/kettle-dev/kettle-dev/releases/tag/v3.0.3
|
|
3448
3461
|
[3.0.2]: https://github.com/kettle-dev/kettle-dev/compare/v3.0.1...v3.0.2
|
data/README.md
CHANGED
|
@@ -1007,7 +1007,7 @@ Thanks for RTFM. ☺️
|
|
|
1007
1007
|
[📌gitmoji]: https://gitmoji.dev
|
|
1008
1008
|
[📌gitmoji-img]: https://img.shields.io/badge/gitmoji_commits-%20%F0%9F%98%9C%20%F0%9F%98%8D-34495e.svg?style=flat-square
|
|
1009
1009
|
[🧮kloc]: https://www.youtube.com/watch?v=dQw4w9WgXcQ
|
|
1010
|
-
[🧮kloc-img]: https://img.shields.io/badge/KLOC-6.
|
|
1010
|
+
[🧮kloc-img]: https://img.shields.io/badge/KLOC-6.168-FFDD67.svg?style=for-the-badge&logo=YouTube&logoColor=blue
|
|
1011
1011
|
[🔐security]: https://github.com/kettle-dev/kettle-dev/blob/main/SECURITY.md
|
|
1012
1012
|
[🔐security-img]: https://img.shields.io/badge/security-policy-259D6C.svg?style=flat
|
|
1013
1013
|
[📄copyright-notice-explainer]: https://opensource.stackexchange.com/questions/5778/why-do-licenses-such-as-the-mit-license-specify-a-single-year
|
|
@@ -44,24 +44,34 @@ module Kettle
|
|
|
44
44
|
module_function :status_emoji
|
|
45
45
|
|
|
46
46
|
# Monitor both GitHub and GitLab CI for the current project/branch.
|
|
47
|
-
# This mirrors ReleaseCLI behavior and
|
|
47
|
+
# This mirrors ReleaseCLI behavior and returns false when failures are
|
|
48
|
+
# tolerated through K_RELEASE_CI_CONTINUE.
|
|
48
49
|
#
|
|
49
50
|
# @param restart_hint [String] guidance command shown on failure
|
|
50
|
-
# @return [
|
|
51
|
+
# @return [Boolean] whether all configured CI providers passed
|
|
51
52
|
def monitor_all!(restart_hint: "bundle exec kettle-release start_step=10", workflows: nil, keepalive: nil, event_recorder: nil, **options)
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
53
|
+
results = [
|
|
54
|
+
monitor_github_internal!(restart_hint: restart_hint, workflows: workflows, keepalive: keepalive, event_recorder: event_recorder),
|
|
55
|
+
monitor_gitlab_internal!(restart_hint: restart_hint, keepalive: keepalive, event_recorder: event_recorder)
|
|
56
|
+
]
|
|
57
|
+
abort("CI configuration not detected (GitHub or GitLab). Ensure CI is configured and remotes point to the correct hosts.") if results.all?(&:nil?)
|
|
58
|
+
|
|
59
|
+
results.all? { |result| result != false }
|
|
56
60
|
end
|
|
57
61
|
|
|
62
|
+
def continue_ci_failures?
|
|
63
|
+
!!(Kettle::Dev::ENV_TRUE_RE =~ ENV.fetch("K_RELEASE_CI_CONTINUE", "false"))
|
|
64
|
+
end
|
|
65
|
+
module_function :continue_ci_failures?
|
|
66
|
+
|
|
58
67
|
# Public wrapper to monitor GitLab pipeline with abort-on-failure semantics.
|
|
59
68
|
# Matches RBS and call sites expecting ::monitor_gitlab!
|
|
60
69
|
# Returns false when GitLab is not configured for this repo/branch.
|
|
61
70
|
# @param restart_hint [String]
|
|
62
71
|
# @return [Boolean]
|
|
63
72
|
def monitor_gitlab!(restart_hint: "bundle exec kettle-release start_step=10")
|
|
64
|
-
monitor_gitlab_internal!(restart_hint: restart_hint)
|
|
73
|
+
result = monitor_gitlab_internal!(restart_hint: restart_hint)
|
|
74
|
+
result.nil? ? false : result
|
|
65
75
|
end
|
|
66
76
|
module_function :monitor_gitlab!
|
|
67
77
|
|
|
@@ -272,14 +282,14 @@ module Kettle
|
|
|
272
282
|
root = Kettle::Dev::CIHelpers.ci_project_root
|
|
273
283
|
workflows = Array(workflows).empty? ? Kettle::Dev::CIHelpers.workflows_list(root) : Array(workflows)
|
|
274
284
|
gh_remote = preferred_github_remote
|
|
275
|
-
return
|
|
285
|
+
return unless gh_remote && !workflows.empty?
|
|
276
286
|
|
|
277
287
|
branch = Kettle::Dev::CIHelpers.current_branch
|
|
278
288
|
abort("Could not determine current branch for CI checks.") unless branch
|
|
279
289
|
|
|
280
290
|
url = remote_url(gh_remote)
|
|
281
291
|
owner, repo = parse_github_owner_repo(url)
|
|
282
|
-
return
|
|
292
|
+
return unless owner && repo
|
|
283
293
|
|
|
284
294
|
total = workflows.size
|
|
285
295
|
abort("No GitHub workflows found under .github/workflows; aborting.") if total.zero?
|
|
@@ -288,6 +298,7 @@ module Kettle
|
|
|
288
298
|
abort("Could not determine local HEAD SHA for GitHub Actions checks.") unless head_sha && !head_sha.empty?
|
|
289
299
|
|
|
290
300
|
passed = {}
|
|
301
|
+
failed = {}
|
|
291
302
|
started = {}
|
|
292
303
|
emit_ci_monitor_event(
|
|
293
304
|
event_recorder,
|
|
@@ -367,7 +378,7 @@ module Kettle
|
|
|
367
378
|
)
|
|
368
379
|
end
|
|
369
380
|
if Kettle::Dev::CIHelpers.success?(run)
|
|
370
|
-
unless passed[wf]
|
|
381
|
+
unless passed[wf] || failed[wf]
|
|
371
382
|
passed[wf] = true
|
|
372
383
|
completed_workflow = wf
|
|
373
384
|
pbar&.increment
|
|
@@ -384,7 +395,7 @@ module Kettle
|
|
|
384
395
|
total: total
|
|
385
396
|
)
|
|
386
397
|
end
|
|
387
|
-
elsif Kettle::Dev::CIHelpers.failed?(run)
|
|
398
|
+
elsif Kettle::Dev::CIHelpers.failed?(run) && !passed[wf] && !failed[wf]
|
|
388
399
|
puts
|
|
389
400
|
wf_url = run["html_url"] || "https://github.com/#{owner}/#{repo}/actions/workflows/#{wf}"
|
|
390
401
|
emit_ci_monitor_event(
|
|
@@ -400,9 +411,16 @@ module Kettle
|
|
|
400
411
|
total: total,
|
|
401
412
|
reason: "Workflow failed"
|
|
402
413
|
)
|
|
403
|
-
|
|
414
|
+
unless continue_ci_failures?
|
|
415
|
+
abort("Workflow failed: #{wf} -> #{wf_url} Fix the workflow, then restart this tool from CI validation with: #{restart_hint}")
|
|
416
|
+
end
|
|
417
|
+
|
|
418
|
+
failed[wf] = true
|
|
419
|
+
pbar&.increment
|
|
420
|
+
puts "Continuing CI monitoring despite #{wf} failure because K_RELEASE_CI_CONTINUE=true."
|
|
404
421
|
end
|
|
405
422
|
end
|
|
423
|
+
completed = passed.size + failed.size
|
|
406
424
|
emit_ci_monitor_event(
|
|
407
425
|
event_recorder,
|
|
408
426
|
action: "github_tick",
|
|
@@ -412,11 +430,11 @@ module Kettle
|
|
|
412
430
|
run_status: run && run["status"],
|
|
413
431
|
conclusion: run && run["conclusion"],
|
|
414
432
|
completed_workflow: completed_workflow,
|
|
415
|
-
completed:
|
|
433
|
+
completed: completed,
|
|
416
434
|
total: total,
|
|
417
435
|
started: started.size
|
|
418
436
|
)
|
|
419
|
-
break if
|
|
437
|
+
break if completed == total
|
|
420
438
|
if started.size < total && monotonic_time >= start_deadline
|
|
421
439
|
missing = (workflows - started.keys).join(", ")
|
|
422
440
|
puts
|
|
@@ -441,14 +459,19 @@ module Kettle
|
|
|
441
459
|
emit_ci_monitor_event(
|
|
442
460
|
event_recorder,
|
|
443
461
|
action: "github_complete",
|
|
444
|
-
status: "ok",
|
|
462
|
+
status: failed.empty? ? "ok" : "failed",
|
|
445
463
|
provider: "github",
|
|
446
464
|
workflows: workflows,
|
|
447
|
-
completed: passed.size,
|
|
448
|
-
total: total
|
|
465
|
+
completed: passed.size + failed.size,
|
|
466
|
+
total: total,
|
|
467
|
+
failed: failed.keys
|
|
449
468
|
)
|
|
450
|
-
|
|
451
|
-
|
|
469
|
+
if failed.empty?
|
|
470
|
+
puts "\nAll GitHub workflows passing (#{passed.size}/#{total})."
|
|
471
|
+
else
|
|
472
|
+
puts "\nGitHub workflows completed with failures (#{passed.size}/#{total} passed); continuing because K_RELEASE_CI_CONTINUE=true."
|
|
473
|
+
end
|
|
474
|
+
failed.empty?
|
|
452
475
|
end
|
|
453
476
|
module_function :monitor_github_internal!
|
|
454
477
|
|
|
@@ -506,13 +529,13 @@ module Kettle
|
|
|
506
529
|
root = Kettle::Dev::CIHelpers.ci_project_root
|
|
507
530
|
gitlab_ci = File.exist?(File.join(root, ".gitlab-ci.yml"))
|
|
508
531
|
gl_remote = gitlab_remote_candidates.first
|
|
509
|
-
return
|
|
532
|
+
return unless gitlab_ci && gl_remote
|
|
510
533
|
|
|
511
534
|
branch = Kettle::Dev::CIHelpers.current_branch
|
|
512
535
|
abort("Could not determine current branch for CI checks.") unless branch
|
|
513
536
|
|
|
514
537
|
owner, repo = Kettle::Dev::CIHelpers.repo_info_gitlab
|
|
515
|
-
return
|
|
538
|
+
return unless owner && repo
|
|
516
539
|
|
|
517
540
|
emit_ci_monitor_event(
|
|
518
541
|
event_recorder,
|
|
@@ -530,6 +553,7 @@ module Kettle
|
|
|
530
553
|
ProgressBar.create(title: "CI", total: 1, format: "%t %b %c/%C", length: 30)
|
|
531
554
|
end
|
|
532
555
|
keepalive_timer = keepalive_timer(keepalive)
|
|
556
|
+
pipeline_failed = false
|
|
533
557
|
loop do
|
|
534
558
|
keepalive_timer.call
|
|
535
559
|
pipe = Kettle::Dev::CIHelpers.gitlab_latest_pipeline(owner: owner, repo: repo, branch: branch)
|
|
@@ -565,7 +589,6 @@ module Kettle
|
|
|
565
589
|
completed: 0,
|
|
566
590
|
total: 1
|
|
567
591
|
)
|
|
568
|
-
break
|
|
569
592
|
else
|
|
570
593
|
puts
|
|
571
594
|
emit_ci_monitor_event(
|
|
@@ -580,8 +603,15 @@ module Kettle
|
|
|
580
603
|
total: 1
|
|
581
604
|
)
|
|
582
605
|
url = pipe_url
|
|
583
|
-
|
|
606
|
+
unless continue_ci_failures?
|
|
607
|
+
abort("Pipeline failed: #{url} Fix the pipeline, then restart this tool from CI validation with: #{restart_hint}")
|
|
608
|
+
end
|
|
609
|
+
|
|
610
|
+
pipeline_failed = true
|
|
611
|
+
pbar&.increment unless pbar&.finished?
|
|
612
|
+
puts "GitLab pipeline failed; continuing because K_RELEASE_CI_CONTINUE=true."
|
|
584
613
|
end
|
|
614
|
+
break
|
|
585
615
|
elsif pipe["status"] == "blocked"
|
|
586
616
|
# Blocked pipeline (e.g., awaiting approvals) — treat as unknown and continue
|
|
587
617
|
puts "\nGitLab pipeline is blocked. Result is unknown; continuing."
|
|
@@ -606,13 +636,14 @@ module Kettle
|
|
|
606
636
|
emit_ci_monitor_event(
|
|
607
637
|
event_recorder,
|
|
608
638
|
action: "gitlab_complete",
|
|
609
|
-
status: "ok",
|
|
639
|
+
status: pipeline_failed ? "failed" : "ok",
|
|
610
640
|
provider: "gitlab",
|
|
611
641
|
completed: 1,
|
|
612
|
-
total: 1
|
|
642
|
+
total: 1,
|
|
643
|
+
failed: pipeline_failed
|
|
613
644
|
)
|
|
614
|
-
puts "\nGitLab pipeline passing."
|
|
615
|
-
|
|
645
|
+
puts pipeline_failed ? "\nGitLab pipeline failed; continuing because K_RELEASE_CI_CONTINUE=true." : "\nGitLab pipeline passing."
|
|
646
|
+
!pipeline_failed
|
|
616
647
|
end
|
|
617
648
|
module_function :monitor_gitlab_internal!
|
|
618
649
|
|
|
@@ -620,7 +651,7 @@ module Kettle
|
|
|
620
651
|
mark = case status.to_s
|
|
621
652
|
when "started"
|
|
622
653
|
">"
|
|
623
|
-
when "ok", "skipped"
|
|
654
|
+
when "ok", "skipped", "continued"
|
|
624
655
|
"."
|
|
625
656
|
when "failed"
|
|
626
657
|
"!"
|
|
@@ -1184,15 +1184,26 @@ module Kettle
|
|
|
1184
1184
|
keep_release_secrets_alive!("CI monitoring")
|
|
1185
1185
|
restart_hint = "bundle exec kettle-release start_step=10"
|
|
1186
1186
|
emit_ci_monitor_event(action: "start", status: "started", workflows: @ci_workflows, restart_hint: restart_hint)
|
|
1187
|
-
#
|
|
1187
|
+
# The monitor preserves fail-fast behavior by default and returns false
|
|
1188
|
+
# when K_RELEASE_CI_CONTINUE explicitly allows failed CI checks.
|
|
1188
1189
|
begin
|
|
1189
|
-
Kettle::Dev::CIMonitor.monitor_all!(
|
|
1190
|
+
ci_ok = Kettle::Dev::CIMonitor.monitor_all!(
|
|
1190
1191
|
restart_hint: restart_hint,
|
|
1191
1192
|
workflows: @ci_workflows,
|
|
1192
1193
|
keepalive: release_secrets_keepalive_required? ? -> { keep_release_secrets_alive!("CI monitoring") } : nil,
|
|
1193
1194
|
event_recorder: @event_recorder
|
|
1194
1195
|
)
|
|
1195
|
-
|
|
1196
|
+
if ci_ok
|
|
1197
|
+
emit_ci_monitor_event(action: "finish", status: "ok", workflows: @ci_workflows, restart_hint: restart_hint)
|
|
1198
|
+
else
|
|
1199
|
+
emit_ci_monitor_event(
|
|
1200
|
+
action: "finish",
|
|
1201
|
+
status: "continued",
|
|
1202
|
+
workflows: @ci_workflows,
|
|
1203
|
+
restart_hint: restart_hint,
|
|
1204
|
+
reason: "CI checks failed; continuing because K_RELEASE_CI_CONTINUE=true"
|
|
1205
|
+
)
|
|
1206
|
+
end
|
|
1196
1207
|
rescue SystemExit => error
|
|
1197
1208
|
emit_ci_monitor_event(action: "finish", status: "failed", workflows: @ci_workflows, restart_hint: restart_hint, reason: error.message)
|
|
1198
1209
|
raise
|
data/lib/kettle/dev/version.rb
CHANGED
|
@@ -5,7 +5,7 @@ module Kettle
|
|
|
5
5
|
# Version namespace for this gem.
|
|
6
6
|
module Version
|
|
7
7
|
# Current gem version.
|
|
8
|
-
VERSION = "3.0.
|
|
8
|
+
VERSION = "3.0.4"
|
|
9
9
|
end
|
|
10
10
|
# Current gem version exposed at the traditional constant location.
|
|
11
11
|
VERSION = Version::VERSION # Traditional Constant Location
|
data.tar.gz.sig
CHANGED
|
Binary file
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: kettle-dev
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.0.
|
|
4
|
+
version: 3.0.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Peter H. Boling
|
|
@@ -400,10 +400,10 @@ licenses:
|
|
|
400
400
|
- AGPL-3.0-only
|
|
401
401
|
metadata:
|
|
402
402
|
homepage_uri: https://kettle-dev.galtzo.com
|
|
403
|
-
source_code_uri: https://github.com/kettle-dev/kettle-dev/tree/v3.0.
|
|
404
|
-
changelog_uri: https://github.com/kettle-dev/kettle-dev/blob/v3.0.
|
|
403
|
+
source_code_uri: https://github.com/kettle-dev/kettle-dev/tree/v3.0.4
|
|
404
|
+
changelog_uri: https://github.com/kettle-dev/kettle-dev/blob/v3.0.4/CHANGELOG.md
|
|
405
405
|
bug_tracker_uri: https://github.com/kettle-dev/kettle-dev/issues
|
|
406
|
-
documentation_uri: https://www.rubydoc.info/gems/kettle-dev/3.0.
|
|
406
|
+
documentation_uri: https://www.rubydoc.info/gems/kettle-dev/3.0.4
|
|
407
407
|
funding_uri: https://github.com/sponsors/pboling
|
|
408
408
|
wiki_uri: https://github.com/kettle-dev/kettle-dev/wiki
|
|
409
409
|
news_uri: https://www.railsbling.com/tags/kettle-dev
|
metadata.gz.sig
CHANGED
|
Binary file
|