ci-queue 0.76.0 → 0.78.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: 16baa9c98a3d55d77d19c7c7d2454194eb3cf7c5671de3741a7e9d342b66aa9c
4
- data.tar.gz: 659213c044def8624169ff3e1a9b126f90fc6920659a1278ca0ac1f05bdfe163
3
+ metadata.gz: 68c5b1264396c9d74c0de954e922c38bed02035599ac2a5739f6ff4f5d304ce2
4
+ data.tar.gz: 9879b14f07961c581cc6ee98b33e97e9e5ea7ce97ad6be8c114ddb946ab9c26e
5
5
  SHA512:
6
- metadata.gz: 52af50bc24c4f665f15f373f3c5d63e23b7b9b941fbc549bae1e7902093f33ecd63c1f29bd1b73fd7168c21b4f581d3b40253d8e96f250ee4e316ff3b767300b
7
- data.tar.gz: 4c34d6a208f90d772be8adaf0660528eb209b87f08a7e32d77229ec341ab81f59662bf8a8e32f1e39bf0dbc2e7a68e2ce422dda3693789a58ef3e1e5d8e46883
6
+ metadata.gz: f9791de60dc9e636ce6dca98ff370afad264f95437af6d232df651a7c66b607fc4cb2dbfb9955f3e3f558f7cd16e330548f0a9ef2c1fec67ce56e3157ff2accd
7
+ data.tar.gz: 21a6d847e04e2d8cb9b5e21154d29d41040c9000fd809c65d8946478d8dd6a70358d077411dbaa798d17fc495c77a488486930137342354cb9c63860a78c28d9
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ci-queue (0.76.0)
4
+ ci-queue (0.78.0)
5
5
  logger
6
6
 
7
7
  GEM
@@ -168,9 +168,9 @@ module CI
168
168
  end
169
169
 
170
170
  def reserve
171
- test = (try_to_reserve_lost_test || try_to_reserve_test)
172
- reserved_tests << test
173
- test
171
+ (try_to_reserve_lost_test || try_to_reserve_test).tap do |test|
172
+ reserved_tests << test if test
173
+ end
174
174
  end
175
175
 
176
176
  def try_to_reserve_test
@@ -2,7 +2,7 @@
2
2
 
3
3
  module CI
4
4
  module Queue
5
- VERSION = '0.76.0'
5
+ VERSION = '0.78.0'
6
6
  DEV_SCRIPTS_ROOT = ::File.expand_path('../../../../../redis', __FILE__)
7
7
  RELEASE_SCRIPTS_ROOT = ::File.expand_path('../redis', __FILE__)
8
8
  end
@@ -193,6 +193,7 @@ module Minitest
193
193
  puts reopen_previous_step
194
194
  puts red("The failing test does not exist.")
195
195
  File.write('log/test_order.log', "")
196
+ File.write('log/bisect_test_details.log', "")
196
197
  exit! 1
197
198
  end
198
199
 
@@ -200,6 +201,7 @@ module Minitest
200
201
  puts reopen_previous_step
201
202
  puts red("The test fail when ran alone, no need to bisect.")
202
203
  File.write('log/test_order.log', queue_config.failing_test)
204
+ File.write('log/bisect_test_details.log', "")
203
205
  exit! 0
204
206
  end
205
207
 
@@ -218,6 +220,7 @@ module Minitest
218
220
  if queue.suspects_left == 0
219
221
  step(yellow("The failing test was the first test in the test order so there is nothing to bisect."))
220
222
  File.write('log/test_order.log', "")
223
+ File.write('log/bisect_test_details.log', "")
221
224
  exit! 1
222
225
  end
223
226
 
@@ -226,6 +229,7 @@ module Minitest
226
229
  if run_tests_in_fork(failing_order)
227
230
  step(yellow("The bisection was inconclusive, there might not be any leaky test here."))
228
231
  File.write('log/test_order.log', "")
232
+ File.write('log/bisect_test_details.log', "")
229
233
  exit! 1
230
234
  else
231
235
  step(green('The following command should reproduce the leak on your machine:'), collapsed: false)
@@ -238,6 +242,16 @@ module Minitest
238
242
  puts
239
243
 
240
244
  File.write('log/test_order.log', failing_order.to_a.map(&:id).join("\n"))
245
+
246
+ bisect_test_details = failing_order.to_a.map do |test|
247
+ source_location = test.source_location
248
+ file_path = source_location&.first || 'unknown'
249
+ line_number = source_location&.last || -1
250
+ "#{test.id} #{file_path}:#{line_number}"
251
+ end
252
+
253
+ File.write('log/bisect_test_details.log', bisect_test_details.join("\n"))
254
+
241
255
  exit! 0
242
256
  end
243
257
  end
@@ -257,6 +257,12 @@ module Minitest
257
257
  Minitest.queue.flaky?(self)
258
258
  end
259
259
 
260
+ def source_location
261
+ @runnable.instance_method(@method_name).source_location
262
+ rescue NameError, NoMethodError
263
+ nil
264
+ end
265
+
260
266
  private
261
267
 
262
268
  def current_timestamp
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ci-queue
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.76.0
4
+ version: 0.78.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jean Boussier
@@ -254,7 +254,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
254
254
  - !ruby/object:Gem::Version
255
255
  version: '0'
256
256
  requirements: []
257
- rubygems_version: 3.7.1
257
+ rubygems_version: 3.7.2
258
258
  specification_version: 4
259
259
  summary: Distribute tests over many workers using a queue
260
260
  test_files: []