minitest-mergify 2026.11.8 → 2026.11.9

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: 04fdfe95e806c91a67ec6a2bccddd05578f2a9e432d1ad94a35077195485e59e
4
- data.tar.gz: b90466700c71fff0dab6b9c8e1055d4dc983a106c37a6de377bbba6555e9bae8
3
+ metadata.gz: '06006382c18c6627be5076d545d6d4888060ef6c34f0cfed7c61182fc2c67717'
4
+ data.tar.gz: 8c54b27eb12b252d3e445d26092defd1f7470229390946a7ef0838bbc449af37
5
5
  SHA512:
6
- metadata.gz: b2d5d2ced3a4f0120d288af794287ef7428af57255e06c1d83bac9e49c9a503e1c3576a9ebc1a35892435342f4da26bb82a96b18c2a363c0f0c1194dd5db27fb
7
- data.tar.gz: dde17a9bfdf744ad1ff095a3465b59721d7afcba6cd34e7ea4c575146b308f835eaf6e3291235ea747e4384536fdf0a679ee3ebd979215994858fea0df3b6592
6
+ metadata.gz: b30b2b8e60c9cd21a50f1168883ae05eff2cf31e35bece5a7bef2bea4b3a901d0e15777edbc7c2333155990c59b96a345cde8cef1f7a979ae1436f27025ae74d
7
+ data.tar.gz: 16d9114fb72514da36f17a54c1945121df6affc9e5b1cada3bc289345345b193b9b20fc99db306da221a675c26734b1e63480d2a54b80595a5485be66a887748
data/THIRD_PARTY_LICENSES CHANGED
@@ -8,7 +8,7 @@ The source code of each component is available from the repository listed
8
8
  next to it, as the Mozilla Public License 2.0 requires for the components
9
9
  under it.
10
10
 
11
- Apache License 2.0 (246)
11
+ Apache License 2.0 (247)
12
12
  MIT License (75)
13
13
  Unicode License v3 (19)
14
14
  BSD 3-Clause "New" or "Revised" License (5)
@@ -4886,6 +4886,7 @@ Used by:
4886
4886
  - async-signal 0.2.14 (https://github.com/smol-rs/async-signal)
4887
4887
  - async-task 4.7.1 (https://github.com/smol-rs/async-task)
4888
4888
  - atomic-waker 1.1.2 (https://github.com/smol-rs/atomic-waker)
4889
+ - base64 0.22.1 (https://github.com/marshallpierce/rust-base64)
4889
4890
  - base64 0.23.1 (https://github.com/marshallpierce/rust-base64)
4890
4891
  - bitflags 2.13.1 (https://github.com/bitflags/bitflags)
4891
4892
  - blocking 1.7.0 (https://github.com/smol-rs/blocking)
@@ -86,7 +86,9 @@ module Mergify
86
86
  # The run's suites, as the selection runs them, once the session
87
87
  # prepared its reruns; then test retry's retries and flaky
88
88
  # detection's reruns, which the session keeps from a run that
89
- # stopped, and last the failures test retry held back for them.
89
+ # stopped; then test retry's of the failures held back for flaky
90
+ # detection that it reran not once; and last the failures test retry
91
+ # held back for them.
90
92
  def run_suites(reporter, &)
91
93
  return yield unless @selection
92
94
 
@@ -94,7 +96,13 @@ module Mergify
94
96
  @selection.run(@recorder, &)
95
97
  @retries.settle(@recorder, @selection.names_to_run)
96
98
  @reruns.run(reporter, @recorder)
97
- @recorder.release_held(reporter)
99
+ begin
100
+ @retries.retry_held(reporter)
101
+ ensure
102
+ # Minitest's own reporters get the failures held back whatever
103
+ # came of the retries.
104
+ @recorder.release_held(reporter)
105
+ end
98
106
  end
99
107
 
100
108
  private
@@ -55,7 +55,7 @@ module Mergify
55
55
 
56
56
  recorder.wait_for(@selection.names_to_run)
57
57
  prepare_after(recorder.first_attempts) unless @prepared
58
- plan = @prepared&.shared_repeats
58
+ plan = @prepared&.plan_shared_repeats
59
59
  rerun(plan, reporter) if plan
60
60
  end
61
61
 
@@ -18,7 +18,8 @@ module Mergify
18
18
  # Which failures retry answers for, how many retries a test gets and
19
19
  # within which budget are the session's. A test flaky detection reruns is
20
20
  # retry's to answer for with those reruns, once the suite is over: its
21
- # failure is held back until then.
21
+ # failure is held back until then, and retried then where flaky
22
+ # detection reran it not once.
22
23
  class Retries
23
24
  def initialize(test_run, selection, reruns)
24
25
  @test_run = test_run
@@ -43,13 +44,10 @@ module Mergify
43
44
  prepared = @reruns.prepared
44
45
  return false unless Results.status_of(result) == 'failed' && prepared&.retry_answers_for?(name)
45
46
 
46
- if prepared.grant_retry(name, result.time * 1000)
47
- retry_test(result, name, reporter)
48
- elsif prepared.tracks?(name)
49
- @lock.synchronize { @held[name] = result }
50
- else
51
- return false
52
- end
47
+ return true if retried?(result, name, reporter)
48
+ return false unless prepared.tracks?(name)
49
+
50
+ @lock.synchronize { @held[name] = result }
53
51
  true
54
52
  end
55
53
 
@@ -89,7 +87,16 @@ module Mergify
89
87
  return unless prepared && names.any? { |name| prepared.retry_answers_for?(name) }
90
88
 
91
89
  recorder.wait_for(names)
92
- @lock.synchronize { @changed.wait(@lock) until @retrying.empty? }
90
+ wait_for_retries
91
+ end
92
+
93
+ # The failures held back for flaky detection's reruns that it reran not
94
+ # once, too slow for its budget, once its reruns are over: test retry's
95
+ # to retry now, through Minitest's own dispatch, as the session grants
96
+ # each. Waits until it answered every one.
97
+ def retry_held(reporter)
98
+ @lock.synchronize { @held.dup }.each { |name, result| retried?(result, name, reporter) }
99
+ wait_for_retries
93
100
  end
94
101
 
95
102
  # The failures held back for flaky detection's reruns, once they are
@@ -105,6 +112,21 @@ module Mergify
105
112
 
106
113
  private
107
114
 
115
+ # Whether the session grants the test named `name`, whose attempt
116
+ # failed with `result`, a retry: the test then runs again, its failure
117
+ # held back.
118
+ def retried?(result, name, reporter)
119
+ return false unless @reruns.prepared.grant_retry(name, result.time * 1000)
120
+
121
+ retry_test(result, name, reporter)
122
+ true
123
+ end
124
+
125
+ # Wait until every retry granted ended.
126
+ def wait_for_retries
127
+ @lock.synchronize { @changed.wait(@lock) until @retrying.empty? }
128
+ end
129
+
108
130
  # Hold back the failure `result` of the test named `name`, and run the
109
131
  # test again.
110
132
  def retry_test(result, name, reporter)
@@ -4,6 +4,6 @@ module Mergify
4
4
  module Minitest
5
5
  # Placeholder: the release workflow stamps the real version from the git
6
6
  # tag at build time, as it does for every client in this repository.
7
- VERSION = '2026.11.8'
7
+ VERSION = '2026.11.9'
8
8
  end
9
9
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: minitest-mergify
3
3
  version: !ruby/object:Gem::Version
4
- version: 2026.11.8
4
+ version: 2026.11.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mergify
@@ -35,14 +35,14 @@ dependencies:
35
35
  requirements:
36
36
  - - '='
37
37
  - !ruby/object:Gem::Version
38
- version: 2026.11.8
38
+ version: 2026.11.9
39
39
  type: :runtime
40
40
  prerelease: false
41
41
  version_requirements: !ruby/object:Gem::Requirement
42
42
  requirements:
43
43
  - - '='
44
44
  - !ruby/object:Gem::Version
45
- version: 2026.11.8
45
+ version: 2026.11.9
46
46
  description: 'Minitest integration for Mergify Test Engine: the run reported to CI
47
47
  Insights, test quarantine, Fail First on merge-queue bisection steps, and flaky
48
48
  test detection.'