ci-queue 0.89.0 → 0.90.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: 87b11dfe365c8f57a79ef1d5b65e4f422a1fce2bd94d51b0d653d10bfb95120a
4
- data.tar.gz: 1a530c84f9883b85f0784b33e67044f5a325a5815dc06d4b89872b76d1127a74
3
+ metadata.gz: c5233596f5e87ddd8954a44a2b7c2be3d258ade0c567ff808b32d99194d89a7b
4
+ data.tar.gz: 1026734a1076455a5ac95821ef8a1dbba83cb8ed445720fab8ca93cdd53eb693
5
5
  SHA512:
6
- metadata.gz: 25e7f86d44fc3428e6f1d08430a3940348ae9d2d2561c190894d7a6e1b197d00b22a97fefcb5ade8462d2ccc0e14255ff9d4f10571e5f1f99dd8758b45d8a066
7
- data.tar.gz: 0c676475b941684ad92d43088612e31adb597f2f2c22f383e55c8d2dbc2cfa68646e013a58000191f5fecb16aee8151b5ce8f14cd97fe2d9ca2f11c3fd57cf3f
6
+ metadata.gz: 68b5ce15acc1b90b3c75fb861ad8ea2ff6599c44d096a96ed5d018fa8d4eb4c6c20a9949950e31284436241d9d1df5c2917430eadef673872c9e4a693893ed20
7
+ data.tar.gz: a1ba50c8998de99d54620efd899bc1a471b0bf037a3cb9a9e056b36d45f551f9430a9bac1b4f46713c5e17426fc7e409be4b307f77071321a9f0789c0eca5ee8
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ci-queue (0.89.0)
4
+ ci-queue (0.90.0)
5
5
  logger
6
6
 
7
7
  GEM
@@ -99,6 +99,11 @@ module CI
99
99
  @lazy_load_test_helpers.split(',').map(&:strip)
100
100
  end
101
101
 
102
+ def retry?
103
+ ENV.fetch("BUILDKITE_RETRY_COUNT", "0").to_i > 0 ||
104
+ ENV["SEMAPHORE_PIPELINE_RERUN"] == "true"
105
+ end
106
+
102
107
  def queue_init_timeout
103
108
  @queue_init_timeout || timeout
104
109
  end
@@ -39,6 +39,23 @@ module CI
39
39
  yield if block_given?
40
40
  end
41
41
 
42
+ # On retry runs (BUILDKITE_RETRY_COUNT > 0), the main queue is already
43
+ # exhausted from the original run. A retry worker may have found unresolved
44
+ # failures via the error-reports fallback and be running them via the Retry
45
+ # queue — but those tests are NOT in the Redis running set so active_workers?
46
+ # returns false and the loop above exits immediately.
47
+ #
48
+ # Wait up to inactive_workers_timeout for retry workers to clear error-reports.
49
+ # This prevents the summary from canceling retry workers before they finish.
50
+ if exhausted? && config.retry? && !rescue_connection_errors { build.failed_tests }.empty?
51
+ @time_left_with_no_workers = config.inactive_workers_timeout
52
+ until rescue_connection_errors { build.failed_tests }.empty? ||
53
+ @time_left_with_no_workers <= 0
54
+ sleep 1
55
+ @time_left_with_no_workers -= 1
56
+ end
57
+ end
58
+
42
59
  exhausted?
43
60
  rescue CI::Queue::Redis::LostMaster
44
61
  false
@@ -2,7 +2,7 @@
2
2
 
3
3
  module CI
4
4
  module Queue
5
- VERSION = '0.89.0'
5
+ VERSION = '0.90.0'
6
6
  DEV_SCRIPTS_ROOT = ::File.expand_path('../../../../../redis', __FILE__)
7
7
  RELEASE_SCRIPTS_ROOT = ::File.expand_path('../redis', __FILE__)
8
8
  end
@@ -267,8 +267,16 @@ module Minitest
267
267
  end
268
268
 
269
269
  def aggregates
270
- success = failures.zero? && errors.zero?
271
- failures_count = "#{failures} failures, #{errors} errors,"
270
+ # error-reports is authoritative when workers die before flushing per-test stats.
271
+ # Floor the displayed count so the summary line is never misleadingly green.
272
+ known_error_count = error_reports.size
273
+ effective_total = [failures + errors, known_error_count].max
274
+ success = effective_total.zero?
275
+ failures_count = if failures + errors >= known_error_count
276
+ "#{failures} failures, #{errors} errors,"
277
+ else
278
+ "#{effective_total} failures,"
279
+ end
272
280
 
273
281
  step([
274
282
  'Ran %d tests, %d assertions,' % [progress, assertions],
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.89.0
4
+ version: 0.90.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jean Boussier