turbo_tests2 4.0.0 → 4.0.2

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: 7e14a9905e357ba16f5489987c5fc3638078587c35f232443698a02961cacd21
4
- data.tar.gz: 9ea2481ca612f26d150e8514f6ccf12a758d49080a6ddd545a05f558a76dfe9a
3
+ metadata.gz: 228bed7ab0e4351de54e0f608908be78ba8b582cad720fbe6eff5d7745d56b34
4
+ data.tar.gz: 882db3a7ad95ba80466c3221c7d1f83decefd2dc230b625ac99ebbbba7afcf48
5
5
  SHA512:
6
- metadata.gz: 86f70203dd5f5ea3824dbc3ef6acae6b4f469ec4b2c7798e4e6e0c847316a51fb7883a61885df45acc09b01d26373416c381b5632b82e9c27c1dd50d5be03bf5
7
- data.tar.gz: 6ae7d9b0015581bda3e25ee998593becab94daffc2806039e52dc22b73bceb57d3117b95be595380ee9c9bd4db427321aa47cc8971600890256d63e0891fa6f0
6
+ metadata.gz: d6b15078cee04b9068a6659e2d61e922ecec475eec5b0c4280e435b2aed840886ab9192cf3a71cedfac90c7db0ff8073e6ffaa5ee11c4bf971d1ff78ea431f52
7
+ data.tar.gz: 65e8b9524de510125b3f2eb02b1a67f8f4628e4c176568182eba7d39d2d18d794a7232f8b08553992acd763442535714833687621012d3261a6b2eedea08af3a
checksums.yaml.gz.sig CHANGED
Binary file
data/CHANGELOG.md CHANGED
@@ -30,6 +30,55 @@ Please file a bug if you notice a violation of semantic versioning.
30
30
 
31
31
  ### Security
32
32
 
33
+ ## [4.0.2] - 2026-11-14
34
+
35
+ - TAG: [v4.0.2][4.0.2t]
36
+ - COVERAGE: 96.04% -- 1115/1161 lines in 12 files
37
+ - BRANCH COVERAGE: 82.83% -- 304/367 branches in 12 files
38
+ - 36.67% documented
39
+
40
+ ### Added
41
+
42
+ - Opt-in `KETTLE_TEST_EVENTS=1` live `test_progress` NDJSON events (throttled ticks, immediate failure events, final) emitted from the parent process via `Kettle::Ndjson::TestProgress` (kettle-ndjson >= 0.1.24)
43
+
44
+ ### Changed
45
+
46
+ - [kc] kettle-jem/prepare: updated 5 project files:
47
+ - dependencies (5)
48
+
49
+ - [kc] kettle-jem/template: updated 4 project files:
50
+ - code and tests (1)
51
+ - documentation (1)
52
+ - other (1)
53
+ - workflows (1)
54
+
55
+ ## [4.0.1] - 2026-11-10
56
+
57
+ - TAG: [v4.0.1][4.0.1t]
58
+ - COVERAGE: 95.15% -- 1099/1155 lines in 12 files
59
+ - BRANCH COVERAGE: 84.12% -- 302/359 branches in 12 files
60
+ - 36.67% documented
61
+
62
+ ### Changed
63
+
64
+ - [kc] kettle-jem/prepare: updated 24 project files:
65
+ - configuration (1)
66
+ - dependencies (23)
67
+ - [kc] kettle-jem/template: updated 37 project files:
68
+ - code and tests (3)
69
+ - dependencies (8)
70
+ - documentation (1)
71
+ - other (5)
72
+ - workflows (20)
73
+
74
+ ### Added
75
+
76
+ - Stall diagnostics: the watchdog report now has one line per worker (pid, whether it exited, examples finished, age of its last message, last finished example, open groups, and `/proc` state on Linux). Each worker also dumps every thread's backtrace to a private duplicate of stderr when no example finishes for half the watchdog time; `TURBO_TESTS2_STACK_DUMP_SECONDS` overrides the delay and `0` disables it. (#58, #61)
77
+
78
+ ### Fixed
79
+
80
+ - A worker's exit message is no longer skipped when reader teardown raises. Force-closing a pipe under a blocked reader raises `Errno::EBADF` on TruffleRuby (`IOError` on MRI); the readers now rescue `SystemCallError` too, and the exit message is queued in an `ensure`. This caused a rare indefinite stall on TruffleRuby 33.0. (#58, #59)
81
+
33
82
  ## [4.0.0] - 2026-10-15
34
83
 
35
84
  - TAG: [v4.0.0][4.0.0t]
@@ -371,10 +420,6 @@ Please file a bug if you notice a violation of semantic versioning.
371
420
  missing canonical version spec when a project only has shim namespace version
372
421
  specs.
373
422
 
374
- - kettle-jem-template-20260729-001 - Generated JRuby 9.4 workflows now use the
375
- legacy manual bundle install path, avoiding setup-time Bundler full-index
376
- failures against `gem.coop`.
377
-
378
423
  - kettle-jem-template-20260730-001 - Gemspec package file enumeration now runs
379
424
  relative to the gemspec directory, so packaged template assets are included
380
425
  even when the gemspec is loaded from another working directory.
@@ -791,7 +836,11 @@ Please file a bug if you notice a violation of semantic versioning.
791
836
 
792
837
  - Initial release
793
838
 
794
- [Unreleased]: https://github.com/galtzo-floss/turbo_tests2/compare/v4.0.0...HEAD
839
+ [Unreleased]: https://github.com/galtzo-floss/turbo_tests2/compare/v4.0.2...HEAD
840
+ [4.0.2]: https://github.com/galtzo-floss/turbo_tests2/compare/v4.0.1...v4.0.2
841
+ [4.0.2t]: https://github.com/galtzo-floss/turbo_tests2/releases/tag/v4.0.2
842
+ [4.0.1]: https://github.com/galtzo-floss/turbo_tests2/compare/v4.0.0...v4.0.1
843
+ [4.0.1t]: https://github.com/galtzo-floss/turbo_tests2/releases/tag/v4.0.1
795
844
  [4.0.0]: https://github.com/galtzo-floss/turbo_tests2/compare/v3.2.17...v4.0.0
796
845
  [4.0.0t]: https://github.com/galtzo-floss/turbo_tests2/releases/tag/v4.0.0
797
846
  [3.2.17]: https://github.com/galtzo-floss/turbo_tests2/compare/v3.2.16...v3.2.17
data/README.md CHANGED
@@ -97,8 +97,8 @@ Finished in 2 minute 25.15 seconds (files took 0 seconds to load)
97
97
 
98
98
  | Tokens to Remember | [![Gem name][⛳️name-img]][⛳️gem-name] [![Gem namespace][⛳️namespace-img]][⛳️gem-namespace] |
99
99
  |-------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
100
- | Works with JRuby | [![JRuby 9.2 Compat][💎jruby-9.2i]][🚎jruby-9.2-wf] [![JRuby 9.3 Compat][💎jruby-9.3i]][🚎jruby-9.3-wf] <br/> [![JRuby 9.4 Compat][💎jruby-9.4i]][🚎jruby-9.4-wf] [![JRuby 10.0 Compat][💎jruby-10.0i]][🚎jruby-10.0-wf] [![JRuby current Compat][💎jruby-c-i]][🚎10-j-wf] [![JRuby HEAD Compat][💎jruby-headi]][🚎3-hd-wf]|
101
- | Works with Truffle Ruby | [![Truffle Ruby 23.1 Compat][💎truby-23.1i]][🚎truby-23.1-wf] <br/> [![Truffle Ruby 24.2 Compat][💎truby-24.2i]][🚎truby-24.2-wf] [![Truffle Ruby 25.0 Compat][💎truby-25.0i]][🚎truby-25.0-wf] [![Truffle Ruby 33.0 Compat][💎truby-33.0i]][🚎truby-33.0-wf] [![Truffle Ruby current Compat][💎truby-c-i]][🚎9-t-wf]|
100
+ | Works with JRuby | [![JRuby 10.0 Compat][💎jruby-10.0i]][🚎jruby-10.0-wf] [![JRuby current Compat][💎jruby-c-i]][🚎10-j-wf] [![JRuby HEAD Compat][💎jruby-headi]][🚎3-hd-wf]|
101
+ | Works with Truffle Ruby | [![Truffle Ruby 33.0 Compat][💎truby-33.0i]][🚎truby-33.0-wf] [![Truffle Ruby current Compat][💎truby-c-i]][🚎9-t-wf]|
102
102
  | Works with MRI Ruby 4 | [![Ruby current Compat][💎ruby-c-i]][🚎11-c-wf] [![Ruby HEAD Compat][💎ruby-headi]][🚎3-hd-wf]|
103
103
  | Works with MRI Ruby 3 | [![Ruby 3.0 Compat][💎ruby-3.0i]][🚎ruby-3.0-wf] [![Ruby 3.1 Compat][💎ruby-3.1i]][🚎ruby-3.1-wf] [![Ruby 3.2 Compat][💎ruby-3.2i]][🚎ruby-3.2-wf] [![Ruby 3.3 Compat][💎ruby-3.3i]][🚎ruby-3.3-wf] [![Ruby 3.4 Compat][💎ruby-3.4i]][🚎ruby-3.4-wf]|
104
104
  | Works with MRI Ruby 2 | [![Ruby 2.4 Compat][💎ruby-2.4i]][🚎ruby-2.4-wf] [![Ruby 2.5 Compat][💎ruby-2.5i]][🚎ruby-2.5-wf] [![Ruby 2.6 Compat][💎ruby-2.6i]][🚎ruby-2.6-wf] [![Ruby 2.7 Compat][💎ruby-2.7i]][🚎ruby-2.7-wf]|
@@ -112,11 +112,12 @@ Finished in 2 minute 25.15 seconds (files took 0 seconds to load)
112
112
 
113
113
  ### Compatibility
114
114
 
115
- Compatible with MRI Ruby 2.4.0+, JRuby, and TruffleRuby.
115
+ The gem's declared runtime compatibility floor is MRI Ruby 2.4.0+, with concordant releases of JRuby and TruffleRuby.
116
116
  CI workflows and Appraisals are generated for MRI Ruby 2.4+.
117
- This test floor is configured by `ruby.test_minimum` in `.kettle-jem.yml` and
118
- may be higher than the gem's runtime compatibility floor when legacy Rubies are
119
- not practical for the current toolchain.
117
+ The current MRI CI lane runs on Linux and macOS.
118
+ The test floor is configured by `ruby.test_minimum` in `.kettle-jem.yml`.
119
+ When it is higher than the runtime floor, older runtime-compatible Rubies are
120
+ not covered by the generated CI or Appraisal matrix.
120
121
 
121
122
  <a href="https://github.com/kettle-dev"><img alt="kettle-dev Logo by Aboling0, CC BY-SA 4.0" src="https://logos.galtzo.com/assets/images/kettle-dev/avatar-128px.svg" width="14%" align="right"/></a>
122
123
 
@@ -137,23 +138,6 @@ The _amazing_ test matrix is powered by the kettle-dev stack.
137
138
 
138
139
  </details>
139
140
 
140
- ### Runtime and Platform Support
141
-
142
- Support tiers describe what this project's CI actually exercises, not what may
143
- work in an untested environment:
144
-
145
- - **Parallel support**: CI runs the test suite with multiple workers available.
146
- - **Unsupported**: the engine/platform combination is not covered by CI and is
147
- not a project compatibility claim.
148
-
149
- | Ruby engine/version | Linux | macOS | Windows | Notes |
150
- |---------------------|-------|-------|---------|-------|
151
- | MRI 3.1-3.4 | Parallel support | Unsupported | Unsupported | Versioned Ruby workflows run on Linux. |
152
- | MRI current | Parallel support | Parallel support | Unsupported | Current Ruby workflow covers the declared OS platforms. |
153
- | MRI head | Parallel support | Unsupported | Unsupported | CI is allowed to fail while Ruby is in development. |
154
- | JRuby (all CI lanes) | Parallel support | Unsupported | Unsupported | Engine workflows run on Linux; macOS and Windows are not exercised by CI. |
155
- | TruffleRuby (all CI lanes) | Parallel support | Unsupported | Unsupported | Never shipped a Windows build (zero Windows assets across 66 releases scanned 2026-10-10); setup-ruby hard-fails ([source](https://github.com/ruby/setup-ruby/blob/master/README.md)) |
156
-
157
141
  ### Federated DVCS
158
142
 
159
143
  <details markdown="1">
@@ -169,29 +153,12 @@ work in an untested environment:
169
153
 
170
154
  ### Enterprise Support
171
155
 
172
- [![Tidelift](https://tidelift.com/badges/package/rubygems/turbo_tests2)](https://tidelift.com/subscription/pkg/rubygems-turbo_tests2?utm_source=rubygems-turbo_tests2&utm_medium=referral&utm_campaign=readme)
173
-
174
- Available as part of the Tidelift Subscription.
175
-
176
- <details markdown="1">
177
- <summary>Need enterprise-level guarantees?</summary>
156
+ For enterprise support from the maintainer, use [Upwork][👨🏼‍🏫expsup-upwork] or [CodeMentor][👨🏼‍🏫expsup-codementor].
178
157
 
179
- The maintainers of this and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source packages you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact packages you use.
180
-
181
- [![Get help from me on Tidelift][🏙️entsup-tidelift-img]][🏙️entsup-tidelift]
182
-
183
- - 💡Subscribe for support guarantees covering _all_ your FLOSS dependencies
184
- - 💡Tidelift is part of [Sonar][🏙️entsup-tidelift-sonar]
185
- - 💡Tidelift pays maintainers to maintain the software you depend on!<br/>📊`@`Pointy Haired Boss: An [enterprise support][🏙️entsup-tidelift] subscription is "[never gonna let you down][🧮kloc]", and *supports* open source maintainers
186
-
187
- Alternatively:
158
+ Other support channels:
188
159
 
189
160
  - [![Ruby Users Forum][✉️ruby-forum-img]][✉️ruby-forum]
190
161
  - [![Live Chat on Discord][✉️discord-invite-img-ftb]][✉️discord-invite]
191
- - [![Get help from me on Upwork][👨🏼‍🏫expsup-upwork-img]][👨🏼‍🏫expsup-upwork]
192
- - [![Get help from me on Codementor][👨🏼‍🏫expsup-codementor-img]][👨🏼‍🏫expsup-codementor]
193
-
194
- </details>
195
162
 
196
163
  ## ✨ Installation
197
164
 
@@ -482,6 +449,31 @@ Notes:
482
449
  bundle exec turbo_tests2 -r fuubar -f Fuubar spec/whatever
483
450
  ```
484
451
 
452
+ ### Live test progress events
453
+
454
+ Opt-in, off by default. Set `KETTLE_TEST_EVENTS=1` (also `true`/`yes`/`on`) and the
455
+ `turbo_tests2` parent process aggregates every worker's results and writes
456
+ [kettle-ndjson](https://github.com/kettle-dev/kettle-ndjson) `test_progress` events,
457
+ one JSON object per line, to stdout. It never emits one event per example.
458
+
459
+ ```json
460
+ {"kind":"tick","source":"turbo_tests2","examples":120,"failures":1,"pending":2,"elapsed":8.31,"type":"test_progress","event_version":1}
461
+ {"kind":"failure","source":"turbo_tests2","examples":57,"failures":1,"pending":0,"elapsed":4.02,"location":"./spec/a_spec.rb:3","description":"A fails","type":"test_progress","event_version":1}
462
+ ```
463
+
464
+ | Field | Meaning |
465
+ | --- | --- |
466
+ | `type` | always `test_progress` |
467
+ | `event_version` | `1` |
468
+ | `kind` | `tick` (throttled, at most 1/s), `failure` (immediate, one per failed example), `final` (once, at end) |
469
+ | `source` | `turbo_tests2` (the `kettle-test` formatter emits `kettle-test`) |
470
+ | `examples`, `failures`, `pending` | running totals across all workers |
471
+ | `elapsed` | seconds since the run started (float) |
472
+ | `location`, `description` | `failure` only: example location and full description |
473
+
474
+ `KETTLE_TEST_EVENTS_INTERVAL` (seconds, default `1`) tunes the tick throttle. Each event is
475
+ preceded by a newline so it starts on its own line even amid progress dots.
476
+
485
477
  ### Rake Hooks
486
478
 
487
479
  If Rake and a Rakefile are present, the CLI will invoke the tasks `turbo_tests2:setup` and
@@ -562,19 +554,18 @@ We welcome both individual and corporate sponsors! We also offer a
562
554
  wide array of funding channels to account for your preferences.
563
555
  Currently, [Open Collective][🖇osc] is our preferred funding platform.
564
556
 
557
+ ### Corporate Sponsorship
558
+
565
559
  **If you're working in a company that's making significant use of galtzo-floss tools we'd
566
560
  appreciate it if you suggest to your company to become a galtzo-floss sponsor.**
567
561
 
562
+ ### Individual Support
563
+
568
564
  You can support the development of galtzo-floss tools via
569
565
  [GitHub Sponsors][🖇sponsor],
570
566
  [Liberapay][⛳liberapay],
571
- [PayPal][🖇paypal],
572
- [Open Collective][🖇osc]
573
- and [Tidelift][🏙️entsup-tidelift].
574
-
575
- | 📍 NOTE |
576
- |----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
577
- | If doing a sponsorship in the form of donation is problematic for your company <br/> from an accounting standpoint, we'd recommend the use of Tidelift, <br/> where you can get a support-like subscription instead. |
567
+ [Open Collective][🖇osc],
568
+ and [PayPal][🖇paypal].
578
569
 
579
570
  ### Open Collective for Individuals
580
571
 
@@ -661,7 +652,7 @@ For most applications, prefer the [Pessimistic Version Constraint][📌pvc] with
661
652
  For example:
662
653
 
663
654
  ```ruby
664
- spec.add_dependency("turbo_tests2", "~> 3.0")
655
+ spec.add_dependency("turbo_tests2", "~> 4.0")
665
656
  ```
666
657
 
667
658
  <details markdown="1">
@@ -800,9 +791,6 @@ Thanks for RTFM. ☺️
800
791
  [👨🏼‍🏫expsup-upwork-img]: https://img.shields.io/badge/UpWork-13544E?style=for-the-badge&logo=Upwork&logoColor=white
801
792
  [👨🏼‍🏫expsup-codementor]: https://www.codementor.io/peterboling?utm_source=github&utm_medium=button&utm_term=peterboling&utm_campaign=github
802
793
  [👨🏼‍🏫expsup-codementor-img]: https://img.shields.io/badge/CodeMentor-Get_Help-1abc9c?style=for-the-badge&logo=CodeMentor&logoColor=white
803
- [🏙️entsup-tidelift]: https://tidelift.com/subscription/pkg/rubygems-turbo_tests2?utm_source=rubygems-turbo_tests2&utm_medium=referral&utm_campaign=readme
804
- [🏙️entsup-tidelift-img]: https://img.shields.io/badge/Tidelift_and_Sonar-Enterprise_Support-FD3456?style=for-the-badge&logo=sonar&logoColor=white
805
- [🏙️entsup-tidelift-sonar]: https://blog.tidelift.com/tidelift-joins-sonar
806
794
  [💁🏼‍♂️peterboling]: http://www.peterboling.com
807
795
  [🚂railsbling]: http://www.railsbling.com
808
796
  [📜src-gl-img]: https://img.shields.io/badge/GitLab-FBA326?style=for-the-badge&logo=Gitlab&logoColor=orange
@@ -838,13 +826,7 @@ Thanks for RTFM. ☺️
838
826
  [🚎ruby-3.2-wf]: https://github.com/galtzo-floss/turbo_tests2/actions/workflows/ruby-3.2.yml
839
827
  [🚎ruby-3.3-wf]: https://github.com/galtzo-floss/turbo_tests2/actions/workflows/ruby-3.3.yml
840
828
  [🚎ruby-3.4-wf]: https://github.com/galtzo-floss/turbo_tests2/actions/workflows/ruby-3.4.yml
841
- [🚎jruby-9.2-wf]: https://github.com/galtzo-floss/turbo_tests2/actions/workflows/jruby-9.2.yml
842
- [🚎jruby-9.3-wf]: https://github.com/galtzo-floss/turbo_tests2/actions/workflows/jruby-9.3.yml
843
- [🚎jruby-9.4-wf]: https://github.com/galtzo-floss/turbo_tests2/actions/workflows/jruby-9.4.yml
844
829
  [🚎jruby-10.0-wf]: https://github.com/galtzo-floss/turbo_tests2/actions/workflows/jruby-10.0.yml
845
- [🚎truby-23.1-wf]: https://github.com/galtzo-floss/turbo_tests2/actions/workflows/truffleruby-23.1.yml
846
- [🚎truby-24.2-wf]: https://github.com/galtzo-floss/turbo_tests2/actions/workflows/truffleruby-24.2.yml
847
- [🚎truby-25.0-wf]: https://github.com/galtzo-floss/turbo_tests2/actions/workflows/truffleruby-25.0.yml
848
830
  [🚎truby-33.0-wf]: https://github.com/galtzo-floss/turbo_tests2/actions/workflows/truffleruby-33.0.yml
849
831
  [🚎2-cov-wf]: https://github.com/galtzo-floss/turbo_tests2/actions/workflows/coverage.yml
850
832
  [🚎2-cov-wfi]: https://github.com/galtzo-floss/turbo_tests2/actions/workflows/coverage.yml/badge.svg
@@ -877,14 +859,8 @@ Thanks for RTFM. ☺️
877
859
  [💎ruby-3.4i]: https://img.shields.io/badge/Ruby-3.4-CC342D?style=for-the-badge&logo=ruby&logoColor=white
878
860
  [💎ruby-c-i]: https://img.shields.io/badge/Ruby-current-CC342D?style=for-the-badge&logo=ruby&logoColor=green
879
861
  [💎ruby-headi]: https://img.shields.io/badge/Ruby-HEAD-CC342D?style=for-the-badge&logo=ruby&logoColor=blue
880
- [💎truby-23.1i]: https://img.shields.io/badge/Truffle_Ruby-23.1-34BCB1?style=for-the-badge&logo=ruby&logoColor=pink
881
- [💎truby-24.2i]: https://img.shields.io/badge/Truffle_Ruby-24.2-34BCB1?style=for-the-badge&logo=ruby&logoColor=pink
882
- [💎truby-25.0i]: https://img.shields.io/badge/Truffle_Ruby-25.0-34BCB1?style=for-the-badge&logo=ruby&logoColor=pink
883
862
  [💎truby-33.0i]: https://img.shields.io/badge/Truffle_Ruby-33.0-34BCB1?style=for-the-badge&logo=ruby&logoColor=pink
884
863
  [💎truby-c-i]: https://img.shields.io/badge/Truffle_Ruby-current-34BCB1?style=for-the-badge&logo=ruby&logoColor=green
885
- [💎jruby-9.2i]: https://img.shields.io/badge/JRuby-9.2-FBE742?style=for-the-badge&logo=ruby&logoColor=red
886
- [💎jruby-9.3i]: https://img.shields.io/badge/JRuby-9.3-FBE742?style=for-the-badge&logo=ruby&logoColor=red
887
- [💎jruby-9.4i]: https://img.shields.io/badge/JRuby-9.4-FBE742?style=for-the-badge&logo=ruby&logoColor=red
888
864
  [💎jruby-10.0i]: https://img.shields.io/badge/JRuby-10.0-FBE742?style=for-the-badge&logo=ruby&logoColor=red
889
865
  [💎jruby-c-i]: https://img.shields.io/badge/JRuby-current-FBE742?style=for-the-badge&logo=ruby&logoColor=green
890
866
  [💎jruby-headi]: https://img.shields.io/badge/JRuby-HEAD-FBE742?style=for-the-badge&logo=ruby&logoColor=blue
@@ -914,7 +890,7 @@ Thanks for RTFM. ☺️
914
890
  [📌gitmoji]: https://gitmoji.dev
915
891
  [📌gitmoji-img]: https://img.shields.io/badge/gitmoji_commits-%20%F0%9F%98%9C%20%F0%9F%98%8D-34495e.svg?style=flat-square
916
892
  [🧮kloc]: https://www.youtube.com/watch?v=dQw4w9WgXcQ
917
- [🧮kloc-img]: https://img.shields.io/badge/KLOC-1.077-FFDD67.svg?style=for-the-badge&logo=YouTube&logoColor=blue
893
+ [🧮kloc-img]: https://img.shields.io/badge/KLOC-1.161-FFDD67.svg?style=for-the-badge&logo=YouTube&logoColor=blue
918
894
  [🔐security]: https://github.com/galtzo-floss/turbo_tests2/blob/main/SECURITY.md
919
895
  [🔐security-img]: https://img.shields.io/badge/security-policy-259D6C.svg?style=flat
920
896
  [📄copyright-notice-explainer]: https://opensource.stackexchange.com/questions/5778/why-do-licenses-such-as-the-mit-license-specify-a-single-year
@@ -944,5 +920,5 @@ Thanks for RTFM. ☺️
944
920
  | Homepage | https://github.com/galtzo-floss/turbo_tests2 |
945
921
  | Source | https://github.com/galtzo-floss/turbo_tests2 |
946
922
  | License | `MIT` |
947
- | Funding | https://github.com/sponsors/pboling, https://ko-fi.com/pboling, https://liberapay.com/pboling/donate, https://opencollective.com/galtzo-floss, https://thanks.dev/u/gh/pboling, https://tidelift.com/funding/github/rubygems/turbo_tests2, https://www.buymeacoffee.com/pboling |
923
+ | Funding | https://github.com/sponsors/pboling, https://ko-fi.com/pboling, https://liberapay.com/pboling/donate, https://opencollective.com/galtzo-floss, https://thanks.dev/u/gh/pboling, https://www.buymeacoffee.com/pboling |
948
924
  <!-- kettle-jem:metadata:end -->
@@ -30,6 +30,7 @@ module TurboTests
30
30
  self,
31
31
  :start,
32
32
  :close,
33
+ :example_started,
33
34
  :example_failed,
34
35
  :example_passed,
35
36
  :example_pending,
@@ -45,9 +46,77 @@ module TurboTests
45
46
 
46
47
  def initialize(output)
47
48
  @output = output
49
+ @current_example = nil
50
+ @last_progress = Process.clock_gettime(Process::CLOCK_MONOTONIC)
51
+ end
52
+
53
+ def example_started(notification)
54
+ @current_example = notification.example.location
55
+ touch_progress
56
+ end
57
+
58
+ # When no example finishes for a long time the parent's watchdog can only
59
+ # say "silent". The worker is the only one that can say where it is stuck,
60
+ # so dump every thread's backtrace to stderr (which the parent surfaces)
61
+ # once per stall, at half the watchdog. Disabled when the watchdog is.
62
+ def start_stall_dumper
63
+ threshold = stall_dump_seconds
64
+ return unless threshold.positive?
65
+
66
+ # Specs routinely silence or swap $stderr (silent_stream reopens the fd),
67
+ # which would swallow the dump exactly when a spec hangs inside such a
68
+ # block. Keep our own duplicate of the original stderr.
69
+ @stall_io = begin
70
+ $stderr.dup
71
+ rescue
72
+ $stderr
73
+ end
74
+ # rubocop:disable ThreadSafety/NewThread -- watchdog helper thread, one per worker process.
75
+ @stall_dumper = Thread.new do
76
+ Thread.current.report_on_exception = false
77
+ dumped = false
78
+ loop do
79
+ sleep([threshold / 4.0, 1.0].max)
80
+ idle = Process.clock_gettime(Process::CLOCK_MONOTONIC) - @last_progress
81
+ if idle < threshold
82
+ dumped = false
83
+ elsif !dumped
84
+ dumped = true
85
+ dump_stall(idle)
86
+ end
87
+ end
88
+ end
89
+ # rubocop:enable ThreadSafety/NewThread
90
+ end
91
+
92
+ def dump_stall(idle)
93
+ lines = ["turbo_tests2 worker #{ENV["TEST_ENV_NUMBER"].inspect} pid #{Process.pid}: " \
94
+ "no example finished for #{idle.round}s; current example: #{@current_example.inspect}"]
95
+ Thread.list.each do |thread|
96
+ lines << "--- #{thread.inspect}"
97
+ lines.concat(Array(thread.backtrace).map { |frame| " #{frame}" })
98
+ end
99
+ @stall_io.puts(lines.join("\n"))
100
+ @stall_io.flush
101
+ rescue
102
+ nil
103
+ end
104
+
105
+ def stall_dump_seconds
106
+ explicit = ENV["TURBO_TESTS2_STACK_DUMP_SECONDS"]
107
+ return Float(explicit) if explicit
108
+
109
+ Float(ENV.fetch("TURBO_TESTS2_WATCHDOG_SECONDS", "900")) / 2
110
+ rescue ArgumentError
111
+ 0.0
112
+ end
113
+
114
+ def touch_progress
115
+ @last_progress = Process.clock_gettime(Process::CLOCK_MONOTONIC)
48
116
  end
49
117
 
50
118
  def start(notification)
119
+ start_stall_dumper
51
120
  output_row(
52
121
  type: :load_summary,
53
122
  summary: load_summary_to_json(notification)
@@ -69,6 +138,7 @@ module TurboTests
69
138
  end
70
139
 
71
140
  def example_passed(notification)
141
+ touch_progress
72
142
  output_row(
73
143
  type: :example_passed,
74
144
  example: example_to_json(notification.example)
@@ -76,6 +146,7 @@ module TurboTests
76
146
  end
77
147
 
78
148
  def example_pending(notification)
149
+ touch_progress
79
150
  output_row(
80
151
  type: :example_pending,
81
152
  example: example_to_json(notification.example)
@@ -83,6 +154,7 @@ module TurboTests
83
154
  end
84
155
 
85
156
  def example_failed(notification)
157
+ touch_progress
86
158
  output_row(
87
159
  type: :example_failed,
88
160
  example: example_to_json(notification.example)
@@ -97,6 +169,7 @@ module TurboTests
97
169
  end
98
170
 
99
171
  def close(_notification)
172
+ @stall_dumper&.kill
100
173
  output_row(
101
174
  type: :close
102
175
  )
@@ -4,6 +4,7 @@ require "json"
4
4
  require "timeout"
5
5
  require "fileutils"
6
6
  require "runtime_groups"
7
+ require "kettle/ndjson"
7
8
  require "rspec/core"
8
9
  require "shellwords"
9
10
  require "tempfile"
@@ -250,6 +251,7 @@ module TurboTests
250
251
  @nice = opts[:nice]
251
252
  @use_runtime_info = opts[:use_runtime_info]
252
253
 
254
+ @progress = Kettle::Ndjson::TestProgress.from_env(io: $stdout, source: "turbo_tests2")
253
255
  @load_time = 0
254
256
  @load_count = 0
255
257
  @failure_count = 0
@@ -524,7 +526,7 @@ module TurboTests
524
526
  stdout.each_line do |line|
525
527
  parse_worker_stdout_line(line, output_id, process_id)
526
528
  end
527
- rescue IOError
529
+ rescue IOError, SystemCallError
528
530
  nil
529
531
  end
530
532
 
@@ -555,9 +557,18 @@ module TurboTests
555
557
  # is a deduped fallback for a stdout reader that was force-stopped
556
558
  # before reaching EOF, and being in ensure also prevents a hang if
557
559
  # wait_thr.value raises.
558
- drain_worker_readers(stdout_thread, stdout, stderr_thread, stderr)
559
- @messages << {type: "exit", process_id: process_id}
560
- untrack_parallel_pid(wait_thr.pid, pid_file_path)
560
+ begin
561
+ drain_worker_readers(stdout_thread, stdout, stderr_thread, stderr)
562
+ rescue
563
+ # Thread#join re-raises a dead reader's exception. Teardown
564
+ # errors must never skip the exit message below: with no exit
565
+ # message handle_messages blocks forever (watchdog 0) or until
566
+ # the watchdog fires.
567
+ nil
568
+ ensure
569
+ @messages << {type: "exit", process_id: process_id}
570
+ untrack_parallel_pid(wait_thr.pid, pid_file_path)
571
+ end
561
572
  end
562
573
  end
563
574
  # rubocop:enable ThreadSafety/NewThread
@@ -592,7 +603,10 @@ module TurboTests
592
603
  rescue EOFError
593
604
  close_io(src)
594
605
  break
595
- rescue IOError
606
+ rescue IOError, SystemCallError
607
+ # SystemCallError: closing a pipe under a blocked read raises
608
+ # IOError on MRI but Errno::EBADF on TruffleRuby. An unrescued
609
+ # exception here is re-raised by Thread#join in the waiter.
596
610
  break
597
611
  else
598
612
  append_worker_output(process_id, stream, msg)
@@ -836,9 +850,73 @@ module TurboTests
836
850
  (@tests_in_groups || []).each_with_index do |group, idx|
837
851
  lines << "group #{idx + 1}: #{Array(group).join(", ")}" unless group.nil?
838
852
  end
853
+ lines.concat(worker_progress_lines)
839
854
  lines.join("\n")
840
855
  end
841
856
 
857
+ # Per-worker view of a stall: which worker is silent, what it last did,
858
+ # and what the OS says about its process. The group list above cannot
859
+ # say which worker hung or which example it was running.
860
+ def record_worker_progress(message)
861
+ process_id = message[:process_id]
862
+ return unless process_id.is_a?(Integer)
863
+
864
+ now = Process.clock_gettime(Process::CLOCK_MONOTONIC)
865
+ progress = (@worker_progress ||= {})[process_id] ||= {finished: 0, groups: []}
866
+ progress[:last_type] = message[:type]
867
+ progress[:last_at] = now
868
+ case message[:type]
869
+ when "group_started"
870
+ progress[:groups].push(message.dig(:group, :group, :description))
871
+ when "group_finished"
872
+ progress[:groups].pop
873
+ when "example_passed", "example_failed", "example_pending"
874
+ progress[:finished] += 1
875
+ progress[:last_example] = message.dig(:example, :location)
876
+ when "exit"
877
+ progress[:exited] = true
878
+ end
879
+ end
880
+
881
+ def worker_progress_lines
882
+ now = Process.clock_gettime(Process::CLOCK_MONOTONIC)
883
+ (1..(@num_processes || 0)).flat_map do |process_id|
884
+ progress = (@worker_progress || {})[process_id]
885
+ pid = worker_pid(process_id)
886
+ detail = if progress
887
+ "#{progress[:exited] ? "exited" : "no exit message"}; #{progress[:finished]} example(s) finished; " \
888
+ "last message #{progress[:last_type]} #{(now - progress[:last_at]).round}s ago; " \
889
+ "last finished example #{progress[:last_example].inspect}; " \
890
+ "open groups #{progress[:groups].inspect}"
891
+ else
892
+ "no messages received"
893
+ end
894
+ ["worker #{process_id} (pid #{pid.inspect}): #{detail}", *proc_state_lines(pid)]
895
+ end
896
+ end
897
+
898
+ def worker_pid(process_id)
899
+ @wait_threads&.at(process_id - 1)&.pid
900
+ rescue
901
+ nil
902
+ end
903
+
904
+ # Linux only; best effort. State "S" with a wchan like futex/poll_schedule
905
+ # is a blocked process, "R" is spinning, "Z" is a zombie, and a missing
906
+ # /proc entry means the worker is gone (OOM kill or crash).
907
+ def proc_state_lines(pid)
908
+ return [] unless pid
909
+
910
+ dir = "/proc/#{pid}"
911
+ return [" /proc/#{pid}: missing (process is gone)"] unless File.directory?(dir)
912
+
913
+ status = File.read("#{dir}/status").lines.grep(/\A(State|Threads|VmRSS|VmHWM):/).map(&:strip).join(" ")
914
+ wchan = File.read("#{dir}/wchan").strip
915
+ [" /proc/#{pid}: #{status}; wchan=#{wchan}"]
916
+ rescue
917
+ []
918
+ end
919
+
842
920
  def tracked_pids
843
921
  path = parallel_pid_file_path
844
922
  return [] unless path && File.file?(path)
@@ -880,6 +958,7 @@ module TurboTests
880
958
  warned_silence = false
881
959
  loop do
882
960
  message = pop_message_with_watchdog
961
+ record_worker_progress(message)
883
962
  unless warned_silence
884
963
  silence = Process.clock_gettime(Process::CLOCK_MONOTONIC) - @last_message_monotonic
885
964
  if silence >= 900
@@ -900,6 +979,7 @@ module TurboTests
900
979
  when "example_passed"
901
980
  example = FakeExample.from_obj(message[:example])
902
981
  @reporter.example_passed(example)
982
+ @progress&.record(:passed)
903
983
  when "group_started"
904
984
  @reporter.group_started(message[:group].to_struct)
905
985
  when "group_finished"
@@ -907,6 +987,7 @@ module TurboTests
907
987
  when "example_pending"
908
988
  example = FakeExample.from_obj(message[:example])
909
989
  @reporter.example_pending(example)
990
+ @progress&.record(:pending)
910
991
  when "load_summary"
911
992
  message = message[:summary]
912
993
  # NOTE: notifications order and content is not guaranteed hence the fetch
@@ -915,6 +996,11 @@ module TurboTests
915
996
  when "example_failed"
916
997
  example = FakeExample.from_obj(message[:example])
917
998
  @reporter.example_failed(example)
999
+ @progress&.record(
1000
+ :failed,
1001
+ location: message[:example][:location],
1002
+ description: message[:example][:full_description]
1003
+ )
918
1004
  @failure_count += 1
919
1005
  if fail_fast_met
920
1006
  report_unfinished_groups("Groups stopped by fail-fast")
@@ -955,6 +1041,7 @@ module TurboTests
955
1041
  $stdout.flush
956
1042
  end
957
1043
 
1044
+ @progress&.finish
958
1045
  flush_deferred_run_options_messages
959
1046
  rescue Interrupt
960
1047
  end
@@ -4,7 +4,7 @@ module TurboTests
4
4
  # Version namespace for this gem.
5
5
  module Version
6
6
  # Current gem version.
7
- VERSION = "4.0.0"
7
+ VERSION = "4.0.2"
8
8
  end
9
9
  # Current gem version exposed at the traditional constant location.
10
10
  VERSION = Version::VERSION # Traditional Constant Location
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: turbo_tests2
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.0
4
+ version: 4.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Illia
@@ -48,6 +48,26 @@ cert_chain:
48
48
  -----END CERTIFICATE-----
49
49
  date: 1980-01-02 00:00:00.000000000 Z
50
50
  dependencies:
51
+ - !ruby/object:Gem::Dependency
52
+ name: kettle-ndjson
53
+ requirement: !ruby/object:Gem::Requirement
54
+ requirements:
55
+ - - "~>"
56
+ - !ruby/object:Gem::Version
57
+ version: '0.1'
58
+ - - ">="
59
+ - !ruby/object:Gem::Version
60
+ version: 0.1.24
61
+ type: :runtime
62
+ prerelease: false
63
+ version_requirements: !ruby/object:Gem::Requirement
64
+ requirements:
65
+ - - "~>"
66
+ - !ruby/object:Gem::Version
67
+ version: '0.1'
68
+ - - ">="
69
+ - !ruby/object:Gem::Version
70
+ version: 0.1.24
51
71
  - !ruby/object:Gem::Dependency
52
72
  name: rspec
53
73
  requirement: !ruby/object:Gem::Requirement
@@ -71,7 +91,7 @@ dependencies:
71
91
  version: '0.1'
72
92
  - - ">="
73
93
  - !ruby/object:Gem::Version
74
- version: 0.1.3
94
+ version: 0.1.5
75
95
  type: :runtime
76
96
  prerelease: false
77
97
  version_requirements: !ruby/object:Gem::Requirement
@@ -81,7 +101,7 @@ dependencies:
81
101
  version: '0.1'
82
102
  - - ">="
83
103
  - !ruby/object:Gem::Version
84
- version: 0.1.3
104
+ version: 0.1.5
85
105
  - !ruby/object:Gem::Dependency
86
106
  name: version_gem
87
107
  requirement: !ruby/object:Gem::Requirement
@@ -91,7 +111,7 @@ dependencies:
91
111
  version: '1.1'
92
112
  - - ">="
93
113
  - !ruby/object:Gem::Version
94
- version: 1.1.15
114
+ version: 1.1.17
95
115
  type: :runtime
96
116
  prerelease: false
97
117
  version_requirements: !ruby/object:Gem::Requirement
@@ -101,7 +121,7 @@ dependencies:
101
121
  version: '1.1'
102
122
  - - ">="
103
123
  - !ruby/object:Gem::Version
104
- version: 1.1.15
124
+ version: 1.1.17
105
125
  - !ruby/object:Gem::Dependency
106
126
  name: kettle-dev
107
127
  requirement: !ruby/object:Gem::Requirement
@@ -111,7 +131,7 @@ dependencies:
111
131
  version: '3.1'
112
132
  - - ">="
113
133
  - !ruby/object:Gem::Version
114
- version: 3.1.12
134
+ version: 3.1.28
115
135
  type: :development
116
136
  prerelease: false
117
137
  version_requirements: !ruby/object:Gem::Requirement
@@ -121,7 +141,7 @@ dependencies:
121
141
  version: '3.1'
122
142
  - - ">="
123
143
  - !ruby/object:Gem::Version
124
- version: 3.1.12
144
+ version: 3.1.28
125
145
  - !ruby/object:Gem::Dependency
126
146
  name: bundler-audit
127
147
  requirement: !ruby/object:Gem::Requirement
@@ -179,7 +199,7 @@ dependencies:
179
199
  version: '0.1'
180
200
  - - ">="
181
201
  - !ruby/object:Gem::Version
182
- version: 0.1.3
202
+ version: 0.1.5
183
203
  type: :development
184
204
  prerelease: false
185
205
  version_requirements: !ruby/object:Gem::Requirement
@@ -189,7 +209,7 @@ dependencies:
189
209
  version: '0.1'
190
210
  - - ">="
191
211
  - !ruby/object:Gem::Version
192
- version: 0.1.3
212
+ version: 0.1.5
193
213
  - !ruby/object:Gem::Dependency
194
214
  name: appraisal2
195
215
  requirement: !ruby/object:Gem::Requirement
@@ -199,7 +219,7 @@ dependencies:
199
219
  version: '3.2'
200
220
  - - ">="
201
221
  - !ruby/object:Gem::Version
202
- version: 3.2.5
222
+ version: 3.2.6
203
223
  type: :development
204
224
  prerelease: false
205
225
  version_requirements: !ruby/object:Gem::Requirement
@@ -209,7 +229,7 @@ dependencies:
209
229
  version: '3.2'
210
230
  - - ">="
211
231
  - !ruby/object:Gem::Version
212
- version: 3.2.5
232
+ version: 3.2.6
213
233
  - !ruby/object:Gem::Dependency
214
234
  name: kettle-test
215
235
  requirement: !ruby/object:Gem::Requirement
@@ -219,7 +239,7 @@ dependencies:
219
239
  version: '2.0'
220
240
  - - ">="
221
241
  - !ruby/object:Gem::Version
222
- version: 2.0.25
242
+ version: 2.0.29
223
243
  type: :development
224
244
  prerelease: false
225
245
  version_requirements: !ruby/object:Gem::Requirement
@@ -229,7 +249,7 @@ dependencies:
229
249
  version: '2.0'
230
250
  - - ">="
231
251
  - !ruby/object:Gem::Version
232
- version: 2.0.25
252
+ version: 2.0.29
233
253
  - !ruby/object:Gem::Dependency
234
254
  name: ruby-progressbar
235
255
  requirement: !ruby/object:Gem::Requirement
@@ -253,7 +273,7 @@ dependencies:
253
273
  version: '1.0'
254
274
  - - ">="
255
275
  - !ruby/object:Gem::Version
256
- version: 1.0.9
276
+ version: 1.0.10
257
277
  type: :development
258
278
  prerelease: false
259
279
  version_requirements: !ruby/object:Gem::Requirement
@@ -263,7 +283,7 @@ dependencies:
263
283
  version: '1.0'
264
284
  - - ">="
265
285
  - !ruby/object:Gem::Version
266
- version: 1.0.9
286
+ version: 1.0.10
267
287
  - !ruby/object:Gem::Dependency
268
288
  name: gitmoji-regex
269
289
  requirement: !ruby/object:Gem::Requirement
@@ -273,7 +293,7 @@ dependencies:
273
293
  version: '2.0'
274
294
  - - ">="
275
295
  - !ruby/object:Gem::Version
276
- version: 2.0.15
296
+ version: 2.0.16
277
297
  type: :development
278
298
  prerelease: false
279
299
  version_requirements: !ruby/object:Gem::Requirement
@@ -283,7 +303,7 @@ dependencies:
283
303
  version: '2.0'
284
304
  - - ">="
285
305
  - !ruby/object:Gem::Version
286
- version: 2.0.15
306
+ version: 2.0.16
287
307
  description: "\U0001F680 turbo_tests2` is an RSpec parallel test runner. It uses runtime_groups
288
308
  for process counts, pid bookkeeping, file grouping, and runtime balancing, and replaces
289
309
  interleaved worker output with incremental summarized RSpec reporting. Source code
@@ -316,10 +336,10 @@ licenses:
316
336
  - MIT
317
337
  metadata:
318
338
  homepage_uri: https://turbo-tests2.galtzo.com
319
- source_code_uri: https://github.com/galtzo-floss/turbo_tests2/tree/v4.0.0
320
- changelog_uri: https://github.com/galtzo-floss/turbo_tests2/blob/v4.0.0/CHANGELOG.md
339
+ source_code_uri: https://github.com/galtzo-floss/turbo_tests2/tree/v4.0.2
340
+ changelog_uri: https://github.com/galtzo-floss/turbo_tests2/blob/v4.0.2/CHANGELOG.md
321
341
  bug_tracker_uri: https://github.com/galtzo-floss/turbo_tests2/issues
322
- documentation_uri: https://www.rubydoc.info/gems/turbo_tests2/4.0.0
342
+ documentation_uri: https://www.rubydoc.info/gems/turbo_tests2/4.0.2
323
343
  funding_uri: https://github.com/sponsors/pboling
324
344
  wiki_uri: https://github.com/galtzo-floss/turbo_tests2/wiki
325
345
  news_uri: https://www.railsbling.com/tags/turbo_tests2
@@ -350,7 +370,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
350
370
  - !ruby/object:Gem::Version
351
371
  version: '0'
352
372
  requirements: []
353
- rubygems_version: 4.0.20
373
+ rubygems_version: 4.0.24
354
374
  specification_version: 4
355
375
  summary: "\U0001F680 RSpec parallel test runner with incremental summarized output"
356
376
  test_files: []
metadata.gz.sig CHANGED
Binary file