ci-queue 0.46.0 → 0.48.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +0 -1
- data/.ruby-version +1 -0
- data/Gemfile.lock +111 -0
- data/ci-queue.gemspec +2 -0
- data/dev.yml +1 -1
- data/lib/ci/queue/redis/supervisor.rb +11 -2
- data/lib/ci/queue/version.rb +1 -1
- data/lib/minitest/queue/runner.rb +7 -1
- data/lib/minitest/queue.rb +1 -1
- metadata +6 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: afd20dadd29a542f0876168e23d79e5360f893d780fbe9b4774e5de1a46445da
|
4
|
+
data.tar.gz: 00bdb8f74d38573f2fecea1ee6ce15122e04ecc82642b76f8439d189b0474be3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 79aaeb1f29291026f8fdf36101b7105fc76845b0e8142eb3cf3400e7905235f8cedc2f71be6819a1c7adbe6b08898e14db0e490214f62cee65f03b8d70e9dac4
|
7
|
+
data.tar.gz: f140a713fbb4f4ad6c2772143e97409f093a1829e6ac86a429036db3d5bc7f8a291e7d304e7314fcadb86d54ff449dfacf486b8318faf2e1b0074556459475c8
|
data/.gitignore
CHANGED
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
3.3.0
|
data/Gemfile.lock
ADDED
@@ -0,0 +1,111 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
ci-queue (0.48.0)
|
5
|
+
|
6
|
+
GEM
|
7
|
+
remote: https://rubygems.org/
|
8
|
+
specs:
|
9
|
+
activesupport (7.1.3.2)
|
10
|
+
base64
|
11
|
+
bigdecimal
|
12
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
13
|
+
connection_pool (>= 2.2.5)
|
14
|
+
drb
|
15
|
+
i18n (>= 1.6, < 2)
|
16
|
+
minitest (>= 5.1)
|
17
|
+
mutex_m
|
18
|
+
tzinfo (~> 2.0)
|
19
|
+
ansi (1.5.0)
|
20
|
+
ast (2.4.2)
|
21
|
+
base64 (0.2.0)
|
22
|
+
bigdecimal (3.1.7)
|
23
|
+
builder (3.2.4)
|
24
|
+
concurrent-ruby (1.2.3)
|
25
|
+
connection_pool (2.4.1)
|
26
|
+
diff-lcs (1.5.1)
|
27
|
+
docile (1.4.0)
|
28
|
+
drb (2.2.1)
|
29
|
+
i18n (1.14.4)
|
30
|
+
concurrent-ruby (~> 1.0)
|
31
|
+
json (2.7.1)
|
32
|
+
language_server-protocol (3.17.0.3)
|
33
|
+
minitest (5.22.3)
|
34
|
+
minitest-reporters (1.6.1)
|
35
|
+
ansi
|
36
|
+
builder
|
37
|
+
minitest (>= 5.0)
|
38
|
+
ruby-progressbar
|
39
|
+
msgpack (1.7.2)
|
40
|
+
mutex_m (0.2.0)
|
41
|
+
parallel (1.24.0)
|
42
|
+
parser (3.3.0.5)
|
43
|
+
ast (~> 2.4.1)
|
44
|
+
racc
|
45
|
+
racc (1.7.3)
|
46
|
+
rainbow (3.1.1)
|
47
|
+
rake (13.1.0)
|
48
|
+
redis (5.1.0)
|
49
|
+
redis-client (>= 0.17.0)
|
50
|
+
redis-client (0.21.1)
|
51
|
+
connection_pool
|
52
|
+
regexp_parser (2.9.0)
|
53
|
+
rexml (3.2.6)
|
54
|
+
rspec (3.13.0)
|
55
|
+
rspec-core (~> 3.13.0)
|
56
|
+
rspec-expectations (~> 3.13.0)
|
57
|
+
rspec-mocks (~> 3.13.0)
|
58
|
+
rspec-core (3.13.0)
|
59
|
+
rspec-support (~> 3.13.0)
|
60
|
+
rspec-expectations (3.13.0)
|
61
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
62
|
+
rspec-support (~> 3.13.0)
|
63
|
+
rspec-mocks (3.13.0)
|
64
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
65
|
+
rspec-support (~> 3.13.0)
|
66
|
+
rspec-support (3.13.1)
|
67
|
+
rubocop (1.62.1)
|
68
|
+
json (~> 2.3)
|
69
|
+
language_server-protocol (>= 3.17.0)
|
70
|
+
parallel (~> 1.10)
|
71
|
+
parser (>= 3.3.0.2)
|
72
|
+
rainbow (>= 2.2.2, < 4.0)
|
73
|
+
regexp_parser (>= 1.8, < 3.0)
|
74
|
+
rexml (>= 3.2.5, < 4.0)
|
75
|
+
rubocop-ast (>= 1.31.1, < 2.0)
|
76
|
+
ruby-progressbar (~> 1.7)
|
77
|
+
unicode-display_width (>= 2.4.0, < 3.0)
|
78
|
+
rubocop-ast (1.31.2)
|
79
|
+
parser (>= 3.3.0.4)
|
80
|
+
ruby-progressbar (1.13.0)
|
81
|
+
simplecov (0.22.0)
|
82
|
+
docile (~> 1.1)
|
83
|
+
simplecov-html (~> 0.11)
|
84
|
+
simplecov_json_formatter (~> 0.1)
|
85
|
+
simplecov-html (0.12.3)
|
86
|
+
simplecov_json_formatter (0.1.4)
|
87
|
+
snappy (0.4.0)
|
88
|
+
tzinfo (2.0.6)
|
89
|
+
concurrent-ruby (~> 1.0)
|
90
|
+
unicode-display_width (2.5.0)
|
91
|
+
|
92
|
+
PLATFORMS
|
93
|
+
arm64-darwin-23
|
94
|
+
ruby
|
95
|
+
|
96
|
+
DEPENDENCIES
|
97
|
+
activesupport
|
98
|
+
bundler
|
99
|
+
ci-queue!
|
100
|
+
minitest (~> 5.11)
|
101
|
+
minitest-reporters (~> 1.1)
|
102
|
+
msgpack
|
103
|
+
rake
|
104
|
+
redis
|
105
|
+
rspec (~> 3.10)
|
106
|
+
rubocop
|
107
|
+
simplecov (~> 0.12)
|
108
|
+
snappy
|
109
|
+
|
110
|
+
BUNDLED WITH
|
111
|
+
2.5.3
|
data/ci-queue.gemspec
CHANGED
@@ -19,6 +19,8 @@ Gem::Specification.new do |spec|
|
|
19
19
|
spec.homepage = 'https://github.com/Shopify/ci-queue'
|
20
20
|
spec.license = 'MIT'
|
21
21
|
|
22
|
+
spec.required_ruby_version = '>= 2.7'
|
23
|
+
|
22
24
|
spec.files = lua_scripts + `git ls-files -z`.split("\x0").reject do |f|
|
23
25
|
f.match(%r{^(test|spec|features)/})
|
24
26
|
end
|
data/dev.yml
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
+
|
2
3
|
module CI
|
3
4
|
module Queue
|
4
5
|
module Redis
|
@@ -17,11 +18,13 @@ module CI
|
|
17
18
|
end
|
18
19
|
|
19
20
|
def wait_for_workers
|
20
|
-
|
21
|
+
duration = measure do
|
22
|
+
wait_for_master(timeout: config.queue_init_timeout)
|
23
|
+
end
|
21
24
|
|
22
25
|
yield if block_given?
|
23
26
|
|
24
|
-
time_left = config.report_timeout
|
27
|
+
time_left = config.report_timeout - duration.to_i
|
25
28
|
time_left_with_no_workers = config.inactive_workers_timeout
|
26
29
|
until exhausted? || time_left <= 0 || max_test_failed? || time_left_with_no_workers <= 0
|
27
30
|
time_left -= 1
|
@@ -44,6 +47,12 @@ module CI
|
|
44
47
|
|
45
48
|
private
|
46
49
|
|
50
|
+
def measure
|
51
|
+
starting = Process.clock_gettime(Process::CLOCK_MONOTONIC)
|
52
|
+
yield
|
53
|
+
Process.clock_gettime(Process::CLOCK_MONOTONIC) - starting
|
54
|
+
end
|
55
|
+
|
47
56
|
def active_workers?
|
48
57
|
# if there are running jobs we assume there are still agents active
|
49
58
|
redis.zrangebyscore(key('running'), CI::Queue.time_now.to_f - config.timeout, "+inf", limit: [0,1]).count > 0
|
data/lib/ci/queue/version.rb
CHANGED
@@ -207,6 +207,12 @@ module Minitest
|
|
207
207
|
puts
|
208
208
|
end
|
209
209
|
|
210
|
+
if run_index == 0
|
211
|
+
step(yellow("The failing test was the first test in the test order so there is nothing to bisect."))
|
212
|
+
File.write('log/test_order.log', "")
|
213
|
+
exit! 1
|
214
|
+
end
|
215
|
+
|
210
216
|
failing_order = queue.candidates
|
211
217
|
step("Final validation")
|
212
218
|
status = if run_tests_in_fork(failing_order)
|
@@ -220,7 +226,7 @@ module Minitest
|
|
220
226
|
command += argv
|
221
227
|
|
222
228
|
puts
|
223
|
-
puts "cat <<EOF |\n#{failing_order.to_a.map(&:id).join("\n")}\nEOF\n#{command.join(' ')}"
|
229
|
+
puts "cat <<'EOF' |\n#{failing_order.to_a.map(&:id).join("\n")}\nEOF\n#{command.join(' ')}"
|
224
230
|
puts
|
225
231
|
|
226
232
|
File.write('log/test_order.log', failing_order.to_a.map(&:id).join("\n"))
|
data/lib/minitest/queue.rb
CHANGED
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.48.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: 2024-02
|
11
|
+
date: 2024-04-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -160,7 +160,9 @@ extensions: []
|
|
160
160
|
extra_rdoc_files: []
|
161
161
|
files:
|
162
162
|
- ".gitignore"
|
163
|
+
- ".ruby-version"
|
163
164
|
- Gemfile
|
165
|
+
- Gemfile.lock
|
164
166
|
- README.md
|
165
167
|
- Rakefile
|
166
168
|
- bin/bundler
|
@@ -234,14 +236,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
234
236
|
requirements:
|
235
237
|
- - ">="
|
236
238
|
- !ruby/object:Gem::Version
|
237
|
-
version: '
|
239
|
+
version: '2.7'
|
238
240
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
239
241
|
requirements:
|
240
242
|
- - ">="
|
241
243
|
- !ruby/object:Gem::Version
|
242
244
|
version: '0'
|
243
245
|
requirements: []
|
244
|
-
rubygems_version: 3.5.
|
246
|
+
rubygems_version: 3.5.7
|
245
247
|
signing_key:
|
246
248
|
specification_version: 4
|
247
249
|
summary: Distribute tests over many workers using a queue
|