selective-ruby-core 0.2.13-aarch64-linux → 0.2.15-aarch64-linux

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: 99e1923534f9492e5ab7089bbcbcb4f10fb24c6787114cbdda00bc4c1ff6c229
4
- data.tar.gz: a6cf5e5f984cefb398579d5ec61dbf28ffb763ff06b8722c01b3e10507b3a2d9
3
+ metadata.gz: c9974d22eebcd553010313ba9dc86f80a09c6adc76e07c7c0424a5b0962b7117
4
+ data.tar.gz: 20850ba81f3d384dd489431aef3238966a52a1846ee471c0ced07346bec55ab1
5
5
  SHA512:
6
- metadata.gz: 4cda761abd11096fa51aa0dfbb133d7f712a2ebd52ef1c422ef900244398c7bed77c2f074c928e4fc3e4b09ed5b1de48c8593d939cb777784b2a00e712514169
7
- data.tar.gz: aa2b3a4a31803fde5c9ce9d0840f9cf3294dfc385a418c7f344ac82bb75d70ed3cf403e0388623d332a62b2607def19ef00f4eb6085c0eb68ff58267faa248e4
6
+ metadata.gz: 0de54e635db83b9ad888a620ab7f9e1d23edb9d66c4bbaf784be5e1478ddf2577957cbc6c435eb48ceccb856a5f4ca975a37c72d1aa82f777ad7309793cdf573
7
+ data.tar.gz: 5ddb306660b2040a047a9b5a084d63179fb2d4e40bdd84474aa81673d81b273ba24bc96cf093e08bf1492fcbd8cea19024c2f11dc4d3472a35dca3c89ec8c181
data/lib/bin/transport CHANGED
Binary file
@@ -10,6 +10,8 @@ module Selective
10
10
  @@selective_suppress_reporting = false
11
11
  @@report_at_finish = {}
12
12
 
13
+ TERMINATION_REPORT_GRACE = 0.25
14
+
13
15
  REQUIRED_CONFIGURATION = {
14
16
  "host" => "SELECTIVE_HOST",
15
17
  "api_key" => "SELECTIVE_API_KEY",
@@ -256,12 +258,30 @@ module Selective
256
258
  def handle_termination_signals(pid)
257
259
  ["INT", "TERM"].each do |signal|
258
260
  Signal.trap(signal) do
261
+ report_termination(signal)
259
262
  kill_transport(signal: signal)
260
263
  exit(runner.exit_status)
261
264
  end
262
265
  end
263
266
  end
264
267
 
268
+ # Tells the server this runner is being stopped on purpose, so a run
269
+ # whose runners all leave this way is recorded as cancelled rather
270
+ # than as runners lost. Best effort: a server that predates the
271
+ # message ignores it, and a dead pipe just means it isn't sent.
272
+ #
273
+ # The transport exits the moment it reads "exit", without draining
274
+ # what it has queued for the socket, so give it a moment to send this
275
+ # first. CI cancellations allow several seconds between TERM and KILL.
276
+ def report_termination(signal)
277
+ return unless pipe
278
+
279
+ write({type: "terminating", data: {signal: signal}})
280
+ sleep(TERMINATION_REPORT_GRACE)
281
+ rescue ConnectionLostError, IOError, SystemCallError
282
+ # Nothing to report to.
283
+ end
284
+
265
285
  def kill_transport(signal: "TERM")
266
286
  begin
267
287
  pipe.write "exit"
@@ -3,7 +3,7 @@
3
3
  module Selective
4
4
  module Ruby
5
5
  module Core
6
- VERSION = "0.2.13"
6
+ VERSION = "0.2.15"
7
7
  end
8
8
  end
9
9
  end
@@ -0,0 +1,53 @@
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.7.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
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.13
4
+ version: 0.2.15
5
5
  platform: aarch64-linux
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-10-08 00:00:00.000000000 Z
12
+ date: 2026-10-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: logger
@@ -71,6 +71,7 @@ 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
74
75
  homepage: https://www.selective.ci
75
76
  licenses:
76
77
  - MIT
@@ -93,7 +94,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
93
94
  - !ruby/object:Gem::Version
94
95
  version: '0'
95
96
  requirements: []
96
- rubygems_version: 3.4.10
97
+ rubygems_version: 3.5.22
97
98
  signing_key:
98
99
  specification_version: 4
99
100
  summary: Selective Ruby Client Core