ci-queue 0.25.0 → 0.27.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 29c565ade103a1aef45ca63d5d7816b2dbdd35be089579e62427055fed308e38
4
- data.tar.gz: 1e2213ea626d804837325204b86a3d2c4461992744ace2b303a90c8f845c2316
3
+ metadata.gz: 87d167da0bbe9a7b2eceb992452c71f0fa2ab54c5da53232a5aecbe26426ae8f
4
+ data.tar.gz: f5130f7ed97545937b5964a92fb107eb462c10eba31fac8d164619ed2351b381
5
5
  SHA512:
6
- metadata.gz: 366a2974af0e172b4ad56a15dd1e0496b981fa222cbaafaae8d3d241c816ebfb966902d0a73799c467f1dd8f26b9c832327ac2b9b0ad540d7faec56aa24c28dc
7
- data.tar.gz: d4ab5a210774f32318998801d91aaeddb0100db7f44f5cad8898bc06c6ea7ed41f5ff9e474dabeea77812204181be331242c68ba1ecaa0fe136165ed37e53764
6
+ metadata.gz: 6304f21d394e7e67f8715d891d77673db0bcd5e0ff6742ec5324b3341982678edb3b7533815cad10ca9aa791f1ee6a84305b9e4390072034a7179a4bf3bece8e
7
+ data.tar.gz: e49255e12db5ce36f3c1d76376488dd7597b171a4c124b8de7b8c828412be8ffb15e226d16b5b87574eb4631007b3dc868062ec5a8144b5519c1c2beda79cbce
data/dev.yml CHANGED
@@ -8,4 +8,4 @@ up:
8
8
  - isogun
9
9
 
10
10
  commands:
11
- test: REDIS_HOST=ci-queue.railgun bundle exec rake test
11
+ test: REDIS_URL=${REDIS_URL:-redis://ci-queue.railgun/0} bundle exec rake test
@@ -7,6 +7,10 @@ module CI
7
7
  # to override in classes including this module
8
8
  CONNECTION_ERRORS = [].freeze
9
9
 
10
+ def distributed?
11
+ raise NotImplementedError
12
+ end
13
+
10
14
  def retrying?
11
15
  false
12
16
  end
@@ -21,6 +21,10 @@ module CI
21
21
  super(redis, config)
22
22
  end
23
23
 
24
+ def distributed?
25
+ true
26
+ end
27
+
24
28
  def populate(tests, random: Random.new)
25
29
  @index = tests.map { |t| [t.id, t] }.to_h
26
30
  tests = Queue.shuffle(tests, random)
@@ -22,6 +22,10 @@ module CI
22
22
  @total = tests.size
23
23
  end
24
24
 
25
+ def distributed?
26
+ false
27
+ end
28
+
25
29
  def build
26
30
  @build ||= BuildRecord.new(self)
27
31
  end
@@ -2,7 +2,7 @@
2
2
 
3
3
  module CI
4
4
  module Queue
5
- VERSION = '0.25.0'
5
+ VERSION = '0.27.0'
6
6
  DEV_SCRIPTS_ROOT = ::File.expand_path('../../../../../redis', __FILE__)
7
7
  RELEASE_SCRIPTS_ROOT = ::File.expand_path('../redis', __FILE__)
8
8
  end
@@ -199,7 +199,7 @@ module Minitest
199
199
  msg = "#{supervisor.size} tests weren't run."
200
200
  if supervisor.max_test_failed?
201
201
  puts('Encountered too many failed tests. Test run was ended early.')
202
- puts(msg)
202
+ abort!(msg)
203
203
  else
204
204
  abort!(msg)
205
205
  end
@@ -253,8 +253,10 @@ module Minitest
253
253
  attr_accessor :queue, :queue_url, :grind_list, :grind_count, :load_paths
254
254
 
255
255
  def require_worker_id!
256
- invalid_usage!("build-id couldn't be inferred from ENV and wasn't set via --build") unless queue_config.build_id
257
- invalid_usage!("worker-id couldn't be inferred from ENV and wasn't set via --worker") unless queue_config.worker_id
256
+ if queue.distributed?
257
+ invalid_usage!("build-id couldn't be inferred from ENV and wasn't set via --build") unless queue_config.build_id
258
+ invalid_usage!("worker-id couldn't be inferred from ENV and wasn't set via --worker") unless queue_config.worker_id
259
+ end
258
260
  end
259
261
 
260
262
  def display_warnings(build)
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.25.0
4
+ version: 0.27.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-03-10 00:00:00.000000000 Z
11
+ date: 2023-05-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.3.3
242
+ rubygems_version: 3.4.12
243
243
  signing_key:
244
244
  specification_version: 4
245
245
  summary: Distribute tests over many workers using a queue