ci-queue 0.24.3 → 0.26.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: a614cb41ca3fcd17f6ca2fd058767f5d302e474c38c67ab968d02f97f5e78f2e
4
- data.tar.gz: e1227e42fea0c08e40e262ada624f3b62af4c443915572da896a9acc2396108b
3
+ metadata.gz: d569e8651a9452805cbd117a0cd9b9b152b3c395b91603912e69b1f80a322ee2
4
+ data.tar.gz: 386ec9757bd17171ed5a1736ace13d227ded04446b63b2d13de4e3f11be5d260
5
5
  SHA512:
6
- metadata.gz: b6e3aad6d6388194baacef1e570c854e34c062d105870931419f7303d2a42dafb43663a88b93c0af690bb834c276ab8a3a3820158d2e76f4f122f1ff9beb0d62
7
- data.tar.gz: 625d171988b41fbcaa2c346ef6c6d2a0602f94967ae1b41bc38644b29ed4bf51fdeda172d30440ecff2e5b8b3746b5d25878d60bbd1b8981571214766ee09e72
6
+ metadata.gz: 65da7243fd3c0a952e0a108dd105a5e821a534851724e0f87db4a0fec445b5c262f446e26cfb889cfb22e972bb57edd9ef61697e369a5a824fa783951bb89f06
7
+ data.tar.gz: 005b27f150a183512caf96fcd3b19a4a0a1ca3b4ba21713af191d5472e84d224fb6bd7d19e2e16cbd5cb4d4078850bce3d5de24ce7c23ee035e947e36f1b3899
@@ -2,7 +2,7 @@
2
2
 
3
3
  module CI
4
4
  module Queue
5
- VERSION = '0.24.3'
5
+ VERSION = '0.26.0'
6
6
  DEV_SCRIPTS_ROOT = ::File.expand_path('../../../../../redis', __FILE__)
7
7
  RELEASE_SCRIPTS_ROOT = ::File.expand_path('../redis', __FILE__)
8
8
  end
@@ -42,11 +42,13 @@ module Minitest
42
42
  end
43
43
 
44
44
  def retry_command
45
+ require_worker_id!
45
46
  STDERR.puts "Warning: the retry subcommand is deprecated."
46
47
  run_command # aliased for backward compatibility purpose
47
48
  end
48
49
 
49
50
  def run_command
51
+ require_worker_id!
50
52
  if queue.retrying? || retry?
51
53
  if queue.expired?
52
54
  abort! "The test run is too old and can't be retried"
@@ -90,6 +92,7 @@ module Minitest
90
92
  end
91
93
 
92
94
  def release_command
95
+ require_worker_id!
93
96
  queue.release!
94
97
  end
95
98
 
@@ -196,7 +199,7 @@ module Minitest
196
199
  msg = "#{supervisor.size} tests weren't run."
197
200
  if supervisor.max_test_failed?
198
201
  puts('Encountered too many failed tests. Test run was ended early.')
199
- puts(msg)
202
+ abort!(msg)
200
203
  else
201
204
  abort!(msg)
202
205
  end
@@ -249,6 +252,11 @@ module Minitest
249
252
  attr_reader :queue_config, :options, :command, :argv
250
253
  attr_accessor :queue, :queue_url, :grind_list, :grind_count, :load_paths
251
254
 
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
258
+ end
259
+
252
260
  def display_warnings(build)
253
261
  build.pop_warnings.each do |type, attributes|
254
262
  case type
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.24.3
4
+ version: 0.26.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-02-21 00:00:00.000000000 Z
11
+ date: 2023-03-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler