kettle-dev 3.1.42 → 3.1.43
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 +17 -1
- data/README.md +1 -1
- data/lib/kettle/dev/ci_helpers.rb +53 -4
- data/lib/kettle/dev/ci_monitor.rb +19 -0
- data/lib/kettle/dev/release_cli.rb +20 -4
- data/lib/kettle/dev/tasks/ci_task.rb +115 -100
- data/lib/kettle/dev/version.rb +1 -1
- data.tar.gz.sig +0 -0
- metadata +8 -8
- 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: a3117f6b6f974ae435d25d54bbdbdefbc08e6a4086014410b1939b92d1c20303
|
|
4
|
+
data.tar.gz: e9b13839a863ee219ddbfe4dd11b8c57953e7771152753c805fc5869b2de1489
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3ff67048d5059c806c41b5b9dfc2279aadb3cd01c8715cae3e19ecdc5dceb499ea48a163fe236efbc6213867e66e0d90a11d23bb452f15bc70adb33af829be85
|
|
7
|
+
data.tar.gz: 98bb53f1ec9bfe9d2700354512fed35eaa17b7be138ba6c9e36bca494e92d9eb78dbe50a261c2ff8bda8e0d46d6d42bf2d514ccb639b72bbb1438f7a64a6baa9
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
data/CHANGELOG.md
CHANGED
|
@@ -30,6 +30,20 @@ Please file a bug if you notice a violation of semantic versioning.
|
|
|
30
30
|
|
|
31
31
|
### Security
|
|
32
32
|
|
|
33
|
+
## [3.1.43] - 2026-12-04
|
|
34
|
+
|
|
35
|
+
- TAG: [v3.1.43][3.1.43t]
|
|
36
|
+
- COVERAGE: 91.55% -- 6790/7417 lines in 53 files
|
|
37
|
+
- BRANCH COVERAGE: 75.71% -- 2628/3471 branches in 53 files
|
|
38
|
+
- 57.33% documented
|
|
39
|
+
|
|
40
|
+
### Fixed
|
|
41
|
+
|
|
42
|
+
- Exclude non-gating GitHub Actions workflows (all jobs `continue-on-error: true`, all `experimental: true`, or wrapped in `soft-fail`, such as `jruby.yml` and `jruby-10.0.yml`) from `CIHelpers.workflows_list` so releases do not block on workflows that cannot fail.
|
|
43
|
+
- Skip the post-CI `bundle lock --update` reset in `ReleaseCLI#normalize_release_lockfiles_before_publish_tasks!` when `HEAD` was already CI-validated in the current release run and tracked lockfiles remain clean and valid, preventing unrelated upstream gem releases during CI wait from triggering a second full CI cycle (and remove the redundant double reset call on step 14/15 resumes).
|
|
44
|
+
- Include `remaining` unfinished workflows in `CIMonitor` `github_tick` events and emit a waiting tick when workflows remain in progress so progress UIs show what is still running instead of freezing on the last completed workflow.
|
|
45
|
+
- Stop, kill, and join `CITask.act` background polling and input threads cooperatively inside an `ensure` block (and eliminate `allow_any_instance_of(Thread)` kill-stub leaks in `ci_task_spec.rb`), preventing leaked zero-sleep polling threads from growing heap and starving `CIHelpers.claim_ci_rate_slot` across subsequent specs.
|
|
46
|
+
|
|
33
47
|
## [3.1.42] - 2026-12-04
|
|
34
48
|
|
|
35
49
|
- TAG: [v3.1.42][3.1.42t]
|
|
@@ -4611,7 +4625,9 @@ Please file a bug if you notice a violation of semantic versioning.
|
|
|
4611
4625
|
- Selecting will run the selected workflow via `act`
|
|
4612
4626
|
- This may move to its own gem in the future.
|
|
4613
4627
|
|
|
4614
|
-
[Unreleased]: https://github.com/kettle-dev/kettle-dev/compare/v3.1.
|
|
4628
|
+
[Unreleased]: https://github.com/kettle-dev/kettle-dev/compare/v3.1.43...HEAD
|
|
4629
|
+
[3.1.43]: https://github.com/kettle-dev/kettle-dev/compare/v3.1.42...v3.1.43
|
|
4630
|
+
[3.1.43t]: https://github.com/kettle-dev/kettle-dev/releases/tag/v3.1.43
|
|
4615
4631
|
[3.1.42]: https://github.com/kettle-dev/kettle-dev/compare/v3.1.41...v3.1.42
|
|
4616
4632
|
[3.1.42t]: https://github.com/kettle-dev/kettle-dev/releases/tag/v3.1.42
|
|
4617
4633
|
[3.1.41]: https://github.com/kettle-dev/kettle-dev/compare/v3.1.40...v3.1.41
|
data/README.md
CHANGED
|
@@ -1046,7 +1046,7 @@ Thanks for RTFM. ☺️
|
|
|
1046
1046
|
[📌gitmoji]: https://gitmoji.dev
|
|
1047
1047
|
[📌gitmoji-img]: https://img.shields.io/badge/gitmoji_commits-%20%F0%9F%98%9C%20%F0%9F%98%8D-34495e.svg?style=flat-square
|
|
1048
1048
|
[🧮kloc]: https://www.youtube.com/watch?v=dQw4w9WgXcQ
|
|
1049
|
-
[🧮kloc-img]: https://img.shields.io/badge/KLOC-7.
|
|
1049
|
+
[🧮kloc-img]: https://img.shields.io/badge/KLOC-7.417-FFDD67.svg?style=for-the-badge&logo=YouTube&logoColor=blue
|
|
1050
1050
|
[🔐security]: https://github.com/kettle-dev/kettle-dev/blob/main/SECURITY.md
|
|
1051
1051
|
[🔐security-img]: https://img.shields.io/badge/security-policy-259D6C.svg?style=flat
|
|
1052
1052
|
[📄copyright-notice-explainer]: https://opensource.stackexchange.com/questions/5778/why-do-licenses-such-as-the-mit-license-specify-a-single-year
|
|
@@ -80,7 +80,10 @@ module Kettle
|
|
|
80
80
|
end
|
|
81
81
|
|
|
82
82
|
# List workflow YAML basenames under .github/workflows at the given root.
|
|
83
|
-
# Excludes maintenance workflows defined by {#exclusions}
|
|
83
|
+
# Excludes maintenance workflows defined by {#exclusions}, slow workflows
|
|
84
|
+
# matched by {#slow_workflow?}, and non-gating workflows (all jobs
|
|
85
|
+
# soft-fail / experimental / continue-on-error) matched by
|
|
86
|
+
# {#non_gating_workflow?}.
|
|
84
87
|
# @param root [String] project root (defaults to {#project_root})
|
|
85
88
|
# @return [Array<String>] sorted list of basenames (e.g., "ci.yml")
|
|
86
89
|
def workflows_list(root = project_root)
|
|
@@ -90,9 +93,12 @@ module Kettle
|
|
|
90
93
|
else
|
|
91
94
|
[]
|
|
92
95
|
end
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
+
files.each_with_object([]) do |path, list|
|
|
97
|
+
name = File.basename(path)
|
|
98
|
+
next if exclusions.include?(name) || slow_workflow?(name) || non_gating_workflow?(path)
|
|
99
|
+
|
|
100
|
+
list << name
|
|
101
|
+
end.uniq.sort
|
|
96
102
|
end
|
|
97
103
|
|
|
98
104
|
# Workflows that are slow or resource constrained (macOS runner pool, Windows,
|
|
@@ -100,6 +106,9 @@ module Kettle
|
|
|
100
106
|
# Matched on basename rather than a fixed list because templates vary the exact names.
|
|
101
107
|
SLOW_WORKFLOW_PATTERN = /mac|windows|heads|platforms/i
|
|
102
108
|
|
|
109
|
+
# Action reference pattern for soft-fail wrappers that never fail a workflow conclusion.
|
|
110
|
+
SOFT_FAIL_ACTION_PATTERN = %r{/soft-fail(?:@|\z)}i
|
|
111
|
+
|
|
103
112
|
# Strict allow-list of workflow basenames that execute the project's test suite.
|
|
104
113
|
# Used by CIMonitor's optional CI time limit to verify tests passed before allowing
|
|
105
114
|
# still-running or queued secondary workflows to be bypassed.
|
|
@@ -111,6 +120,46 @@ module Kettle
|
|
|
111
120
|
name.to_s.match?(SLOW_WORKFLOW_PATTERN)
|
|
112
121
|
end
|
|
113
122
|
|
|
123
|
+
# Returns true when every job in the local workflow YAML is non-gating
|
|
124
|
+
# (job-level `continue-on-error: true`, an experimental/head matrix whose
|
|
125
|
+
# entries all satisfy `continue-on-error`, or a `soft-fail` step wrapper).
|
|
126
|
+
# Malformed YAML returns false so {#validate_workflow_yaml!} still reports it.
|
|
127
|
+
# @param path [String] path to workflow YAML file
|
|
128
|
+
# @return [Boolean]
|
|
129
|
+
def non_gating_workflow?(path)
|
|
130
|
+
return false unless File.file?(path)
|
|
131
|
+
|
|
132
|
+
doc = Kettle::Dev.safe_load_yaml(File.read(path), aliases: true)
|
|
133
|
+
return false unless doc.is_a?(Hash)
|
|
134
|
+
|
|
135
|
+
jobs = doc["jobs"]
|
|
136
|
+
return false unless jobs.is_a?(Hash) && !jobs.empty?
|
|
137
|
+
|
|
138
|
+
jobs.each_value.all? { |job| non_gating_job?(job) }
|
|
139
|
+
rescue
|
|
140
|
+
false
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
# @param job [Object] parsed workflow job mapping
|
|
144
|
+
# @return [Boolean]
|
|
145
|
+
def non_gating_job?(job)
|
|
146
|
+
return false unless job.is_a?(Hash)
|
|
147
|
+
|
|
148
|
+
coe = job["continue-on-error"]
|
|
149
|
+
return true if coe == true
|
|
150
|
+
|
|
151
|
+
includes = job.dig("strategy", "matrix", "include")
|
|
152
|
+
if includes.is_a?(Array) && !includes.empty? && coe.is_a?(String)
|
|
153
|
+
return true if coe.include?("matrix.experimental") && includes.all? { |entry| entry.is_a?(Hash) && entry["experimental"] == true }
|
|
154
|
+
return true if coe.include?("endsWith(matrix.ruby, 'head')") && includes.all? { |entry| entry.is_a?(Hash) && entry["ruby"].to_s.end_with?("head") }
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
steps = job["steps"]
|
|
158
|
+
return false unless steps.is_a?(Array) && !steps.empty?
|
|
159
|
+
|
|
160
|
+
steps.any? { |step| step.is_a?(Hash) && step["uses"].to_s.match?(SOFT_FAIL_ACTION_PATTERN) }
|
|
161
|
+
end
|
|
162
|
+
|
|
114
163
|
# @param name [String] workflow basename
|
|
115
164
|
# @return [Boolean]
|
|
116
165
|
def test_workflow?(name)
|
|
@@ -423,6 +423,7 @@ module Kettle
|
|
|
423
423
|
end
|
|
424
424
|
jobs_poll_interval = (jobs_poll_interval && jobs_poll_interval >= 0) ? jobs_poll_interval : 60.0
|
|
425
425
|
last_jobs_poll = 0.0
|
|
426
|
+
last_waiting_remaining = nil
|
|
426
427
|
loop do
|
|
427
428
|
keepalive_timer.call
|
|
428
429
|
|
|
@@ -546,6 +547,8 @@ module Kettle
|
|
|
546
547
|
end
|
|
547
548
|
end
|
|
548
549
|
completed = passed.size + failed.size
|
|
550
|
+
remaining = workflows.reject { |candidate| passed[candidate] || failed[candidate] }
|
|
551
|
+
last_waiting_remaining = remaining
|
|
549
552
|
emit_ci_monitor_event(
|
|
550
553
|
event_recorder,
|
|
551
554
|
action: "github_tick",
|
|
@@ -555,12 +558,28 @@ module Kettle
|
|
|
555
558
|
run_status: run && run["status"],
|
|
556
559
|
conclusion: run && run["conclusion"],
|
|
557
560
|
completed_workflow: completed_workflow,
|
|
561
|
+
remaining: remaining,
|
|
558
562
|
completed: completed,
|
|
559
563
|
total: total,
|
|
560
564
|
started: started.size
|
|
561
565
|
)
|
|
562
566
|
end
|
|
563
567
|
break if completed == total
|
|
568
|
+
remaining = workflows.reject { |candidate| passed[candidate] || failed[candidate] }
|
|
569
|
+
if !remaining.empty? && remaining != last_waiting_remaining
|
|
570
|
+
last_waiting_remaining = remaining
|
|
571
|
+
emit_ci_monitor_event(
|
|
572
|
+
event_recorder,
|
|
573
|
+
action: "github_tick",
|
|
574
|
+
status: "started",
|
|
575
|
+
provider: "github",
|
|
576
|
+
workflow: remaining.first,
|
|
577
|
+
remaining: remaining,
|
|
578
|
+
completed: completed,
|
|
579
|
+
total: total,
|
|
580
|
+
started: started.size
|
|
581
|
+
)
|
|
582
|
+
end
|
|
564
583
|
if deadline && monotonic_time >= deadline
|
|
565
584
|
return handle_github_time_limit!(
|
|
566
585
|
workflows: workflows,
|
|
@@ -483,6 +483,7 @@ module Kettle
|
|
|
483
483
|
if run_step?(10) && !local_ci?
|
|
484
484
|
validate_release_lockfiles!(stage: "before CI monitoring")
|
|
485
485
|
monitor_workflows_after_push!
|
|
486
|
+
@ci_validated_head_sha = current_release_head_sha
|
|
486
487
|
end
|
|
487
488
|
|
|
488
489
|
# 11. merge feature into trunk and push
|
|
@@ -842,10 +843,13 @@ module Kettle
|
|
|
842
843
|
return if @release_lockfiles_normalized_before_publish
|
|
843
844
|
return if lockfile_reset.lockfile_paths.empty?
|
|
844
845
|
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
846
|
+
if release_lockfiles_already_validated_for_head?
|
|
847
|
+
validate_release_lockfiles!(stage: "before publish tasks")
|
|
848
|
+
else
|
|
849
|
+
reset_release_lockfiles!(stage: "before publish tasks")
|
|
850
|
+
validate_release_lockfiles!(stage: "before publish tasks")
|
|
851
|
+
revalidate_publish_lockfile_changes! unless changed_release_lockfile_paths.empty?
|
|
852
|
+
end
|
|
849
853
|
# Setup may already have cached task snapshots before a newer matching
|
|
850
854
|
# release became available. Build against the final canonical locks.
|
|
851
855
|
cleanup_release_task_lockfile!
|
|
@@ -853,6 +857,18 @@ module Kettle
|
|
|
853
857
|
@release_lockfiles_normalized_before_publish = true
|
|
854
858
|
end
|
|
855
859
|
|
|
860
|
+
def release_lockfiles_already_validated_for_head?
|
|
861
|
+
return false unless @ci_validated_head_sha && !@ci_validated_head_sha.empty?
|
|
862
|
+
return false unless current_release_head_sha == @ci_validated_head_sha
|
|
863
|
+
return false unless changed_release_lockfile_paths.empty?
|
|
864
|
+
|
|
865
|
+
lockfile_reset.lockfile_paths.none? { |path| lockfile_reset.normalization_needed?(path, strict: true) }
|
|
866
|
+
end
|
|
867
|
+
|
|
868
|
+
def current_release_head_sha
|
|
869
|
+
Kettle::Dev::CIHelpers.current_head_sha
|
|
870
|
+
end
|
|
871
|
+
|
|
856
872
|
def revalidate_publish_lockfile_changes!
|
|
857
873
|
# Release checkout topology: a family member publish runs in a
|
|
858
874
|
# detached worktree owned end-to-end by the family orchestrator (trunk
|
|
@@ -265,6 +265,8 @@ module Kettle
|
|
|
265
265
|
|
|
266
266
|
selected = nil
|
|
267
267
|
input_thread = nil
|
|
268
|
+
workers = []
|
|
269
|
+
stop_workers = false
|
|
268
270
|
read_input = proc do
|
|
269
271
|
begin
|
|
270
272
|
selected = Kettle::Dev::InputAdapter.gets&.strip
|
|
@@ -273,126 +275,139 @@ module Kettle
|
|
|
273
275
|
selected = :input_error
|
|
274
276
|
end
|
|
275
277
|
end
|
|
276
|
-
if tty
|
|
277
|
-
input_thread = Thread.new(&read_input) # rubocop:disable ThreadSafety/NewThread
|
|
278
|
-
else
|
|
279
|
-
read_input.call
|
|
280
|
-
end
|
|
281
278
|
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
279
|
+
begin
|
|
280
|
+
if tty
|
|
281
|
+
input_thread = Thread.new(&read_input) # rubocop:disable ThreadSafety/NewThread
|
|
282
|
+
else
|
|
283
|
+
read_input.call
|
|
284
|
+
end
|
|
285
285
|
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
begin
|
|
289
|
-
now = Process.clock_gettime(Process::CLOCK_MONOTONIC)
|
|
290
|
-
delay = 0.12 - (now - st_at)
|
|
291
|
-
sleep(delay) if delay && delay > 0
|
|
286
|
+
status_q = Queue.new
|
|
287
|
+
start_at = Process.clock_gettime(Process::CLOCK_MONOTONIC)
|
|
292
288
|
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
289
|
+
options.each do |code, file|
|
|
290
|
+
workers << Thread.new(code, file, owner, repo, branch, token, start_at) do |c, f, ow, rp, br, tk, st_at| # rubocop:disable ThreadSafety/NewThread
|
|
291
|
+
begin
|
|
292
|
+
now = Process.clock_gettime(Process::CLOCK_MONOTONIC)
|
|
293
|
+
delay = 0.12 - (now - st_at)
|
|
294
|
+
sleep(delay) if delay && delay > 0
|
|
295
|
+
Thread.exit if stop_workers
|
|
296
|
+
|
|
297
|
+
if ow.nil? || rp.nil? || br.nil?
|
|
298
|
+
status_q << [c, f, "n/a"]
|
|
299
|
+
Thread.exit
|
|
300
|
+
end
|
|
301
|
+
uri = URI("https://api.github.com/repos/#{ow}/#{rp}/actions/workflows/#{f}/runs?branch=#{URI.encode_www_form_component(br)}&per_page=1")
|
|
302
|
+
poll_interval = Integer(ENV["CI_ACT_POLL_INTERVAL"] || 5)
|
|
303
|
+
until stop_workers
|
|
304
|
+
begin
|
|
305
|
+
req = Net::HTTP::Get.new(uri)
|
|
306
|
+
req["User-Agent"] = "ci:act rake task"
|
|
307
|
+
req["Authorization"] = "token #{tk}" if tk && !tk.empty?
|
|
308
|
+
# Share the machine-wide GitHub API budget with release monitors.
|
|
309
|
+
Kettle::Dev::CIHelpers.github_rate_limit_wait!
|
|
310
|
+
break if stop_workers
|
|
311
|
+
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(req) }
|
|
312
|
+
break if stop_workers
|
|
313
|
+
if res.is_a?(Net::HTTPSuccess)
|
|
314
|
+
data = JSON.parse(res.body)
|
|
315
|
+
run = data["workflow_runs"]&.first
|
|
316
|
+
if run
|
|
317
|
+
st = run["status"]
|
|
318
|
+
con = run["conclusion"]
|
|
319
|
+
emoji = Kettle::Dev::CIMonitor.status_emoji(st, con)
|
|
320
|
+
details = [st, con].compact.join("/")
|
|
321
|
+
status_q << [c, f, "#{emoji} (#{details})"]
|
|
322
|
+
break if st == "completed"
|
|
323
|
+
else
|
|
324
|
+
status_q << [c, f, "none"]
|
|
325
|
+
break
|
|
326
|
+
end
|
|
317
327
|
else
|
|
318
|
-
status_q << [c, f, "
|
|
319
|
-
break
|
|
328
|
+
status_q << [c, f, "fail #{res.code}"]
|
|
320
329
|
end
|
|
321
|
-
|
|
322
|
-
|
|
330
|
+
rescue Exception => e # rubocop:disable Lint/RescueException
|
|
331
|
+
Kettle::Dev.debug_error(e, __method__)
|
|
332
|
+
# Catch all exceptions to prevent crashing the process from a worker thread
|
|
333
|
+
status_q << [c, f, "err"]
|
|
323
334
|
end
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
# Catch all exceptions to prevent crashing the process from a worker thread
|
|
327
|
-
status_q << [c, f, "err"]
|
|
335
|
+
break if stop_workers
|
|
336
|
+
sleep(poll_interval)
|
|
328
337
|
end
|
|
329
|
-
|
|
338
|
+
rescue Exception => e # rubocop:disable Lint/RescueException
|
|
339
|
+
Kettle::Dev.debug_error(e, __method__)
|
|
340
|
+
# simplecov:disable
|
|
341
|
+
# Catch all exceptions in the worker thread boundary, including SystemExit
|
|
342
|
+
status_q << [c, f, "err"]
|
|
343
|
+
# simplecov:enable
|
|
330
344
|
end
|
|
331
|
-
rescue Exception => e # rubocop:disable Lint/RescueException
|
|
332
|
-
Kettle::Dev.debug_error(e, __method__)
|
|
333
|
-
# simplecov:disable
|
|
334
|
-
# Catch all exceptions in the worker thread boundary, including SystemExit
|
|
335
|
-
status_q << [c, f, "err"]
|
|
336
|
-
# simplecov:enable
|
|
337
345
|
end
|
|
338
346
|
end
|
|
339
|
-
end
|
|
340
347
|
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
# In non-interactive environments (no TTY) and when not DEBUGGING, auto-quit after a short idle
|
|
344
|
-
auto_quit_deadline = if !tty && !Kettle::Dev::DEBUGGING
|
|
345
|
-
Process.clock_gettime(Process::CLOCK_MONOTONIC) + 1.0
|
|
346
|
-
end
|
|
348
|
+
statuses = Hash.new(placeholder)
|
|
347
349
|
|
|
348
|
-
|
|
349
|
-
if
|
|
350
|
-
|
|
350
|
+
# In non-interactive environments (no TTY) and when not DEBUGGING, auto-quit after a short idle
|
|
351
|
+
auto_quit_deadline = if !tty && !Kettle::Dev::DEBUGGING
|
|
352
|
+
Process.clock_gettime(Process::CLOCK_MONOTONIC) + 1.0
|
|
351
353
|
end
|
|
352
354
|
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
end
|
|
355
|
+
loop do
|
|
356
|
+
if selected
|
|
357
|
+
break
|
|
358
|
+
end
|
|
358
359
|
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
360
|
+
# Auto-quit if deadline passed without input (non-interactive runs)
|
|
361
|
+
if auto_quit_deadline && Process.clock_gettime(Process::CLOCK_MONOTONIC) >= auto_quit_deadline
|
|
362
|
+
selected = "q"
|
|
363
|
+
break
|
|
364
|
+
end
|
|
362
365
|
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
366
|
+
begin
|
|
367
|
+
code, file_name, display = status_q.pop(true)
|
|
368
|
+
statuses[code] = display
|
|
369
|
+
|
|
370
|
+
if tty
|
|
371
|
+
idx = idx_by_code[code]
|
|
372
|
+
if idx.nil?
|
|
373
|
+
puts "status #{code}: #{display}"
|
|
374
|
+
print(prompt)
|
|
375
|
+
else
|
|
376
|
+
move_up = options_with_quit.size - idx + 1
|
|
377
|
+
$stdout.print("\e[#{move_up}A\r\e[2K")
|
|
378
|
+
disp = (code == quit_code) ? code : display_code_for[code]
|
|
379
|
+
$stdout.print(format("%2d) %-3s => %-20s %s\n", idx + 1, disp, file_name, display))
|
|
380
|
+
$stdout.print("\e[#{move_up - 1}B\r")
|
|
381
|
+
$stdout.print(prompt)
|
|
382
|
+
end
|
|
383
|
+
$stdout.flush
|
|
368
384
|
else
|
|
369
|
-
|
|
370
|
-
$stdout.print("\e[#{move_up}A\r\e[2K")
|
|
371
|
-
disp = (code == quit_code) ? code : display_code_for[code]
|
|
372
|
-
$stdout.print(format("%2d) %-3s => %-20s %s\n", idx + 1, disp, file_name, display))
|
|
373
|
-
$stdout.print("\e[#{move_up - 1}B\r")
|
|
374
|
-
$stdout.print(prompt)
|
|
385
|
+
puts "status #{code}: #{display}"
|
|
375
386
|
end
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
387
|
+
rescue ThreadError
|
|
388
|
+
# ThreadError is raised when the queue is empty,
|
|
389
|
+
# and it needs to be silent to maintain the output row alignment
|
|
390
|
+
sleep(0.05)
|
|
379
391
|
end
|
|
380
|
-
rescue ThreadError
|
|
381
|
-
# ThreadError is raised when the queue is empty,
|
|
382
|
-
# and it needs to be silent to maintain the output row alignment
|
|
383
|
-
sleep(0.05)
|
|
384
392
|
end
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
393
|
+
ensure
|
|
394
|
+
stop_workers = true
|
|
395
|
+
workers.each do |t|
|
|
396
|
+
begin
|
|
397
|
+
t.kill if t&.alive?
|
|
398
|
+
rescue => e
|
|
399
|
+
Kettle::Dev.debug_error(e, __method__)
|
|
400
|
+
end
|
|
401
|
+
t&.join(0.5)
|
|
402
|
+
end
|
|
403
|
+
if input_thread
|
|
404
|
+
begin
|
|
405
|
+
input_thread.kill if input_thread.alive?
|
|
406
|
+
rescue => e
|
|
407
|
+
Kettle::Dev.debug_error(e, __method__)
|
|
408
|
+
end
|
|
409
|
+
input_thread.join(0.5)
|
|
410
|
+
end
|
|
396
411
|
end
|
|
397
412
|
|
|
398
413
|
input = (selected == :input_error) ? nil : selected
|
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.1.
|
|
8
|
+
VERSION = "3.1.43"
|
|
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.1.
|
|
4
|
+
version: 3.1.43
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Peter H. Boling
|
|
@@ -88,7 +88,7 @@ dependencies:
|
|
|
88
88
|
-
|
|
89
89
|
- ">="
|
|
90
90
|
- !ruby/object:Gem::Version
|
|
91
|
-
version: 0.1.
|
|
91
|
+
version: 0.1.28
|
|
92
92
|
type: :runtime
|
|
93
93
|
prerelease: false
|
|
94
94
|
version_requirements: !ruby/object:Gem::Requirement
|
|
@@ -100,7 +100,7 @@ dependencies:
|
|
|
100
100
|
-
|
|
101
101
|
- ">="
|
|
102
102
|
- !ruby/object:Gem::Version
|
|
103
|
-
version: 0.1.
|
|
103
|
+
version: 0.1.28
|
|
104
104
|
- !ruby/object:Gem::Dependency
|
|
105
105
|
name: kettle-rb
|
|
106
106
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -112,7 +112,7 @@ dependencies:
|
|
|
112
112
|
-
|
|
113
113
|
- ">="
|
|
114
114
|
- !ruby/object:Gem::Version
|
|
115
|
-
version: 0.1.
|
|
115
|
+
version: 0.1.25
|
|
116
116
|
type: :runtime
|
|
117
117
|
prerelease: false
|
|
118
118
|
version_requirements: !ruby/object:Gem::Requirement
|
|
@@ -124,7 +124,7 @@ dependencies:
|
|
|
124
124
|
-
|
|
125
125
|
- ">="
|
|
126
126
|
- !ruby/object:Gem::Version
|
|
127
|
-
version: 0.1.
|
|
127
|
+
version: 0.1.25
|
|
128
128
|
- !ruby/object:Gem::Dependency
|
|
129
129
|
name: kettle-test
|
|
130
130
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -479,10 +479,10 @@ licenses:
|
|
|
479
479
|
- AGPL-3.0-only
|
|
480
480
|
metadata:
|
|
481
481
|
homepage_uri: "https://kettle-dev.galtzo.com"
|
|
482
|
-
source_code_uri: "https://github.com/kettle-dev/kettle-dev/tree/v3.1.
|
|
483
|
-
changelog_uri: "https://github.com/kettle-dev/kettle-dev/blob/v3.1.
|
|
482
|
+
source_code_uri: "https://github.com/kettle-dev/kettle-dev/tree/v3.1.43"
|
|
483
|
+
changelog_uri: "https://github.com/kettle-dev/kettle-dev/blob/v3.1.43/CHANGELOG.md"
|
|
484
484
|
bug_tracker_uri: "https://github.com/kettle-dev/kettle-dev/issues"
|
|
485
|
-
documentation_uri: "https://www.rubydoc.info/gems/kettle-dev/3.1.
|
|
485
|
+
documentation_uri: "https://www.rubydoc.info/gems/kettle-dev/3.1.43"
|
|
486
486
|
funding_uri: "https://github.com/sponsors/pboling"
|
|
487
487
|
wiki_uri: "https://github.com/kettle-dev/kettle-dev/wiki"
|
|
488
488
|
news_uri: "https://www.railsbling.com/tags/kettle-dev"
|
metadata.gz.sig
CHANGED
|
Binary file
|