ci-queue 0.24.3 → 0.25.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: 29c565ade103a1aef45ca63d5d7816b2dbdd35be089579e62427055fed308e38
4
+ data.tar.gz: 1e2213ea626d804837325204b86a3d2c4461992744ace2b303a90c8f845c2316
5
5
  SHA512:
6
- metadata.gz: b6e3aad6d6388194baacef1e570c854e34c062d105870931419f7303d2a42dafb43663a88b93c0af690bb834c276ab8a3a3820158d2e76f4f122f1ff9beb0d62
7
- data.tar.gz: 625d171988b41fbcaa2c346ef6c6d2a0602f94967ae1b41bc38644b29ed4bf51fdeda172d30440ecff2e5b8b3746b5d25878d60bbd1b8981571214766ee09e72
6
+ metadata.gz: 366a2974af0e172b4ad56a15dd1e0496b981fa222cbaafaae8d3d241c816ebfb966902d0a73799c467f1dd8f26b9c832327ac2b9b0ad540d7faec56aa24c28dc
7
+ data.tar.gz: d4ab5a210774f32318998801d91aaeddb0100db7f44f5cad8898bc06c6ea7ed41f5ff9e474dabeea77812204181be331242c68ba1ecaa0fe136165ed37e53764
@@ -2,7 +2,7 @@
2
2
 
3
3
  module CI
4
4
  module Queue
5
- VERSION = '0.24.3'
5
+ VERSION = '0.25.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
 
@@ -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.25.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-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler