ci(e2e): add 2 E2E-Browser matrix shards alongside existing job (phase 2a) (bookshelf-nwo0v.2) #1322

Closed
zombor wants to merge 1 commit from bd-bookshelf-nwo0v.2 into main
Owner

Summary

  • Adds e2e-browser-shard matrix job to ci.yml with two shards that partition the browser spec tree via --focus-file regex
  • Each shard runs --procs=4 on its own MySQL service container (safe: ~1.8 GB per pod vs ~2.7 GB for the 8-proc full job)
  • Adds optional BROWSER_FOCUS_FILE env var to the Makefile e2e-browser target (no-op when unset — existing behaviour unchanged)
  • Existing e2e-browser job is kept UNCHANGED so the required branch-protection context / E2E Browser (pull_request) continues to pass — no PR is blocked

Spec partitioning (--focus-file regex, Ginkgo v2 matches against file path)

  • Shard 1: (author_search|bookdrop_|journey_[a-k]|metadata_) ≈ 37 spec files (author_search, 4 bookdrop, 4 metadata, 28 journey files a-k)
  • Shard 2: journey_[l-z] ≈ 30 journey spec files (library, llm, magic, manage, move, oidc, organize, read, recompute, refresh, reset, scan, series, settings, sidecar, stats, tag, workflow)
  • Helper files (browser_helpers, screenshot_scope, axe_helpers, etc.) compile in both shards but emit no specs — clean no-op

Why not --shard-count/--shard-index?

Ginkgo v2.29.0 does not have built-in shard flags. The --focus-file regex is the deterministic spec-tree partition mechanism available in v2.

Two-phase landing plan

Phase 2a (this PR): ADD the two shard jobs while keeping the old e2e-browser job → CI is temporarily heavier but no required context is broken, no PR is blocked.

Phase 2b (separate commit, after shard contexts prove green on 2+ PRs): PATCH branch-protection to swap the required context from / E2E Browser (pull_request)/ E2E Browser (1/2) (pull_request) + / E2E Browser (2/2) (pull_request), then remove the old job in the same commit. Orchestrator + user handle 2b explicitly to avoid the ci-check-rename-deadlocks-prs deadlock.

Test plan

  • CI shows three E2E Browser contexts: old E2E Browser, new E2E Browser (1/2), new E2E Browser (2/2)
  • Both new shard contexts go green
  • Old E2E Browser context still goes green (no regression)
  • Lint, Test Race, Coverage, Integration, E2E API, JS Unit pass unchanged

Closes bead bookshelf-nwo0v.2 on merge.

## Summary - Adds `e2e-browser-shard` matrix job to ci.yml with two shards that partition the browser spec tree via `--focus-file` regex - Each shard runs `--procs=4` on its own MySQL service container (safe: ~1.8 GB per pod vs ~2.7 GB for the 8-proc full job) - Adds optional `BROWSER_FOCUS_FILE` env var to the Makefile `e2e-browser` target (no-op when unset — existing behaviour unchanged) - **Existing `e2e-browser` job is kept UNCHANGED** so the required branch-protection context `/ E2E Browser (pull_request)` continues to pass — no PR is blocked ### Spec partitioning (--focus-file regex, Ginkgo v2 matches against file path) - Shard 1: `(author_search|bookdrop_|journey_[a-k]|metadata_)` ≈ 37 spec files (author_search, 4 bookdrop, 4 metadata, 28 journey files a-k) - Shard 2: `journey_[l-z]` ≈ 30 journey spec files (library, llm, magic, manage, move, oidc, organize, read, recompute, refresh, reset, scan, series, settings, sidecar, stats, tag, workflow) - Helper files (browser_helpers, screenshot_scope, axe_helpers, etc.) compile in both shards but emit no specs — clean no-op ### Why not --shard-count/--shard-index? Ginkgo v2.29.0 does not have built-in shard flags. The `--focus-file` regex is the deterministic spec-tree partition mechanism available in v2. ### Two-phase landing plan Phase 2a (this PR): ADD the two shard jobs while keeping the old `e2e-browser` job → CI is temporarily heavier but no required context is broken, no PR is blocked. Phase 2b (separate commit, after shard contexts prove green on 2+ PRs): PATCH branch-protection to swap the required context from `/ E2E Browser (pull_request)` → `/ E2E Browser (1/2) (pull_request)` + `/ E2E Browser (2/2) (pull_request)`, then remove the old job in the same commit. Orchestrator + user handle 2b explicitly to avoid the ci-check-rename-deadlocks-prs deadlock. ## Test plan - [ ] CI shows three `E2E Browser` contexts: old `E2E Browser`, new `E2E Browser (1/2)`, new `E2E Browser (2/2)` - [ ] Both new shard contexts go green - [ ] Old `E2E Browser` context still goes green (no regression) - [ ] Lint, Test Race, Coverage, Integration, E2E API, JS Unit pass unchanged Closes bead bookshelf-nwo0v.2 on merge.
ci(e2e): add 2 E2E-Browser matrix shards alongside existing job (phase 2a) (bookshelf-nwo0v.2)
All checks were successful
/ Test Race (pull_request) Successful in 9m42s
/ E2E API (pull_request) Successful in 9m57s
/ Coverage (pull_request) Successful in 11m10s
/ JS Unit Tests (pull_request) Successful in 8m7s
/ Lint (pull_request) Successful in 12m43s
/ Integration (pull_request) Successful in 14m6s
/ E2E Browser (pull_request) Successful in 15m5s
/ E2E Browser (2/2) (pull_request) Successful in 11m26s
/ E2E Browser (1/2) (pull_request) Successful in 12m0s
2166cf2074
Adds e2e-browser-shard matrix job with two shards that partition the browser
spec tree via --focus-file regex, each running with --procs=4 on its own
MySQL service container.

Partitioning:
  Shard 1: author_search + bookdrop_* + journey_[a-k] + metadata_* (~37 spec files)
  Shard 2: journey_[l-z] (~30 spec files)

Ginkgo v2.29.0 has no built-in --shard-count/--shard-index; --focus-file
regex is the equivalent deterministic spec-tree partition mechanism.

Makefile: adds optional BROWSER_FOCUS_FILE env var to e2e-browser target;
no-op when unset (existing make e2e-browser behaviour is unchanged).

The existing e2e-browser job is kept UNCHANGED so the required status check
'/ E2E Browser (pull_request)' continues to pass — no PR is blocked.
Phase 2b (swap branch-protection context + remove old job) is a separate
commit once the shard contexts prove green on 2+ PRs.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
zombor closed this pull request 2026-08-04 18:51:40 +00:00
Author
Owner

Closing unmerged per project decision (2026-08-04): the 2×4-proc E2E-Browser shards do NOT reduce wall-clock (2×4 procs ≈ 1×8 procs of compute) — see bookshelf-nwo0v.2 analysis. Flakiness + wall-clock are being addressed by the systemic page.Element→page.Elements sweep (bookshelf-eu18m, #1331) and the bz643 suite-shrink instead. Not merging to avoid adding CI job weight without a wall-clock win.

Closing unmerged per project decision (2026-08-04): the 2×4-proc E2E-Browser shards do NOT reduce wall-clock (2×4 procs ≈ 1×8 procs of compute) — see bookshelf-nwo0v.2 analysis. Flakiness + wall-clock are being addressed by the systemic page.Element→page.Elements sweep (bookshelf-eu18m, #1331) and the bz643 suite-shrink instead. Not merging to avoid adding CI job weight without a wall-clock win.
All checks were successful
/ Test Race (pull_request) Successful in 9m42s
Required
Details
/ E2E API (pull_request) Successful in 9m57s
Required
Details
/ Coverage (pull_request) Successful in 11m10s
Required
Details
/ JS Unit Tests (pull_request) Successful in 8m7s
/ Lint (pull_request) Successful in 12m43s
Required
Details
/ Integration (pull_request) Successful in 14m6s
Required
Details
/ E2E Browser (pull_request) Successful in 15m5s
Required
Details
/ E2E Browser (2/2) (pull_request) Successful in 11m26s
/ E2E Browser (1/2) (pull_request) Successful in 12m0s

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
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
zombor/pergamum!1322
No description provided.