ci-queue 0.24.2 → 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: 19eb1f45380007118047d2c25939122868e7cd69413d5f7b398fc400a697475e
4
- data.tar.gz: 36062c5ce17f5a547a255fa86f6c089a0a5e0cbc3acf3784beec3e4d423c11a6
3
+ metadata.gz: 29c565ade103a1aef45ca63d5d7816b2dbdd35be089579e62427055fed308e38
4
+ data.tar.gz: 1e2213ea626d804837325204b86a3d2c4461992744ace2b303a90c8f845c2316
5
5
  SHA512:
6
- metadata.gz: 6107331dffffba8ac435081865a3b2cea6de604d61168e9735c419c28fabd433c62b5d05ed6b7bd5fc645901668906e0c98fc3acc57613599d91236f90c148dd
7
- data.tar.gz: 7d79100c0de4c37a3f1dbe0d2ac8a264f2ef3f1d52852c64f04bb7a4e24691c150c5d3b967023b39a6ef5be91bd0314c68fed3f09fec141a55b944e439e7fdef
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.2'
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
@@ -144,7 +144,7 @@ module Minitest
144
144
 
145
145
  def self.relative_path(path, root: project_root)
146
146
  Pathname(path).relative_path_from(Pathname(root)).to_s
147
- rescue ArgumentError
147
+ rescue ArgumentError, TypeError
148
148
  path
149
149
  end
150
150
 
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.2
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: 2022-09-06 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