ci-queue 0.101.0 → 0.103.0
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/Gemfile.lock +1 -1
- data/lib/ci/queue/version.rb +1 -1
- data/lib/minitest/queue/runner.rb +26 -4
- 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: 1a24e0e7c59b26262d59f97421542552b81673905d038ee4837fc44089d8afa5
|
|
4
|
+
data.tar.gz: 4cd6ce3732169a49fa31827b78c34b65cf1ade9d5b4fd34cc482e5ea58b5a62e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: de7c8c8424d801685d67a7ea723edff6269f52e6d57a54f48d88cbaccb394d2ce53e84a2434b36852f635396b1241f25c9bb15b4199f13bf4c25c9b680cabd8f
|
|
7
|
+
data.tar.gz: 58d984a94ce049dccaf0ccb48b6602f208dc4e0bff39a3502b9b83010450c2443fdfeaebbd33ceb332c75594f6243fbde98c75f63d1a36551e44347e2b790a9c
|
data/Gemfile.lock
CHANGED
data/lib/ci/queue/version.rb
CHANGED
|
@@ -103,6 +103,7 @@ module Minitest
|
|
|
103
103
|
trap('TERM') { Minitest.queue.shutdown! }
|
|
104
104
|
trap('INT') { Minitest.queue.shutdown! }
|
|
105
105
|
|
|
106
|
+
queue_prepared = false
|
|
106
107
|
if queue.rescue_connection_errors { queue.exhausted? }
|
|
107
108
|
puts green('All tests were ran already')
|
|
108
109
|
else
|
|
@@ -117,9 +118,11 @@ module Minitest
|
|
|
117
118
|
puts green("Queue almost empty, exiting early...")
|
|
118
119
|
else
|
|
119
120
|
prepare_queue_for_execution
|
|
121
|
+
queue_prepared = true
|
|
120
122
|
end
|
|
121
123
|
else
|
|
122
124
|
prepare_queue_for_execution
|
|
125
|
+
queue_prepared = true
|
|
123
126
|
end
|
|
124
127
|
end
|
|
125
128
|
|
|
@@ -132,8 +135,13 @@ module Minitest
|
|
|
132
135
|
# Re-check exhausted? after booting: slow workers may arrive after the queue
|
|
133
136
|
# has been fully drained by faster workers. In that case exit cleanly (0)
|
|
134
137
|
# rather than letting Minitest return false for a 0-test run.
|
|
135
|
-
|
|
136
|
-
|
|
138
|
+
#
|
|
139
|
+
# Also exit when the queue wasn't prepared above, because it was exhausted
|
|
140
|
+
# or a retried worker found it almost empty. No tests were loaded and the
|
|
141
|
+
# queue can't resolve entries, so the first test this worker reserved would
|
|
142
|
+
# crash it.
|
|
143
|
+
if !queue_prepared || queue.rescue_connection_errors { queue.exhausted? }
|
|
144
|
+
puts green('All tests were ran already') if queue_prepared
|
|
137
145
|
verify_reporters!(reporters)
|
|
138
146
|
exit!(0)
|
|
139
147
|
end
|
|
@@ -304,7 +312,11 @@ module Minitest
|
|
|
304
312
|
step("Waiting for workers to complete")
|
|
305
313
|
|
|
306
314
|
unless supervisor.wait_for_workers { display_warnings(supervisor.build) }
|
|
307
|
-
|
|
315
|
+
# A lazy-load leader only marks the queue as initialized once it has
|
|
316
|
+
# streamed every test, but workers start on the first batch, so the wait
|
|
317
|
+
# can end (e.g. on --max-test-failed) while it is still streaming.
|
|
318
|
+
# Check streaming? first: the status only moves from streaming to ready.
|
|
319
|
+
unless supervisor.streaming? || supervisor.queue_initialized?
|
|
308
320
|
abort! "No leader was elected. This typically means no worker was able to start. Were there any errors during application boot?", 40
|
|
309
321
|
end
|
|
310
322
|
|
|
@@ -314,7 +326,7 @@ module Minitest
|
|
|
314
326
|
reporter.write_failure_file(queue_config.failure_file) if queue_config.failure_file
|
|
315
327
|
reporter.write_flaky_tests_file(queue_config.export_flaky_tests_file) if queue_config.export_flaky_tests_file
|
|
316
328
|
|
|
317
|
-
abort!(
|
|
329
|
+
abort!(unrun_tests_message(supervisor), exit_code)
|
|
318
330
|
end
|
|
319
331
|
end
|
|
320
332
|
|
|
@@ -447,6 +459,16 @@ module Minitest
|
|
|
447
459
|
Minitest::Queue::WorkerProfileReporter.new(supervisor).print_summary
|
|
448
460
|
end
|
|
449
461
|
|
|
462
|
+
def unrun_tests_message(supervisor)
|
|
463
|
+
# Read the status before the size: tests a streaming leader hasn't pushed
|
|
464
|
+
# yet aren't in the queue, so the size is only a lower bound.
|
|
465
|
+
if supervisor.streaming?
|
|
466
|
+
"At least #{supervisor.size} tests weren't run (the leader hadn't finished streaming tests to the queue)."
|
|
467
|
+
else
|
|
468
|
+
"#{supervisor.size} tests weren't run."
|
|
469
|
+
end
|
|
470
|
+
end
|
|
471
|
+
|
|
450
472
|
def parser
|
|
451
473
|
@parser ||= OptionParser.new do |opts|
|
|
452
474
|
opts.banner = "Usage: minitest-queue [options] COMMAND [ARGS]"
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: ci-queue
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.103.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Jean Boussier
|
|
@@ -319,7 +319,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
319
319
|
- !ruby/object:Gem::Version
|
|
320
320
|
version: '0'
|
|
321
321
|
requirements: []
|
|
322
|
-
rubygems_version: 4.0.
|
|
322
|
+
rubygems_version: 4.0.22
|
|
323
323
|
specification_version: 4
|
|
324
324
|
summary: Distribute tests over many workers using a queue
|
|
325
325
|
test_files: []
|