minitest-distributed 0.2.10 → 0.2.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +0 -1
- data/.ruby-version +1 -0
- data/README.md +0 -6
- data/dev.yml +1 -1
- data/lib/minitest/distributed/configuration.rb +11 -9
- data/lib/minitest/distributed/coordinators/redis_coordinator.rb +1 -2
- data/lib/minitest/distributed/enqueued_runnable.rb +15 -13
- data/lib/minitest/distributed/reporters/distributed_summary_reporter.rb +2 -4
- data/lib/minitest/distributed/version.rb +1 -1
- data/lib/minitest/distributed_plugin.rb +1 -1
- data/minitest-distributed.gemspec +3 -2
- metadata +22 -10
- data/.github/ISSUE_TEMPLATE/bug_report.md +0 -43
- data/.github/dependabot.yml +0 -20
- data/.github/workflows/ruby.yml +0 -111
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3755320df95c6d8e5ba5e32b04b44351043588d43c309d4d746cc36f96567132
|
4
|
+
data.tar.gz: 785503f39eadcfab72b7fc3df6e8f19d3ad0fbaea793e68f9f233ed08c4f6452
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fd42edc7fd402f38c08f22ff17fa8430b65cae6d1c53b27afa55446ab5cb6e90f0c0d8a92c6fa7a7665d7aba4a81768a52d9a5c1007da2ebf6407414c2538510
|
7
|
+
data.tar.gz: e3b5119c06eaec10a7f8befacec8b3fde636e17eb9c8a4b539ae4aedf95d00217a97911ccf067e14f08850e1dbc3a6d072723811b565ea06aff46be8fb2607ae
|
data/.rubocop.yml
CHANGED
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
3.2.2
|
data/README.md
CHANGED
@@ -23,12 +23,6 @@ flakiness. To combat flakiness, minitest-distributed implements resiliency
|
|
23
23
|
patterns, like re-running a test on a different worker on failure, and a
|
24
24
|
circuit breaker for misbehaving workers.
|
25
25
|
|
26
|
-
| | |
|
27
|
-
|----------------|--------------------------------------------------------------------------------------------------------------------------------------|
|
28
|
-
| Current status | Ongoing |
|
29
|
-
| Owner | [@Shopify/test-infra](https://github.com/orgs/Shopify/teams/test-infra) |
|
30
|
-
| Help | [#team-test-infra](https://shopify.slack.com/archives/team-test-infra) |
|
31
|
-
|
32
26
|
## Commands
|
33
27
|
**Distributed invocation**
|
34
28
|
|
data/dev.yml
CHANGED
@@ -105,15 +105,17 @@ module Minitest
|
|
105
105
|
|
106
106
|
sig { returns(Coordinators::CoordinatorInterface) }
|
107
107
|
def coordinator
|
108
|
-
@coordinator
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
108
|
+
@coordinator ||= T.let(
|
109
|
+
case coordinator_uri.scheme
|
110
|
+
when "redis"
|
111
|
+
Coordinators::RedisCoordinator.new(configuration: self)
|
112
|
+
when "memory"
|
113
|
+
Coordinators::MemoryCoordinator.new(configuration: self)
|
114
|
+
else
|
115
|
+
raise NotImplementedError, "Unknown coordinator implementation: #{coordinator_uri.scheme}"
|
116
|
+
end,
|
117
|
+
T.nilable(Coordinators::CoordinatorInterface),
|
118
|
+
)
|
117
119
|
end
|
118
120
|
end
|
119
121
|
end
|
@@ -273,8 +273,7 @@ module Minitest
|
|
273
273
|
|
274
274
|
sig { returns(String) }
|
275
275
|
def register_consumergroup_script
|
276
|
-
@register_consumergroup_script
|
277
|
-
@register_consumergroup_script ||= redis.script(:load, <<~LUA)
|
276
|
+
@register_consumergroup_script ||= T.let(redis.script(:load, <<~LUA), T.nilable(String))
|
278
277
|
-- Try to create the consumergroup. This will raise an error if the
|
279
278
|
-- consumergroup has already been registered by somebody else, which
|
280
279
|
-- means another worker will be acting as leader.
|
@@ -61,8 +61,7 @@ module Minitest
|
|
61
61
|
|
62
62
|
sig { returns(T::Boolean) }
|
63
63
|
def success?
|
64
|
-
@success
|
65
|
-
@success ||= @block.call
|
64
|
+
@success ||= T.let(@block.call, T.nilable(T::Boolean))
|
66
65
|
end
|
67
66
|
|
68
67
|
sig { returns(T::Boolean) }
|
@@ -72,14 +71,12 @@ module Minitest
|
|
72
71
|
|
73
72
|
sig { returns(Commit) }
|
74
73
|
def self.success
|
75
|
-
@success
|
76
|
-
@success ||= new { true }
|
74
|
+
@success ||= T.let(new { true }, T.nilable(Commit))
|
77
75
|
end
|
78
76
|
|
79
77
|
sig { returns(Commit) }
|
80
78
|
def self.failure
|
81
|
-
@failure
|
82
|
-
@failure ||= new { false }
|
79
|
+
@failure ||= T.let(new { false }, T.nilable(Commit))
|
83
80
|
end
|
84
81
|
end
|
85
82
|
|
@@ -106,13 +103,18 @@ module Minitest
|
|
106
103
|
|
107
104
|
sig { returns(Minitest::Result) }
|
108
105
|
def committed_result
|
109
|
-
@committed_result
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
106
|
+
@committed_result ||= T.let(
|
107
|
+
if final? && commit.failure?
|
108
|
+
# If a runnable result is final, but the acked failed, we will discard the result.
|
109
|
+
Minitest::Discard.wrap(
|
110
|
+
initial_result,
|
111
|
+
test_timeout_seconds: enqueued_runnable.test_timeout_seconds,
|
112
|
+
)
|
113
|
+
else
|
114
|
+
initial_result
|
115
|
+
end,
|
116
|
+
T.nilable(Minitest::Result),
|
117
|
+
)
|
116
118
|
end
|
117
119
|
end
|
118
120
|
|
@@ -67,14 +67,12 @@ module Minitest
|
|
67
67
|
|
68
68
|
sig { returns(ResultAggregate) }
|
69
69
|
def local_results
|
70
|
-
@local_results
|
71
|
-
@local_results ||= configuration.coordinator.local_results
|
70
|
+
@local_results ||= T.let(configuration.coordinator.local_results, T.nilable(ResultAggregate))
|
72
71
|
end
|
73
72
|
|
74
73
|
sig { returns(ResultAggregate) }
|
75
74
|
def combined_results
|
76
|
-
@combined_results
|
77
|
-
@combined_results ||= configuration.coordinator.combined_results
|
75
|
+
@combined_results ||= T.let(configuration.coordinator.combined_results, T.nilable(ResultAggregate))
|
78
76
|
end
|
79
77
|
|
80
78
|
sig { returns(Configuration) }
|
@@ -27,7 +27,7 @@ Gem::Specification.new do |spec|
|
|
27
27
|
|
28
28
|
spec.homepage = "https://github.com/Shopify/minitest-distributed"
|
29
29
|
spec.license = "MIT"
|
30
|
-
spec.required_ruby_version =
|
30
|
+
spec.required_ruby_version = ">= 2.7.0"
|
31
31
|
|
32
32
|
spec.metadata["allowed_push_host"] = "https://rubygems.org"
|
33
33
|
|
@@ -38,7 +38,7 @@ Gem::Specification.new do |spec|
|
|
38
38
|
# Specify which files should be added to the gem when it is released.
|
39
39
|
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
40
40
|
spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
|
41
|
-
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
41
|
+
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features|.shopify-build|.github)/}) }
|
42
42
|
end
|
43
43
|
spec.bindir = "exe"
|
44
44
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
@@ -47,4 +47,5 @@ Gem::Specification.new do |spec|
|
|
47
47
|
spec.add_dependency('minitest', '~> 5.12')
|
48
48
|
spec.add_dependency('redis', '>= 5.0.6', '< 6')
|
49
49
|
spec.add_dependency('sorbet-runtime')
|
50
|
+
spec.add_dependency('rexml')
|
50
51
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: minitest-distributed
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Willem van Bergen
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-09-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: minitest
|
@@ -58,6 +58,20 @@ dependencies:
|
|
58
58
|
- - ">="
|
59
59
|
- !ruby/object:Gem::Version
|
60
60
|
version: '0'
|
61
|
+
- !ruby/object:Gem::Dependency
|
62
|
+
name: rexml
|
63
|
+
requirement: !ruby/object:Gem::Requirement
|
64
|
+
requirements:
|
65
|
+
- - ">="
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: '0'
|
68
|
+
type: :runtime
|
69
|
+
prerelease: false
|
70
|
+
version_requirements: !ruby/object:Gem::Requirement
|
71
|
+
requirements:
|
72
|
+
- - ">="
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: '0'
|
61
75
|
description: |
|
62
76
|
minitest-distributed is a plugin for minitest for executing tests on a
|
63
77
|
distributed set of unreliable workers.
|
@@ -80,12 +94,10 @@ executables: []
|
|
80
94
|
extensions: []
|
81
95
|
extra_rdoc_files: []
|
82
96
|
files:
|
83
|
-
- ".github/ISSUE_TEMPLATE/bug_report.md"
|
84
|
-
- ".github/dependabot.yml"
|
85
|
-
- ".github/workflows/ruby.yml"
|
86
97
|
- ".gitignore"
|
87
98
|
- ".rubocop.yml"
|
88
99
|
- ".rubocop_todo.yml"
|
100
|
+
- ".ruby-version"
|
89
101
|
- CODEOWNERS
|
90
102
|
- CODE_OF_CONDUCT.md
|
91
103
|
- Gemfile
|
@@ -157,7 +169,7 @@ metadata:
|
|
157
169
|
allowed_push_host: https://rubygems.org
|
158
170
|
homepage_uri: https://github.com/Shopify/minitest-distributed
|
159
171
|
source_code_uri: https://github.com/Shopify/minitest-distributed
|
160
|
-
post_install_message:
|
172
|
+
post_install_message:
|
161
173
|
rdoc_options: []
|
162
174
|
require_paths:
|
163
175
|
- lib
|
@@ -165,15 +177,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
165
177
|
requirements:
|
166
178
|
- - ">="
|
167
179
|
- !ruby/object:Gem::Version
|
168
|
-
version: 2.
|
180
|
+
version: 2.7.0
|
169
181
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
170
182
|
requirements:
|
171
183
|
- - ">="
|
172
184
|
- !ruby/object:Gem::Version
|
173
185
|
version: '0'
|
174
186
|
requirements: []
|
175
|
-
rubygems_version: 3.
|
176
|
-
signing_key:
|
187
|
+
rubygems_version: 3.5.18
|
188
|
+
signing_key:
|
177
189
|
specification_version: 4
|
178
190
|
summary: Distributed test executor plugin for Minitest
|
179
191
|
test_files: []
|
@@ -1,43 +0,0 @@
|
|
1
|
-
---
|
2
|
-
name: Bug report
|
3
|
-
about: Create a report to help us improve
|
4
|
-
title: "[BUG]"
|
5
|
-
labels: bug
|
6
|
-
assignees: ''
|
7
|
-
|
8
|
-
---
|
9
|
-
|
10
|
-
**Describe the issue**
|
11
|
-
A clear and concise description of the issue you're facing.
|
12
|
-
|
13
|
-
**To Reproduce**
|
14
|
-
Steps to reproduce the behaviour:
|
15
|
-
1. Go to '...'
|
16
|
-
2. Click on '....'
|
17
|
-
3. Scroll down to '....'
|
18
|
-
4. See error
|
19
|
-
|
20
|
-
**Expected behaviour**
|
21
|
-
A clear and concise description of what you expected to happen.
|
22
|
-
|
23
|
-
**Screenshots**
|
24
|
-
If applicable, add screenshots to help explain your problem.
|
25
|
-
|
26
|
-
**What team are you on?**
|
27
|
-
Please provide the name of your team.
|
28
|
-
|
29
|
-
**Helpful links (Logs, Link to Build, Repo, PR etc.)**
|
30
|
-
Please provide any helpful links for investigating the issue.
|
31
|
-
|
32
|
-
**Is there a Slack thread related to this bug?**
|
33
|
-
After submitting this issue, you can use: @spy github issues create_comment repo=minitest-distributed issue_id=$NEW_ISSUE_ID on any relevant Slack threads to save that information here.
|
34
|
-
|
35
|
-
**Additional context**
|
36
|
-
Add any other context about the problem here.
|
37
|
-
|
38
|
-
If possible, assign appropriate severity level, priority (high, medium, low) and difficulty (easy, normal, difficult) labels to the issue.
|
39
|
-
SEV-1 <24-72h - Critical issue that actively impacts multiple users/products.
|
40
|
-
SEV-2 <14 days - Limited impact app or major inconvenience to app users, workarounds available.
|
41
|
-
SEV-3 <60 days - Minor issue requiring action, but not affecting a users ability to use the app.
|
42
|
-
SEV-4 <180 days - Minimal impact but something the team wants to fix eventually.
|
43
|
-
SEV-5 No timeline - Cosmetic issue or bugs, no effect on user's ability to use tooling.
|
data/.github/dependabot.yml
DELETED
@@ -1,20 +0,0 @@
|
|
1
|
-
version: 2
|
2
|
-
registries:
|
3
|
-
rubygems-server-pkgs-shopify-io:
|
4
|
-
type: rubygems-server
|
5
|
-
url: https://pkgs.shopify.io
|
6
|
-
username: ${{secrets.RUBYGEMS_SERVER_PKGS_SHOPIFY_IO_USERNAME}}
|
7
|
-
password: ${{secrets.RUBYGEMS_SERVER_PKGS_SHOPIFY_IO_PASSWORD}}
|
8
|
-
github-com:
|
9
|
-
type: git
|
10
|
-
url: https://github.com
|
11
|
-
username: ${{secrets.DEPENDENCIES_GITHUB_USER}}
|
12
|
-
password: ${{secrets.DEPENDENCIES_GITHUB_TOKEN}}
|
13
|
-
updates:
|
14
|
-
- package-ecosystem: bundler
|
15
|
-
directory: "/"
|
16
|
-
schedule:
|
17
|
-
interval: daily
|
18
|
-
open-pull-requests-limit: 100
|
19
|
-
insecure-external-code-execution: allow
|
20
|
-
registries: "*"
|
data/.github/workflows/ruby.yml
DELETED
@@ -1,111 +0,0 @@
|
|
1
|
-
# This workflow uses actions that are not certified by GitHub.
|
2
|
-
# They are provided by a third-party and are governed by
|
3
|
-
# separate terms of service, privacy policy, and support
|
4
|
-
# documentation.
|
5
|
-
# This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
|
6
|
-
# For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
|
7
|
-
|
8
|
-
name: Ruby
|
9
|
-
|
10
|
-
on: push
|
11
|
-
|
12
|
-
jobs:
|
13
|
-
test_32:
|
14
|
-
runs-on: shopify-ubuntu-latest
|
15
|
-
container: ruby:3.2
|
16
|
-
|
17
|
-
services:
|
18
|
-
redis:
|
19
|
-
image: redis
|
20
|
-
toxiproxy:
|
21
|
-
image: ghcr.io/shopify/toxiproxy:2.5.0
|
22
|
-
|
23
|
-
steps:
|
24
|
-
- uses: actions/checkout@v2
|
25
|
-
- name: Install dependencies
|
26
|
-
run: gem install bundler && bundle install
|
27
|
-
- name: Run tests
|
28
|
-
run: bin/rake test
|
29
|
-
env:
|
30
|
-
REDIS_URL: redis://toxiproxy:22220
|
31
|
-
TOXIPROXY_HOST: http://toxiproxy:8474
|
32
|
-
|
33
|
-
test_31:
|
34
|
-
runs-on: shopify-ubuntu-latest
|
35
|
-
container: ruby:3.1
|
36
|
-
|
37
|
-
services:
|
38
|
-
redis:
|
39
|
-
image: redis
|
40
|
-
toxiproxy:
|
41
|
-
image: ghcr.io/shopify/toxiproxy:2.5.0
|
42
|
-
|
43
|
-
steps:
|
44
|
-
- uses: actions/checkout@v2
|
45
|
-
- name: Install dependencies
|
46
|
-
run: gem install bundler && bundle install
|
47
|
-
- name: Run tests
|
48
|
-
run: bin/rake test
|
49
|
-
env:
|
50
|
-
REDIS_URL: redis://toxiproxy:22220
|
51
|
-
TOXIPROXY_HOST: http://toxiproxy:8474
|
52
|
-
|
53
|
-
test_30:
|
54
|
-
runs-on: shopify-ubuntu-latest
|
55
|
-
container: ruby:3.0
|
56
|
-
|
57
|
-
services:
|
58
|
-
redis:
|
59
|
-
image: redis
|
60
|
-
toxiproxy:
|
61
|
-
image: ghcr.io/shopify/toxiproxy:2.5.0
|
62
|
-
|
63
|
-
steps:
|
64
|
-
- uses: actions/checkout@v2
|
65
|
-
- name: Install dependencies
|
66
|
-
run: gem install bundler && bundle install
|
67
|
-
- name: Run tests
|
68
|
-
run: bin/rake test
|
69
|
-
env:
|
70
|
-
REDIS_URL: redis://toxiproxy:22220
|
71
|
-
TOXIPROXY_HOST: http://toxiproxy:8474
|
72
|
-
|
73
|
-
test_27:
|
74
|
-
runs-on: shopify-ubuntu-latest
|
75
|
-
container: ruby:2.7
|
76
|
-
|
77
|
-
services:
|
78
|
-
redis:
|
79
|
-
image: redis
|
80
|
-
toxiproxy:
|
81
|
-
image: ghcr.io/shopify/toxiproxy:2.5.0
|
82
|
-
|
83
|
-
steps:
|
84
|
-
- uses: actions/checkout@v2
|
85
|
-
- name: Install dependencies
|
86
|
-
run: gem install bundler && bundle install
|
87
|
-
- name: Run tests
|
88
|
-
run: bin/rake test
|
89
|
-
env:
|
90
|
-
REDIS_URL: redis://toxiproxy:22220
|
91
|
-
TOXIPROXY_HOST: http://toxiproxy:8474
|
92
|
-
|
93
|
-
typecheck:
|
94
|
-
runs-on: shopify-ubuntu-latest
|
95
|
-
container: ruby:2.7
|
96
|
-
steps:
|
97
|
-
- uses: actions/checkout@v2
|
98
|
-
- name: Install dependencies
|
99
|
-
run: gem install bundler && bundle install
|
100
|
-
- name: Typecheck Ruby code
|
101
|
-
run: bin/srb tc
|
102
|
-
|
103
|
-
lint:
|
104
|
-
runs-on: shopify-ubuntu-latest
|
105
|
-
container: ruby:3.2
|
106
|
-
steps:
|
107
|
-
- uses: actions/checkout@v2
|
108
|
-
- name: Install dependencies
|
109
|
-
run: gem install bundler && bundle install
|
110
|
-
- name: Lint Ruby code
|
111
|
-
run: bin/rubocop
|