ci-queue 0.14.1 → 0.15.0.beta1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/ci-queue.gemspec +1 -1
- data/lib/ci/queue/common.rb +4 -0
- data/lib/ci/queue/redis/worker.rb +6 -0
- data/lib/ci/queue/version.rb +1 -1
- data/lib/minitest/queue/order_reporter.rb +1 -0
- data/lib/minitest/queue/runner.rb +13 -6
- data/lib/rspec/queue.rb +14 -8
- metadata +9 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 6ec83e0947a4bb046b27a52b6b701909b79e4ee3143d65f92a4ecf7f2bc96560
|
4
|
+
data.tar.gz: c974a1aacd13149f737120a4dc25777a9fd1bd916bde9cf6bd58038ef7f72e70
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9341e3a10a483c6837008c9532e7be39ae2238e8a182165271dada1a308ff9aca41e28245ef34fe29391abf1eaab66583ecd9613429dee61d924efea0bf534ee
|
7
|
+
data.tar.gz: 920fdc913153b762e8ed9a64ecf851ba17a132048a123064eda0475f38575434f1aa642c5a26e2501916c80007c73126e0addc514fc5bd3bb4d55d8fed7d6857
|
data/ci-queue.gemspec
CHANGED
@@ -28,7 +28,7 @@ Gem::Specification.new do |spec|
|
|
28
28
|
|
29
29
|
spec.add_dependency 'ansi'
|
30
30
|
|
31
|
-
spec.add_development_dependency 'bundler'
|
31
|
+
spec.add_development_dependency 'bundler'
|
32
32
|
spec.add_development_dependency 'rake', "~> 10.0"
|
33
33
|
spec.add_development_dependency 'minitest', ENV.fetch('MINITEST_VERSION', '~> 5.11')
|
34
34
|
spec.add_development_dependency 'rspec', '~> 3.7.0'
|
data/lib/ci/queue/common.rb
CHANGED
@@ -54,6 +54,12 @@ module CI
|
|
54
54
|
rescue *CONNECTION_ERRORS
|
55
55
|
end
|
56
56
|
|
57
|
+
def retrying?
|
58
|
+
redis.exists(key('worker', worker_id, 'queue'))
|
59
|
+
rescue *CONNECTION_ERRORS
|
60
|
+
false
|
61
|
+
end
|
62
|
+
|
57
63
|
def retry_queue
|
58
64
|
failures = build.failed_tests.to_set
|
59
65
|
log = redis.lrange(key('worker', worker_id, 'queue'), 0, -1)
|
data/lib/ci/queue/version.rb
CHANGED
@@ -37,15 +37,22 @@ module Minitest
|
|
37
37
|
end
|
38
38
|
|
39
39
|
def retry_command
|
40
|
-
|
41
|
-
|
42
|
-
unless retry_queue.exhausted?
|
43
|
-
self.queue = retry_queue
|
44
|
-
end
|
45
|
-
run_command
|
40
|
+
STDERR.puts "Warning: the retry subcommand is deprecated."
|
41
|
+
run_command # aliased for backward compatibility purpose
|
46
42
|
end
|
47
43
|
|
48
44
|
def run_command
|
45
|
+
if queue.retrying?
|
46
|
+
reset_counters
|
47
|
+
retry_queue = queue.retry_queue
|
48
|
+
if retry_queue.exhausted?
|
49
|
+
puts "The retry queue does not contain any failure, we'll process the main queue instead."
|
50
|
+
else
|
51
|
+
puts "Retrying failed tests."
|
52
|
+
self.queue = retry_queue
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
49
56
|
set_load_path
|
50
57
|
Minitest.queue = queue
|
51
58
|
reporters = [
|
data/lib/rspec/queue.rb
CHANGED
@@ -18,10 +18,6 @@ module RSpec
|
|
18
18
|
configuration.queue_url || ENV['CI_QUEUE_URL']
|
19
19
|
end
|
20
20
|
|
21
|
-
def retrying
|
22
|
-
configuration.retrying
|
23
|
-
end
|
24
|
-
|
25
21
|
def invalid_usage!(message)
|
26
22
|
reopen_previous_step
|
27
23
|
puts red(message)
|
@@ -52,11 +48,10 @@ module RSpec
|
|
52
48
|
end
|
53
49
|
|
54
50
|
Core::Configuration.add_setting(:queue_url)
|
55
|
-
Core::Configuration.add_setting(:retrying)
|
56
51
|
Core::Configuration.prepend(ConfigurationExtension)
|
57
52
|
|
58
53
|
module ConfigurationOptionsExtension
|
59
|
-
attr_accessor :queue_url
|
54
|
+
attr_accessor :queue_url
|
60
55
|
end
|
61
56
|
Core::ConfigurationOptions.prepend(ConfigurationOptionsExtension)
|
62
57
|
|
@@ -90,7 +85,7 @@ module RSpec
|
|
90
85
|
Replays a previous run in the same order.
|
91
86
|
EOS
|
92
87
|
parser.on('--retry', *help) do |url|
|
93
|
-
|
88
|
+
STDERR.puts "Warning: The --retry flag is deprecated"
|
94
89
|
end
|
95
90
|
|
96
91
|
help = split_heredoc(<<-EOS)
|
@@ -375,7 +370,18 @@ module RSpec
|
|
375
370
|
end
|
376
371
|
|
377
372
|
queue = CI::Queue.from_uri(queue_url, RSpec::Queue.config)
|
378
|
-
|
373
|
+
|
374
|
+
if queue.retrying?
|
375
|
+
retry_queue = queue.retry_queue
|
376
|
+
if retry_queue.exhausted?
|
377
|
+
puts "Found 0 tests to retry, processing the main queue."
|
378
|
+
else
|
379
|
+
puts "Retrying #{retry_queue.size} failed tests."
|
380
|
+
reset_counters
|
381
|
+
queue = retry_queue
|
382
|
+
end
|
383
|
+
end
|
384
|
+
|
379
385
|
BuildStatusRecorder.build = queue.build
|
380
386
|
queue.populate(examples, random: ordering_seed, &:id)
|
381
387
|
examples_count = examples.size # TODO: figure out which stub value would be best
|
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.
|
4
|
+
version: 0.15.0.beta1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jean Boussier
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-01-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ansi
|
@@ -28,16 +28,16 @@ dependencies:
|
|
28
28
|
name: bundler
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
40
|
+
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rake
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -221,12 +221,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
221
221
|
version: '0'
|
222
222
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
223
223
|
requirements:
|
224
|
-
- - "
|
224
|
+
- - ">"
|
225
225
|
- !ruby/object:Gem::Version
|
226
|
-
version:
|
226
|
+
version: 1.3.1
|
227
227
|
requirements: []
|
228
228
|
rubyforge_project:
|
229
|
-
rubygems_version: 2.6
|
229
|
+
rubygems_version: 2.7.6
|
230
230
|
signing_key:
|
231
231
|
specification_version: 4
|
232
232
|
summary: Distribute tests over many workers using a queue
|