ci-queue 0.40.0 → 0.41.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/dev.yml +1 -1
- data/lib/ci/queue/redis/base.rb +10 -6
- data/lib/ci/queue/redis.rb +0 -1
- data/lib/ci/queue/version.rb +1 -1
- data/lib/minitest/queue/runner.rb +4 -9
- data/lib/minitest/queue.rb +4 -7
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 23effff409f076f80b7af3728d46a4122a59ca1a5a4c3bd1de5162250d60e72f
|
4
|
+
data.tar.gz: ae3c402de5003a6acb3ad002305b85c092ae76d4850634892cab935e03d4479b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0601ef053acbb457931feec6428c627cdc1ef3d8d3e76cdd54a98f02ef6f8f6f531a38be13dc3c40d2800ca0e9efe00c91c21a569470887978e8ba997880933a
|
7
|
+
data.tar.gz: c95d7058762b67a059c4868b1d69a8fd99d5f6098d70fa08d71ec7533f7674b8c0886d1090c41db0ba200273b0cbb1c5fbb0fc12ecadddab04f2fb6a9ec950f3
|
data/dev.yml
CHANGED
data/lib/ci/queue/redis/base.rb
CHANGED
@@ -13,12 +13,16 @@ module CI
|
|
13
13
|
|
14
14
|
def initialize(redis_url, config)
|
15
15
|
@redis_url = redis_url
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
16
|
+
if ::Redis::VERSION > "5.0.0"
|
17
|
+
@redis = ::Redis.new(
|
18
|
+
url: redis_url,
|
19
|
+
# Booting a CI worker is costly, so in case of a Redis blip,
|
20
|
+
# it makes sense to retry for a while before giving up.
|
21
|
+
reconnect_attempts: [0, 0, 0.1, 0.5, 1, 3, 5],
|
22
|
+
)
|
23
|
+
else
|
24
|
+
@redis = ::Redis.new(url: redis_url)
|
25
|
+
end
|
22
26
|
@config = config
|
23
27
|
end
|
24
28
|
|
data/lib/ci/queue/redis.rb
CHANGED
data/lib/ci/queue/version.rb
CHANGED
@@ -227,11 +227,11 @@ module Minitest
|
|
227
227
|
end
|
228
228
|
|
229
229
|
unless supervisor.exhausted?
|
230
|
+
reporter = BuildStatusReporter.new(build: supervisor.build)
|
231
|
+
reporter.report
|
230
232
|
msg = "#{supervisor.size} tests weren't run."
|
231
233
|
if supervisor.max_test_failed?
|
232
234
|
puts('Encountered too many failed tests. Test run was ended early.')
|
233
|
-
reporter = BuildStatusReporter.new(build: supervisor.build)
|
234
|
-
reporter.report
|
235
235
|
abort!(msg)
|
236
236
|
else
|
237
237
|
abort!(msg)
|
@@ -301,14 +301,9 @@ module Minitest
|
|
301
301
|
return unless queue_config.warnings_file
|
302
302
|
|
303
303
|
warnings = build.pop_warnings.map do |type, attributes|
|
304
|
-
|
305
|
-
when CI::Queue::Warnings::RESERVED_LOST_TEST
|
306
|
-
"[WARNING] #{attributes[:test]} was picked up by another worker because it didn't complete in the allocated #{attributes[:timeout]} seconds.\n" \
|
307
|
-
"You may want to either optimize this test or bump ci-queue timeout.\n" \
|
308
|
-
"It's also possible that the worker that was processing it was terminated without being able to report back.\n"
|
309
|
-
end
|
304
|
+
attributes.merge(type: type)
|
310
305
|
end.compact
|
311
|
-
File.write(queue_config.warnings_file, warnings.
|
306
|
+
File.write(queue_config.warnings_file, warnings.to_json)
|
312
307
|
end
|
313
308
|
|
314
309
|
def run_tests_in_fork(queue)
|
data/lib/minitest/queue.rb
CHANGED
@@ -244,20 +244,17 @@ module Minitest
|
|
244
244
|
queue.report_success!
|
245
245
|
end
|
246
246
|
|
247
|
-
requeued = false
|
248
247
|
if failed && CI::Queue.requeueable?(result) && queue.requeue(example)
|
249
|
-
requeued = true
|
250
248
|
result.requeue!
|
251
249
|
reporter.record(result)
|
252
|
-
elsif queue.acknowledge(example)
|
250
|
+
elsif queue.acknowledge(example)
|
251
|
+
reporter.record(result)
|
252
|
+
queue.increment_test_failed if failed
|
253
|
+
elsif !failed
|
253
254
|
# If the test was already acknowledged by another worker (we timed out)
|
254
255
|
# Then we only record it if it is successful.
|
255
256
|
reporter.record(result)
|
256
257
|
end
|
257
|
-
|
258
|
-
if !requeued && failed
|
259
|
-
queue.increment_test_failed
|
260
|
-
end
|
261
258
|
end
|
262
259
|
end
|
263
260
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ci-queue
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.41.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jean Boussier
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-01-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -239,7 +239,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
239
239
|
- !ruby/object:Gem::Version
|
240
240
|
version: '0'
|
241
241
|
requirements: []
|
242
|
-
rubygems_version: 3.4
|
242
|
+
rubygems_version: 3.5.4
|
243
243
|
signing_key:
|
244
244
|
specification_version: 4
|
245
245
|
summary: Distribute tests over many workers using a queue
|