selective-ruby-core 0.2.10-x86_64-darwin → 0.2.12-x86_64-darwin
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 +4 -4
- data/lib/selective/ruby/core/controller.rb +28 -12
- data/lib/selective/ruby/core/version.rb +1 -1
- metadata +3 -4
- data/selective-ruby-core.gemspec +0 -53
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7f54f2621b205e964433815442565d037ef78986a54737428b8f0d6e3ee3355a
|
|
4
|
+
data.tar.gz: 260bf58127f3ef069c7ee05d5205cfd37aeb80da0a9b87bfcfa738941607836f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8c455c51511a7e6ce78248131495b2c8391210363f9f8e6bd51f56e46f8bbc642c6081852b63ebba5861e4888d73a8251ec16a7d189f09e2ec90955ae9cc3814
|
|
7
|
+
data.tar.gz: 7c2db057bc1d5f60af2899ced92fd56742adbc51b2dd60cd2ccb08885a745be219ddd3abfd1eabbf9b4c2484dfddec4aca02da8664859eeef86fe97eb5dcb7d2
|
|
@@ -29,15 +29,19 @@ module Selective
|
|
|
29
29
|
@retries = 0
|
|
30
30
|
end
|
|
31
31
|
|
|
32
|
+
# A lost connection is retried by looping here, not by calling start
|
|
33
|
+
# again from inside the rescue clause. Everything a reconnected runner
|
|
34
|
+
# does -- the rest of the run, the close, the framework's after_run
|
|
35
|
+
# hooks -- would otherwise run inside that clause, where `$!` is still
|
|
36
|
+
# the ConnectionLostError. SimpleCov's after_run hook reads that as the
|
|
37
|
+
# run having crashed and exits 1, so every CI shard whose connection
|
|
38
|
+
# dropped once failed with no failing test.
|
|
32
39
|
def start(reconnect: false)
|
|
33
|
-
|
|
34
|
-
|
|
40
|
+
loop do
|
|
41
|
+
break if connect_and_run(reconnect: reconnect)
|
|
35
42
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
run_main_loop
|
|
39
|
-
rescue ConnectionLostError
|
|
40
|
-
retry!
|
|
43
|
+
reconnect = true
|
|
44
|
+
end
|
|
41
45
|
rescue => e
|
|
42
46
|
with_error_handling { raise e }
|
|
43
47
|
end
|
|
@@ -106,7 +110,22 @@ module Selective
|
|
|
106
110
|
end
|
|
107
111
|
end
|
|
108
112
|
|
|
109
|
-
|
|
113
|
+
# One connection: true when the run finished on it, false when it was
|
|
114
|
+
# lost and the caller should reconnect.
|
|
115
|
+
def connect_and_run(reconnect:)
|
|
116
|
+
@pipe = NamedPipe.new("/tmp/#{runner_id}_2", "/tmp/#{runner_id}_1")
|
|
117
|
+
@transport_pid = spawn_transport_process(reconnect: reconnect)
|
|
118
|
+
|
|
119
|
+
handle_termination_signals(transport_pid)
|
|
120
|
+
wait_for_connectivity
|
|
121
|
+
run_main_loop
|
|
122
|
+
true
|
|
123
|
+
rescue ConnectionLostError
|
|
124
|
+
prepare_retry!
|
|
125
|
+
false
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
def prepare_retry!
|
|
110
129
|
@retries += 1
|
|
111
130
|
|
|
112
131
|
with_error_handling { raise "Too many retries" } if retries > 10
|
|
@@ -116,7 +135,6 @@ module Selective
|
|
|
116
135
|
kill_transport
|
|
117
136
|
|
|
118
137
|
pipe.reset!
|
|
119
|
-
start(reconnect: true)
|
|
120
138
|
end
|
|
121
139
|
|
|
122
140
|
def write(data)
|
|
@@ -238,10 +256,8 @@ module Selective
|
|
|
238
256
|
def handle_termination_signals(pid)
|
|
239
257
|
["INT", "TERM"].each do |signal|
|
|
240
258
|
Signal.trap(signal) do
|
|
241
|
-
# :nocov:
|
|
242
259
|
kill_transport(signal: signal)
|
|
243
|
-
exit
|
|
244
|
-
# :nocov:
|
|
260
|
+
exit(runner.exit_status)
|
|
245
261
|
end
|
|
246
262
|
end
|
|
247
263
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: selective-ruby-core
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.12
|
|
5
5
|
platform: x86_64-darwin
|
|
6
6
|
authors:
|
|
7
7
|
- Benjamin Wood
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: exe
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2026-
|
|
12
|
+
date: 2026-10-07 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: logger
|
|
@@ -71,7 +71,6 @@ files:
|
|
|
71
71
|
- lib/selective/ruby/core/test_map/tree.rb
|
|
72
72
|
- lib/selective/ruby/core/test_map/uploader.rb
|
|
73
73
|
- lib/selective/ruby/core/version.rb
|
|
74
|
-
- selective-ruby-core.gemspec
|
|
75
74
|
homepage: https://www.selective.ci
|
|
76
75
|
licenses:
|
|
77
76
|
- MIT
|
|
@@ -94,7 +93,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
94
93
|
- !ruby/object:Gem::Version
|
|
95
94
|
version: '0'
|
|
96
95
|
requirements: []
|
|
97
|
-
rubygems_version: 3.
|
|
96
|
+
rubygems_version: 3.4.10
|
|
98
97
|
signing_key:
|
|
99
98
|
specification_version: 4
|
|
100
99
|
summary: Selective Ruby Client Core
|
data/selective-ruby-core.gemspec
DELETED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
require_relative "lib/selective/ruby/core/version"
|
|
4
|
-
|
|
5
|
-
Gem::Specification.new do |spec|
|
|
6
|
-
spec.name = "selective-ruby-core"
|
|
7
|
-
spec.version = Selective::Ruby::Core::VERSION
|
|
8
|
-
spec.authors = ["Benjamin Wood", "Nate Vick"]
|
|
9
|
-
spec.email = ["ben@hint.io", "nate@hint.io"]
|
|
10
|
-
spec.license = "MIT"
|
|
11
|
-
|
|
12
|
-
# Currently supported release platforms are:
|
|
13
|
-
# Linux: x86_64-linux, aarch64-linux
|
|
14
|
-
# MacOS: x86_64-darwin, arm64-darwin
|
|
15
|
-
if (platform = ENV["RELEASE_PLATFORM"])
|
|
16
|
-
spec.platform = platform
|
|
17
|
-
end
|
|
18
|
-
|
|
19
|
-
spec.summary = "Selective Ruby Client Core"
|
|
20
|
-
spec.description = "Selective is an intelligent test runner for your current CI provider. Get real-time test results, intelligent ordering based on code changes, shorter run times, automatic flake detection, the ability to re-enqueue failed tests, and more."
|
|
21
|
-
spec.homepage = "https://www.selective.ci"
|
|
22
|
-
spec.required_ruby_version = ">= 2.6.0"
|
|
23
|
-
|
|
24
|
-
spec.metadata["homepage_uri"] = spec.homepage
|
|
25
|
-
spec.metadata["source_code_uri"] = "http://github.com/selectiveci/selective-ruby-core"
|
|
26
|
-
spec.metadata["changelog_uri"] = "https://github.com/selectiveci/selective-ruby-core/blob/main/CHANGELOG.md"
|
|
27
|
-
|
|
28
|
-
# Specify which files should be added to the gem when it is released.
|
|
29
|
-
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
|
30
|
-
spec.files = Dir.chdir(__dir__) do
|
|
31
|
-
`git ls-files -z`.split("\x0").reject do |f|
|
|
32
|
-
(File.expand_path(f) == __FILE__) || f.start_with?(*%w[bin/ test/ spec/ features/ log/ .git .circleci appveyor .rspec .ruby-version .standard.yml README.md CHANGELOG.md CODE_OF_CONDUCT.md Gemfile])
|
|
33
|
-
end
|
|
34
|
-
end
|
|
35
|
-
|
|
36
|
-
# Add the transport binary
|
|
37
|
-
unless ENV["RELEASE_PLATFORM"].nil?
|
|
38
|
-
spec.files << "lib/bin/transport"
|
|
39
|
-
end
|
|
40
|
-
|
|
41
|
-
# The optional test map tracer. extconf.rb writes a no-op Makefile when it
|
|
42
|
-
# can't build (no compiler, unsupported Ruby), so installation never fails
|
|
43
|
-
# because of it; the runner then reports it can't record.
|
|
44
|
-
spec.extensions = ["ext/selective_tracer/extconf.rb"]
|
|
45
|
-
|
|
46
|
-
spec.bindir = "exe"
|
|
47
|
-
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
|
|
48
|
-
spec.require_paths = ["lib"]
|
|
49
|
-
|
|
50
|
-
# Uncomment to register a new dependency of your gem
|
|
51
|
-
spec.add_dependency("logger", "~> 1.6")
|
|
52
|
-
spec.add_dependency("zeitwerk", "~> 2.6.12")
|
|
53
|
-
end
|