ci-queue 0.54.0 → 0.56.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/ci/queue/build_record.rb +8 -0
- data/lib/ci/queue/redis/build_record.rb +15 -0
- data/lib/ci/queue/redis/worker.rb +4 -0
- data/lib/ci/queue/version.rb +1 -1
- data/lib/minitest/queue/build_status_reporter.rb +8 -1
- data/lib/minitest/queue/runner.rb +1 -0
- data/lib/minitest/queue.rb +9 -0
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e463afd14fdd0af687967316891f41c3f6e8f227eeb4924b12448ce91749cf74
|
4
|
+
data.tar.gz: db803750f16b9a10ee3c5498b4c1eaa5df768247d39d7efa2abc3ae15a6efc00
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b99390737597eb6c3eb2faadff1dbb64b9dcd03b9a9906ed287350e35b164f60ea913e29227ebead7ebc98e10a088e394ae23051ed3c240d8c7b97b6bcb77cee
|
7
|
+
data.tar.gz: 6382ff6e7c0a486de687268b259046616c8299990b426255a415142e247991c38b7271cb31b4de0ded5dfe9ed12e20480fe7514a16542372a96e9ca6a650f7d4
|
data/Gemfile.lock
CHANGED
@@ -17,6 +17,21 @@ module CI
|
|
17
17
|
@queue.exhausted?
|
18
18
|
end
|
19
19
|
|
20
|
+
def report_worker_error(error)
|
21
|
+
redis.pipelined do |pipeline|
|
22
|
+
pipeline.hset(key('worker-errors'), config.worker_id, error.message)
|
23
|
+
pipeline.expire(key('worker-errors'), config.redis_ttl)
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
def worker_errors
|
28
|
+
redis.hgetall(key('worker-errors'))
|
29
|
+
end
|
30
|
+
|
31
|
+
def reset_worker_error
|
32
|
+
redis.hdel(key('worker-errors'), config.worker_id)
|
33
|
+
end
|
34
|
+
|
20
35
|
def failed_tests
|
21
36
|
redis.hkeys(key('error-reports'))
|
22
37
|
end
|
@@ -95,6 +95,10 @@ module CI
|
|
95
95
|
@build ||= CI::Queue::Redis::BuildRecord.new(self, redis, config)
|
96
96
|
end
|
97
97
|
|
98
|
+
def report_worker_error(error)
|
99
|
+
build.report_worker_error(error)
|
100
|
+
end
|
101
|
+
|
98
102
|
def acknowledge(test)
|
99
103
|
test_key = test.id
|
100
104
|
raise_on_mismatching_test(test_key)
|
data/lib/ci/queue/version.rb
CHANGED
@@ -36,11 +36,18 @@ module Minitest
|
|
36
36
|
puts ""
|
37
37
|
end
|
38
38
|
|
39
|
+
build.worker_errors.to_a.sort.each do |worker_id, error|
|
40
|
+
puts yellow("Worker #{worker_id } crashed")
|
41
|
+
puts error
|
42
|
+
puts ""
|
43
|
+
end
|
44
|
+
|
39
45
|
errors.empty?
|
40
46
|
end
|
41
47
|
|
42
48
|
def success?
|
43
|
-
build.error_reports.empty?
|
49
|
+
build.error_reports.empty? &&
|
50
|
+
build.worker_errors.empty?
|
44
51
|
end
|
45
52
|
|
46
53
|
def record(*)
|
data/lib/minitest/queue.rb
CHANGED
@@ -266,6 +266,15 @@ module Minitest
|
|
266
266
|
reopen_previous_step
|
267
267
|
puts red("The heartbeat process died. This worker is exiting early.")
|
268
268
|
exit!(41)
|
269
|
+
rescue => error
|
270
|
+
reopen_previous_step
|
271
|
+
queue.report_worker_error(error)
|
272
|
+
puts red("This worker exited because of an uncaught application error:")
|
273
|
+
puts red("#{error.class}: #{error.message}")
|
274
|
+
error.backtrace.each do |frame|
|
275
|
+
puts red(frame)
|
276
|
+
end
|
277
|
+
exit!(42)
|
269
278
|
end
|
270
279
|
end
|
271
280
|
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.56.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jean Boussier
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-07-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -227,7 +227,7 @@ licenses:
|
|
227
227
|
- MIT
|
228
228
|
metadata:
|
229
229
|
allowed_push_host: https://rubygems.org
|
230
|
-
post_install_message:
|
230
|
+
post_install_message:
|
231
231
|
rdoc_options: []
|
232
232
|
require_paths:
|
233
233
|
- lib
|
@@ -242,8 +242,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
242
242
|
- !ruby/object:Gem::Version
|
243
243
|
version: '0'
|
244
244
|
requirements: []
|
245
|
-
rubygems_version: 3.5.
|
246
|
-
signing_key:
|
245
|
+
rubygems_version: 3.5.16
|
246
|
+
signing_key:
|
247
247
|
specification_version: 4
|
248
248
|
summary: Distribute tests over many workers using a queue
|
249
249
|
test_files: []
|