[GH-ISSUE #6573] [Feature]: Shard the browser regression lanes further so no shard sits at the 30-minute limit #3686

Closed
opened 2026-10-21 06:06:01 +07:00 by bsakaguchi · 0 comments
Owner

Originally created by @kolacheee on GitHub (Sep 23, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/6573

Originally assigned to: @kolacheee on GitHub.

What problem does this solve?

Every browser lane of the Release Regression Matrix (desktop-chromium, mobile-chromium, mobile-webkit) now has its slowest shard at 27 to 29 minutes, against a 30-minute job timeout. On the last five runs (staging pushes and PRs alike), desktop-chromium 4/4 took 28 to 29 minutes every time, and on #6572 it passed all 129 tests in 29.4 minutes and was then cancelled by the timeout a few seconds later. So:

  • PRs wait about 30 minutes for the browser lanes.
  • Any run can fail for no reason other than a slightly slow runner, which looks like a real failure and costs a re-run.

Proposed solution

Shard desktop Chromium and mobile WebKit 10 ways and mobile Chromium 8 ways, instead of 4 each (.github/workflows/playwright.yml). Measured, not guessed: I took every test's duration from the last green run (35871966882, 520 tests per lane) and split them the way --fully-parallel --shard does (contiguous, equal test counts), adding the measured ~2 minutes of setup and server boot per shard. That model reproduces today's slowest shards (30 / 28 / 29 min predicted against 29 / 27 / 28 observed). Its prediction:

Shards per lane Slowest shard: desktop / mobile Chromium / WebKit Browser jobs per run
4 (now) 30 / 28 / 29 min 12
6 23 / 21 / 23 min 18
8 17 / 16 / 20 min 24
10 14 / 13 / 17 min 30

So 10 / 8 / 10 puts the slowest shards at about 14 / 16 / 17 minutes: PR browser checks finish in about 17 minutes instead of about 30, and the 30-minute timeout is a real hang guard again. 6 gains little because the slowest spec files sit together at the end of the list.

Cost: the repository is public, so runner minutes are free. Each extra shard repeats about 2 minutes of setup. A run peaks at about 30 concurrent jobs against the Team plan's 60, so two PR runs at once still fit; a third would queue briefly rather than fail.

Nothing else pins the count: the three fan-in checks keep their names, and none of the browser lanes is a required status check on staging.

Alternatives considered

  • Raise the timeout. Stops the false failures but keeps PRs waiting about 30 minutes.
  • Duration-balanced shards. Playwright 1.63 has no duration weighting for --shard; balancing by hand would mean maintaining a --test-list per shard.
  • More workers per shard. Each shard runs --workers=1 on purpose, because tests share that shard's app servers (#5622).
  • Run browser-independent tests on desktop only, tagging the tests that need the mobile lanes. Measured and declined: of the 410 test definitions, 98 already run on desktop only and 30 are mobile or WebKit only on purpose, and most of the rest measure layout, scrolling, touch, the viewport, screenshots or WebKit behaviour. Moving the others would save 31 to 50 of the mobile lanes' 160 minutes per run, but not PR wait time, because the desktop lane (which keeps every test) is the slowest once sharded, and it would remove mobile coverage from 93 to 132 tests.
  • Fixed sleeps and setup. Sleeps add about 40 seconds per lane and setup about 2 minutes per shard, so neither is where the time goes. Each test does pay about 4 to 5 seconds to load the app from the Vite dev server, but 48 of the 64 spec files import app source from that server, so serving a production build would mean reworking them.

Additional context

Follow-up to the sharding in #5622 and #5637.

Template check

  • I DID NOT read this template and provide the requested details.
Originally created by @kolacheee on GitHub (Sep 23, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/6573 Originally assigned to: @kolacheee on GitHub. ## What problem does this solve? Every browser lane of the Release Regression Matrix (`desktop-chromium`, `mobile-chromium`, `mobile-webkit`) now has its slowest shard at 27 to 29 minutes, against a 30-minute job timeout. On the last five runs (staging pushes and PRs alike), `desktop-chromium 4/4` took 28 to 29 minutes every time, and on #6572 it passed all 129 tests in 29.4 minutes and was then cancelled by the timeout a few seconds later. So: - PRs wait about 30 minutes for the browser lanes. - Any run can fail for no reason other than a slightly slow runner, which looks like a real failure and costs a re-run. ## Proposed solution Shard desktop Chromium and mobile WebKit 10 ways and mobile Chromium 8 ways, instead of 4 each (`.github/workflows/playwright.yml`). Measured, not guessed: I took every test's duration from the last green run (35871966882, 520 tests per lane) and split them the way `--fully-parallel --shard` does (contiguous, equal test counts), adding the measured ~2 minutes of setup and server boot per shard. That model reproduces today's slowest shards (30 / 28 / 29 min predicted against 29 / 27 / 28 observed). Its prediction: | Shards per lane | Slowest shard: desktop / mobile Chromium / WebKit | Browser jobs per run | | --- | --- | --- | | 4 (now) | 30 / 28 / 29 min | 12 | | 6 | 23 / 21 / 23 min | 18 | | 8 | 17 / 16 / 20 min | 24 | | 10 | 14 / 13 / 17 min | 30 | So 10 / 8 / 10 puts the slowest shards at about 14 / 16 / 17 minutes: PR browser checks finish in about 17 minutes instead of about 30, and the 30-minute timeout is a real hang guard again. 6 gains little because the slowest spec files sit together at the end of the list. Cost: the repository is public, so runner minutes are free. Each extra shard repeats about 2 minutes of setup. A run peaks at about 30 concurrent jobs against the Team plan's 60, so two PR runs at once still fit; a third would queue briefly rather than fail. Nothing else pins the count: the three fan-in checks keep their names, and none of the browser lanes is a required status check on `staging`. ## Alternatives considered - **Raise the timeout.** Stops the false failures but keeps PRs waiting about 30 minutes. - **Duration-balanced shards.** Playwright 1.63 has no duration weighting for `--shard`; balancing by hand would mean maintaining a `--test-list` per shard. - **More workers per shard.** Each shard runs `--workers=1` on purpose, because tests share that shard's app servers (#5622). - **Run browser-independent tests on desktop only**, tagging the tests that need the mobile lanes. Measured and declined: of the 410 test definitions, 98 already run on desktop only and 30 are mobile or WebKit only on purpose, and most of the rest measure layout, scrolling, touch, the viewport, screenshots or WebKit behaviour. Moving the others would save 31 to 50 of the mobile lanes' 160 minutes per run, but not PR wait time, because the desktop lane (which keeps every test) is the slowest once sharded, and it would remove mobile coverage from 93 to 132 tests. - **Fixed sleeps and setup.** Sleeps add about 40 seconds per lane and setup about 2 minutes per shard, so neither is where the time goes. Each test does pay about 4 to 5 seconds to load the app from the Vite dev server, but 48 of the 64 spec files import app source from that server, so serving a production build would mean reworking them. ## Additional context Follow-up to the sharding in #5622 and #5637. ## Template check - [ ] I DID NOT read this template and provide the requested details.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#3686
No description provided.