[PR #5638] [MERGED] ci: boot only each shard's server pair and give webkit a fourth shard #6863

Closed
opened 2026-10-23 04:14:24 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/5638
Author: @kolacheee
Created: 8/29/2026
Status: ✅ Merged
Merged: 8/29/2026
Merged by: @kolacheee

Base: staging ← Head: feat/shard-speed-2


📝 Commits (1)

  • 69115bf ci: boot only each shard's server pair and give webkit a fourth shard

📊 Changes

4 files changed (+31 additions, -7 deletions)

View changed files

📝 .github/actions/playwright-shard/action.yml (+5 -0)
📝 .github/workflows/playwright.yml (+8 -3)
📝 e2e/start-servers.mjs (+14 -3)
📝 playwright.config.ts (+4 -1)

📄 Description

Closes #5637. The two approved follow-ups to #5622's sharding; the node_modules/apt-caching idea is deferred per maintainer decision and not included.

What changed

1. Each shard boots only the server pair its tests talk to. start-servers.mjs booted both the desktop (5178/7971) and mobile (5179/7972) client/server pairs in every shard, though each Playwright project only ever uses one — verified by grep that no test reaches across to the other pair's ports. CI shards now set PLAYWRIGHT_ONLY_PROJECT (plumbed through a new composite-action input), start-servers.mjs boots just that pair, and the Playwright webServer readiness URL follows the same variable — required, since a mobile-only shard would otherwise wait forever on the desktop URL. Unset keeps the boot-both behavior byte-for-byte, so local runs are untouched. Saves roughly 30–60 s of boot per shard plus runner memory.

2. Mobile-webkit gets a fourth shard. The matrix wall time is the slowest single shard, and WebKit-on-Linux is consistently the slowest lane. Its matrix goes to 4 shards (distribution verified: 50/49/49/49) while both chromium lanes stay at 3. Shard-job names change (mobile-webkit 1/4, …); the mobile-webkit fan-in keeps its exact name for branch protection, unchanged.

Expected result: webkit wall time from ~10 min toward ~7, chromium lanes shave their boot time.

Validation done

  • YAML parse-validated; webkit --shard=k/4 distribution checked
  • Both gating modes exercised locally with real tests: a desktop test under PLAYWRIGHT_ONLY_PROJECT=desktop and a mobile-executing test under =mobile, both green (the mobile pair's readiness URL switch is what the second one proves)
  • Ungated local behavior unchanged (same code path as before when the variable is unset)
  • This PR's own CI run exercises all 10 shard jobs with the gating live

Manually verify (for the human contributor)

  • Compare this PR's mobile-webkit wall time against a recent 3-shard run
  • Confirm plain local pnpm regression:ui still boots both pairs and passes as before

Summary by CodeRabbit

  • Tests
    • Improved end-to-end test execution by selecting the appropriate desktop or mobile test server.
    • Increased mobile WebKit test coverage by adding a fourth parallel test shard.
    • Improved readiness checks for mobile test runs.
  • Chores
    • Updated automated test workflows to support explicit desktop and mobile configurations.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Engine/pull/5638 **Author:** [@kolacheee](https://github.com/kolacheee) **Created:** 8/29/2026 **Status:** ✅ Merged **Merged:** 8/29/2026 **Merged by:** [@kolacheee](https://github.com/kolacheee) **Base:** `staging` ← **Head:** `feat/shard-speed-2` --- ### 📝 Commits (1) - [`69115bf`](https://github.com/Pasta-Devs/Marinara-Engine/commit/69115bfea7756341f7f5b19877f8575aadb9f660) ci: boot only each shard's server pair and give webkit a fourth shard ### 📊 Changes **4 files changed** (+31 additions, -7 deletions) <details> <summary>View changed files</summary> 📝 `.github/actions/playwright-shard/action.yml` (+5 -0) 📝 `.github/workflows/playwright.yml` (+8 -3) 📝 `e2e/start-servers.mjs` (+14 -3) 📝 `playwright.config.ts` (+4 -1) </details> ### 📄 Description Closes #5637. The two approved follow-ups to #5622's sharding; the node_modules/apt-caching idea is deferred per maintainer decision and not included. ## What changed **1. Each shard boots only the server pair its tests talk to.** `start-servers.mjs` booted both the desktop (5178/7971) and mobile (5179/7972) client/server pairs in every shard, though each Playwright project only ever uses one — verified by grep that no test reaches across to the other pair's ports. CI shards now set `PLAYWRIGHT_ONLY_PROJECT` (plumbed through a new composite-action input), `start-servers.mjs` boots just that pair, and the Playwright `webServer` readiness URL follows the same variable — required, since a mobile-only shard would otherwise wait forever on the desktop URL. Unset keeps the boot-both behavior byte-for-byte, so local runs are untouched. Saves roughly 30–60 s of boot per shard plus runner memory. **2. Mobile-webkit gets a fourth shard.** The matrix wall time is the slowest single shard, and WebKit-on-Linux is consistently the slowest lane. Its matrix goes to 4 shards (distribution verified: 50/49/49/49) while both chromium lanes stay at 3. Shard-job names change (`mobile-webkit 1/4`, …); the `mobile-webkit` fan-in keeps its exact name for branch protection, unchanged. Expected result: webkit wall time from ~10 min toward ~7, chromium lanes shave their boot time. ## Validation done - YAML parse-validated; webkit `--shard=k/4` distribution checked - Both gating modes exercised locally with real tests: a desktop test under `PLAYWRIGHT_ONLY_PROJECT=desktop` and a mobile-executing test under `=mobile`, both green (the mobile pair's readiness URL switch is what the second one proves) - Ungated local behavior unchanged (same code path as before when the variable is unset) - This PR's own CI run exercises all 10 shard jobs with the gating live ## Manually verify (for the human contributor) - [ ] Compare this PR's `mobile-webkit` wall time against a recent 3-shard run - [ ] Confirm plain local `pnpm regression:ui` still boots both pairs and passes as before <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Tests** * Improved end-to-end test execution by selecting the appropriate desktop or mobile test server. * Increased mobile WebKit test coverage by adding a fourth parallel test shard. * Improved readiness checks for mobile test runs. * **Chores** * Updated automated test workflows to support explicit desktop and mobile configurations. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-23 04:14:24 +07:00
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#6863
No description provided.