ci-queue 0.55.0 → 0.57.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a4c15b3d93bd34da203ba0646f7ac9a55bc81062cb173554c4aeb8ce2fbffde4
4
- data.tar.gz: 805a374332f9351520e018449fcda5dfd574228879ce7efb8d4f6210e0893bdb
3
+ metadata.gz: f7d14c6d18d859390f4213fd8d9c6d0a94578439ae8d8ca499584d382992bca8
4
+ data.tar.gz: 433999764455024fe84cf5758434a706415e612afe1a2460a1235fb3fc5e41d3
5
5
  SHA512:
6
- metadata.gz: f3676d0f75d1e9419d1c5b556574d6e4759b4cdd6694f208683dfc805f0baf8f3348e32630d5f020d59d5ac9c6db6163a41a775112d38f47989bc497ab775a56
7
- data.tar.gz: efa3123ec814cd8a51d22a60f59e05f74c4ec18e99c5203c5e846df8b7d168dfcc4846632c21d9e695f6948670980a447f18f688001fde1e4254236af23e1b9c
6
+ metadata.gz: ed7e6c1547cbf90a00b3b80e8229dc13ba8803453de9d6af291a51add17023ddf1745c0a96ff424737e08d6bffd6cbd51e5c9e60c3acfb0263d01c03c60083a7
7
+ data.tar.gz: 5519db14c36093f0f4c0b5109764c3a4029f411a4b73436047ebae9fd1be7c0559ceea48a7f48cf8de4ea372ab0c3a0269cb250f05aeff28f501f252aeddc379
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ci-queue (0.55.0)
4
+ ci-queue (0.57.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -36,6 +36,14 @@ module CI
36
36
  stat_names.each { |s| stats.delete(s) }
37
37
  end
38
38
 
39
+ def report_worker_error(_); end
40
+
41
+ def reset_worker_error; end
42
+
43
+ def worker_errors
44
+ {}
45
+ end
46
+
39
47
  private
40
48
 
41
49
  attr_reader :stats
@@ -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)
@@ -58,6 +58,8 @@ module CI
58
58
 
59
59
  def stop_heartbeat!; end
60
60
 
61
+ def report_worker_error(error); end
62
+
61
63
  def created_at=(timestamp)
62
64
  @created_at ||= timestamp
63
65
  end
@@ -2,7 +2,7 @@
2
2
 
3
3
  module CI
4
4
  module Queue
5
- VERSION = '0.55.0'
5
+ VERSION = '0.57.0'
6
6
  DEV_SCRIPTS_ROOT = ::File.expand_path('../../../../../redis', __FILE__)
7
7
  RELEASE_SCRIPTS_ROOT = ::File.expand_path('../redis', __FILE__)
8
8
  end
@@ -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(*)
@@ -345,6 +345,7 @@ module Minitest
345
345
 
346
346
  def reset_counters
347
347
  queue.build.reset_stats(BuildStatusRecorder::COUNTERS)
348
+ queue.build.reset_worker_error
348
349
  end
349
350
 
350
351
  def populate_queue
@@ -268,8 +268,12 @@ module Minitest
268
268
  exit!(41)
269
269
  rescue => error
270
270
  reopen_previous_step
271
+ queue.report_worker_error(error)
271
272
  puts red("This worker exited because of an uncaught application error:")
272
273
  puts red("#{error.class}: #{error.message}")
274
+ error.backtrace.each do |frame|
275
+ puts red(frame)
276
+ end
273
277
  exit!(42)
274
278
  end
275
279
  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.55.0
4
+ version: 0.57.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-06-10 00:00:00.000000000 Z
11
+ date: 2024-08-05 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.11
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: []