From 7a2988cfeca396e6bc35ddeba55746660124ab1a Mon Sep 17 00:00:00 2001 From: Paul Keen <125715+pftg@users.noreply.github.com> Date: Mon, 24 Aug 2026 21:12:59 +0200 Subject: [PATCH] ci: re-measure the JRuby retry budget, which the suite had outgrown `jruby-10.0/rails80` timed out on master run 32763256451 and took the whole run red. Tests were still printing dots when SIGTERM landed, so the cell was SLOW, not hung -- and the same cell had passed the previous three runs. The 15-minute per-attempt budget was sized from run 32643567648, where a clean JRuby attempt was 545-713s: "~26% headroom over the slowest", as the comment says. That measurement is stale. Re-measured on run 32758898367, the last green one before this bit: rails71 652s rails81 740s rails80 870s rails72 881s <- against a 900s cap The suite grew from 646 to 757 runs in between (#274, #277, #278, #279, #283), and the headroom went with it: 881/900 is 2%. The cells have been passing by seconds, which is why this looked stable for three runs and then was not. 20 minutes restores the ~26% margin this was originally sized for, and the job cap follows to keep the arithmetic true: 1 + 20 + 20 = 41. Both numbers move together on purpose -- a per-attempt timeout that does not fit the cap kills the last attempt mid-run and reports `cancelled`, which reads as an absence rather than a failure. MRI is unchanged: 128s against 3 minutes. Costs nothing on a green run; it is a ceiling, not a sleep. --- .github/workflows/test.yml | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 127fb05a..441ec8cf 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -110,8 +110,8 @@ jobs: runs-on: ubuntu-latest # Must fit `max_attempts * timeout_minutes` below, plus ~1 min of setup, # or the last attempt gets killed mid-run and the cell reports `cancelled` - # -- a dead gate. JRuby: 1 + 15 + 15 = 31. MRI: 1 + 3 + 3 = 7, under 8. - timeout-minutes: ${{ contains(matrix.ruby-version, 'jruby') && 31 || 8 }} + # -- a dead gate. JRuby: 1 + 20 + 20 = 41. MRI: 1 + 3 + 3 = 7, under 8. + timeout-minutes: ${{ contains(matrix.ruby-version, 'jruby') && 41 || 8 }} continue-on-error: ${{ matrix.experimental }} strategy: matrix: @@ -170,10 +170,20 @@ jobs: - name: Run tests (with 1 retry) uses: nick-fields/retry@v4 with: - # Measured on master run 32643567648: a clean JRuby attempt is - # 545-713s depending on the gemfile, so 15 min is ~26% headroom over - # the slowest. MRI is 128s against 3 min. - timeout_minutes: ${{ contains(matrix.ruby-version, 'jruby') && 15 || 3 }} + # Re-measured on master run 32758898367 (the last green one before + # the budget bit): a clean JRuby attempt is now 652-881s, not the + # 545-713s this was set from on run 32643567648. The suite grew from + # 646 to 757 runs in between, so 881s against a 900s cap left 2% + # headroom, and the jruby-10.0/rails80 cell duly timed out on run + # 32763256451 -- with tests still printing dots when SIGTERM landed, + # so it was slow, not hung. + # + # 20 min restores ~26% over the slowest attempt, which is the margin + # this was originally sized for. MRI is 128s against 3 min and does + # not move. If JRuby ever exceeds this again, re-measure and raise + # BOTH numbers -- a per-attempt timeout that does not fit the job cap + # reports `cancelled`, which reads as an absence rather than a fail. + timeout_minutes: ${{ contains(matrix.ruby-version, 'jruby') && 20 || 3 }} # Two, not three. A third attempt never fit inside the job cap on # either engine (JRuby 3x15=45 > 25; MRI 3x3=9 > 8), so it only ever # got killed partway and reported the cell as `cancelled`. Keeping