ci-queue 0.26.0 → 0.27.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: d569e8651a9452805cbd117a0cd9b9b152b3c395b91603912e69b1f80a322ee2
4
- data.tar.gz: 386ec9757bd17171ed5a1736ace13d227ded04446b63b2d13de4e3f11be5d260
3
+ metadata.gz: 87d167da0bbe9a7b2eceb992452c71f0fa2ab54c5da53232a5aecbe26426ae8f
4
+ data.tar.gz: f5130f7ed97545937b5964a92fb107eb462c10eba31fac8d164619ed2351b381
5
5
  SHA512:
6
- metadata.gz: 65da7243fd3c0a952e0a108dd105a5e821a534851724e0f87db4a0fec445b5c262f446e26cfb889cfb22e972bb57edd9ef61697e369a5a824fa783951bb89f06
7
- data.tar.gz: 005b27f150a183512caf96fcd3b19a4a0a1ca3b4ba21713af191d5472e84d224fb6bd7d19e2e16cbd5cb4d4078850bce3d5de24ce7c23ee035e947e36f1b3899
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.26.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
@@ -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.26.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-15 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