ci-queue 0.33.0 → 0.35.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: bd7d0b468f0b411c8adc1a2803ed277a485b8e37b85b954fae3bb18ae2c3be2f
4
- data.tar.gz: afc3927215a99f3e874cac77d2c89e6ed2f97e86eabf9d3890b42f8e652a5746
3
+ metadata.gz: 808a26c7002b41c217b692070da88f5a10704712f226d0ddb73d6b0478ea3ffc
4
+ data.tar.gz: 5feede91a5b47c6e053bb2a9b193872cc9b26e19e57cb01099d171d73a169c5c
5
5
  SHA512:
6
- metadata.gz: 5ef912355c5eb0441f91b1db2386f54d62641187ac518701ead368fb1d013b3ae2a1dadcbce75428caa8dbb9456c8db2fb7d90cefccebd685eebbd565b130af9
7
- data.tar.gz: 0b48cb5f122f5784c840d8c172804c105a4bd70909853e83b1a1b75a6a7719aecf07bb381d48b56fe186b45f0a10fd556c5becc8db4b7fe8447552d878262bb6
6
+ metadata.gz: 192db2ab88e15d9dc55a9c605f79f8816cc1da7435a1643392bf14083ea2798daec844d60b3c8a558b4aefd68a8ba7cf9e1e808efdd7b33892f0f2638fe3fbc2
7
+ data.tar.gz: f98ebcc43a4751668f47406c7da9c2919ffa263515c1a14d9878b81b5d5025a3ca844e014bb364f2d74667b706297c45ad882655e36253b7f0663c0e7993336c
@@ -20,6 +20,11 @@ module CI
20
20
  @config = config
21
21
  @progress = 0
22
22
  @total = tests.size
23
+ @shutdown = false
24
+ end
25
+
26
+ def shutdown!
27
+ @shutdown = true
23
28
  end
24
29
 
25
30
  def distributed?
@@ -64,7 +69,7 @@ module CI
64
69
  end
65
70
 
66
71
  def poll
67
- while config.circuit_breakers.none?(&:open?) && !max_test_failed? && test = @queue.shift
72
+ while !@shutdown && config.circuit_breakers.none?(&:open?) && !max_test_failed? && test = @queue.shift
68
73
  yield index.fetch(test)
69
74
  end
70
75
  end
@@ -2,7 +2,7 @@
2
2
 
3
3
  module CI
4
4
  module Queue
5
- VERSION = '0.33.0'
5
+ VERSION = '0.35.0'
6
6
  DEV_SCRIPTS_ROOT = ::File.expand_path('../../../../../redis', __FILE__)
7
7
  RELEASE_SCRIPTS_ROOT = ::File.expand_path('../redis', __FILE__)
8
8
  end
data/lib/ci/queue.rb CHANGED
@@ -43,7 +43,7 @@ module CI
43
43
  Static
44
44
  when 'file', nil
45
45
  File
46
- when 'redis'
46
+ when 'redis', 'rediss'
47
47
  require 'ci/queue/redis'
48
48
  Redis
49
49
  else
@@ -223,7 +223,7 @@ module Minitest
223
223
 
224
224
  unless supervisor.wait_for_workers { display_warnings(supervisor.build) }
225
225
  unless supervisor.queue_initialized?
226
- abort! "No master was elected. Did all workers crash?"
226
+ abort! "No master was elected. Did all workers crash?", 40
227
227
  end
228
228
 
229
229
  unless supervisor.exhausted?
@@ -623,10 +623,10 @@ module Minitest
623
623
  super
624
624
  end
625
625
 
626
- def abort!(message)
626
+ def abort!(message, exit_status=1)
627
627
  reopen_previous_step
628
628
  puts red(message)
629
- exit! 1 # exit! is required to avoid minitest at_exit callback
629
+ exit! exit_status # exit! is required to avoid minitest at_exit callback
630
630
  end
631
631
 
632
632
  def retry?
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.33.0
4
+ version: 0.35.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: 2023-07-27 00:00:00.000000000 Z
11
+ date: 2023-10-03 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.16
242
+ rubygems_version: 3.4.20
243
243
  signing_key:
244
244
  specification_version: 4
245
245
  summary: Distribute tests over many workers using a queue