turbo_tests2 3.2.16 → 3.2.17

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: 0ba760f9553f5ac9180f943b7b6ba4292f8e3ae332c2ee8f93d704fb6df39fd8
4
- data.tar.gz: 308a01984a1da21ef5a1005cd5f333404b8132b6b8b12717f9fcf1e6b213421d
3
+ metadata.gz: 4d0f84a37aeb74853501933d16cd9476a1f82800b3d33e9da544af8ef0e0c145
4
+ data.tar.gz: 581d982f38436235925c6bc8180a4ac29513c198599ae841949e47bce114186f
5
5
  SHA512:
6
- metadata.gz: d15f6b3dc4601510f2fc2785b722b966fe543352a2408f084160e9b0d064fcf020cb234dbcc22b7c03baca495d1a7c87a13d41e24e74084a4bc43b6fe4aec5ac
7
- data.tar.gz: be13e868955aacabb64993bab93050538def66c7c341406b082878d9f06d8c3098c701052f40c1e1a7c36eed026de5bc1c6930c7db42ab2e109a8240944c5d48
6
+ metadata.gz: 9d0f7b4e2080fd36f4da47ff4bdebed7fce369995e9c1b6cb305bc2caf9ad935ec2d65eaa84483721b361c57a12eb24b36fd3d0c5fc0ce16a62638f14df16636
7
+ data.tar.gz: ffc015acc34a5ad4658a2a5aa53ceb02ec6621eea4e625bc1a7d2b6558c1cc728037ad984c32cc52e08108f8c322011dee41926dfdde3400c5c65ae7021c82dc
checksums.yaml.gz.sig CHANGED
Binary file
data/CHANGELOG.md CHANGED
@@ -30,6 +30,19 @@ Please file a bug if you notice a violation of semantic versioning.
30
30
 
31
31
  ### Security
32
32
 
33
+ ## [3.2.17] - 2026-10-14
34
+
35
+ - TAG: [v3.2.17][3.2.17t]
36
+ - COVERAGE: 95.94% -- 993/1035 lines in 11 files
37
+ - BRANCH COVERAGE: 83.86% -- 265/316 branches in 11 files
38
+ - 39.42% documented
39
+
40
+ ### Changed
41
+
42
+ - README: document the spawn-based (fork-free) worker architecture that makes parallel workers engine-portable to JRuby and TruffleRuby, and add a Resource-Constrained CI (JVM Engines) section with the canonical 2-worker + capped-heap + raised-watchdog setup, matching the kettle-jem CI templates
43
+
44
+ - Stall diagnostics and in-code docs now explain silent worker death: the 900s silence warning and the watchdog stall path point at the OOM killer as the most common cause of total silence in a parallel lane (spawned workers, JVM engines defaulting to 1/4 RAM heap each), with the fix inline (TURBO_TESTS2_MAX_PROCESSES=2 + capped heap); start_subprocess and max_processes_from_environment document the spawn-based engine-portable architecture
45
+
33
46
  ## [3.2.16] - 2026-10-14
34
47
 
35
48
  - TAG: [v3.2.16][3.2.16t]
@@ -761,7 +774,9 @@ Please file a bug if you notice a violation of semantic versioning.
761
774
 
762
775
  - Initial release
763
776
 
764
- [Unreleased]: https://github.com/galtzo-floss/turbo_tests2/compare/v3.2.16...HEAD
777
+ [Unreleased]: https://github.com/galtzo-floss/turbo_tests2/compare/v3.2.17...HEAD
778
+ [3.2.17]: https://github.com/galtzo-floss/turbo_tests2/compare/v3.2.16...v3.2.17
779
+ [3.2.17t]: https://github.com/galtzo-floss/turbo_tests2/releases/tag/v3.2.17
765
780
  [3.2.16]: https://github.com/galtzo-floss/turbo_tests2/compare/v3.2.15...v3.2.16
766
781
  [3.2.16t]: https://github.com/galtzo-floss/turbo_tests2/releases/tag/v3.2.16
767
782
  [3.2.15]: https://github.com/galtzo-floss/turbo_tests2/compare/v3.2.14...v3.2.15
data/README.md CHANGED
@@ -384,6 +384,60 @@ count at the number of discovered test groups.
384
384
  Known coverage formatter chatter remains collapsed into the concise coverage
385
385
  summary.
386
386
 
387
+ ### Resource-Constrained CI (JVM Engines)
388
+
389
+ Worker parallelism is spawn-based, not fork-based: each worker is started as a
390
+ real subprocess (`Process.spawn` / `Open3.popen3`), never `Kernel#fork`. That
391
+ makes parallel workers engine-portable — MRI, JRuby, and TruffleRuby all run
392
+ the same spawn-based pool, and the default worker count is the machine's core
393
+ count (`Etc.nprocessors`) on every engine. There is no serial-only mode for
394
+ JVM engines unless you ask for one with `TURBO_TESTS2_MAX_PROCESSES=1`.
395
+
396
+ The cost of that portability on JVM engines is memory: each JRuby or
397
+ TruffleRuby worker is a full JVM subprocess, and JRuby defaults its heap to
398
+ one quarter of machine RAM. On a CI runner, `Etc.nprocessors` workers each
399
+ grabbing a quarter of RAM is a recipe for the kernel's OOM killer, which kills
400
+ workers **silently** — every worker stops messaging at once, and the stall
401
+ watchdog then reports total silence. This is a resource problem, not a
402
+ parallelism problem.
403
+
404
+ The fix is to run fewer, smaller workers. This is the canonical
405
+ resource-constrained setup, and the `kettle-jem` CI templates bake it into
406
+ every JRuby workflow they generate:
407
+
408
+ ```bash
409
+ TURBO_TESTS2_MAX_PROCESSES=2 \
410
+ JRUBY_OPTS="-J-Xmx1280m" \
411
+ TURBO_TESTS2_WATCHDOG_SECONDS=1500 \
412
+ bundle exec turbo_tests2
413
+ ```
414
+
415
+ Or in a GitHub Actions workflow:
416
+
417
+ ```yaml
418
+ env:
419
+ # Fewer, smaller JVM workers on constrained runners.
420
+ TURBO_TESTS2_MAX_PROCESSES: 2
421
+ # Cap each worker JVM's heap (JRuby default: 1/4 of runner RAM).
422
+ JRUBY_OPTS: "-J-Xmx1280m"
423
+ # JVM lanes are slow; give the watchdog room without hitting the job timeout.
424
+ TURBO_TESTS2_WATCHDOG_SECONDS: 1500
425
+ ```
426
+
427
+ Guidance:
428
+
429
+ - **Cap workers** (`TURBO_TESTS2_MAX_PROCESSES=2`) when each worker is a heavy
430
+ process: JVM engines, large test suites, or shared/undersized runners. Two
431
+ JVM workers still roughly halve wall-clock time versus one.
432
+ - **Cap the heap** (`JRUBY_OPTS="-J-Xmx1280m"`, or your engine's equivalent)
433
+ so total memory is bounded regardless of runner size.
434
+ - **Raise the watchdog** (1500s) on slow engines: JIT warmup and heavy GC make
435
+ silence windows longer, and you want the watchdog report, not the provider
436
+ timeout, when something genuinely hangs.
437
+ - The same knobs apply to any engine where a worker process is expensive —
438
+ the principle is: bound `workers × per-worker memory` under the runner's
439
+ capacity.
440
+
387
441
  ### Stall watchdog
388
442
 
389
443
  If the worker message queue goes silent — every worker alive but none
@@ -243,6 +243,16 @@ module TurboTests
243
243
  ]
244
244
  end
245
245
 
246
+ # Inclusive ceiling on the worker pool when neither --count nor --workers
247
+ # is passed. Explicit CLI counts always win. Two main uses:
248
+ #
249
+ # 1. Outer orchestrators (kettle-family) budgeting a machine-wide process
250
+ # pool across concurrent family jobs.
251
+ # 2. Resource-constrained CI, where each worker is an expensive process —
252
+ # JVM engines (JRuby, TruffleRuby) spawn a full JVM per worker, so cap
253
+ # the pool (typically 2) AND the per-worker heap (e.g. JRUBY_OPTS=
254
+ # "-J-Xmx1280m") to stay under runner RAM. See README
255
+ # "Resource-Constrained CI (JVM Engines)".
246
256
  def max_processes_from_environment
247
257
  value = ENV.fetch("TURBO_TESTS2_MAX_PROCESSES", "").strip
248
258
  return if value.empty?
@@ -408,6 +408,14 @@ module TurboTests
408
408
  )
409
409
  end
410
410
 
411
+ # Spawns one worker as a real OS subprocess via Open3.popen3 — never
412
+ # Kernel#fork. This is what makes the worker pool engine-portable: MRI,
413
+ # JRuby, and TruffleRuby all spawn subprocesses the same way, and the
414
+ # default pool size is Etc.nprocessors on every engine. Remember each
415
+ # worker is a full interpreter/VM process: on JVM engines that is a whole
416
+ # JVM with its own heap, so bound the pool (TURBO_TESTS2_MAX_PROCESSES)
417
+ # and the per-worker heap (e.g. JRUBY_OPTS) on memory-constrained
418
+ # runners — see README "Resource-Constrained CI (JVM Engines)".
411
419
  def start_subprocess(env, extra_args, tests, process_id, record_runtime:)
412
420
  if tests.empty?
413
421
  @messages << {
@@ -756,6 +764,14 @@ module TurboTests
756
764
  # on the queue forever — CI jobs hung for hours with no diagnostics.
757
765
  # On a stall we kill the surviving worker pids, report which groups
758
766
  # never finished, and fail the run instead.
767
+ #
768
+ # Note the OOM killer is the most common silent worker death on CI: the
769
+ # kernel kills the process with no stderr, no exit message, and no
770
+ # partial output. Workers are spawn-based real processes (never forked),
771
+ # so on JVM engines (JRuby, TruffleRuby) each one is a full JVM whose
772
+ # default heap can be 1/4 of machine RAM — a core-count pool of those
773
+ # exhausts a CI runner. Bound `workers x per-worker memory` on
774
+ # constrained runners (see README "Resource-Constrained CI").
759
775
  def pop_message_with_watchdog
760
776
  # 0 (the default) disables the watchdog: block indefinitely, exactly the
761
777
  # pre-watchdog behavior.
@@ -856,7 +872,10 @@ module TurboTests
856
872
  "outer process watcher (a CI job timeout, a container orchestrator, or a local supervisor) will then " \
857
873
  "be what eventually ends the run, usually without a useful stall report. A single long test only " \
858
874
  "trips this in serial lanes (TURBO_TESTS2_MAX_PROCESSES=1); in parallel lanes other workers keep " \
859
- "messages flowing."
875
+ "messages flowing. Total silence in a PARALLEL lane usually means workers died rather than slowed " \
876
+ "down — the most common cause is the kernel OOM killer (each worker is a real spawned process; on " \
877
+ "JVM engines each is a full JVM whose default heap is 1/4 of RAM). Cap workers x per-worker memory: " \
878
+ "TURBO_TESTS2_MAX_PROCESSES=2 with a capped heap (e.g. JRUBY_OPTS=\"-J-Xmx1280m\")."
860
879
  )
861
880
  warned_silence = true
862
881
  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 = "3.2.16"
7
+ VERSION = "3.2.17"
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: 3.2.16
4
+ version: 3.2.17
5
5
  platform: ruby
6
6
  authors:
7
7
  - Illia
@@ -316,10 +316,10 @@ licenses:
316
316
  - MIT
317
317
  metadata:
318
318
  homepage_uri: https://turbo-tests2.galtzo.com
319
- source_code_uri: https://github.com/galtzo-floss/turbo_tests2/tree/v3.2.16
320
- changelog_uri: https://github.com/galtzo-floss/turbo_tests2/blob/v3.2.16/CHANGELOG.md
319
+ source_code_uri: https://github.com/galtzo-floss/turbo_tests2/tree/v3.2.17
320
+ changelog_uri: https://github.com/galtzo-floss/turbo_tests2/blob/v3.2.17/CHANGELOG.md
321
321
  bug_tracker_uri: https://github.com/galtzo-floss/turbo_tests2/issues
322
- documentation_uri: https://www.rubydoc.info/gems/turbo_tests2/3.2.16
322
+ documentation_uri: https://www.rubydoc.info/gems/turbo_tests2/3.2.17
323
323
  funding_uri: https://github.com/sponsors/pboling
324
324
  wiki_uri: https://github.com/galtzo-floss/turbo_tests2/wiki
325
325
  news_uri: https://www.railsbling.com/tags/turbo_tests2
metadata.gz.sig CHANGED
Binary file