Skip to content

Run heavy color blocks in a serial Nala lane (fix shard-1 contention) - #710

Draft
hadobe wants to merge 1 commit into
stagefrom
nala-color-serial-lane
Draft

Run heavy color blocks in a serial Nala lane (fix shard-1 contention)#710
hadobe wants to merge 1 commit into
stagefrom
nala-color-serial-lane

Conversation

@hadobe

@hadobe hadobe commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Draft — implements Option 1 from the flakiness discussion.

Problem

The color-shared blocks (color-contrast-checker, color-explore, color-extract, color-headline, color-search-marquee, color-wheel) are heavy Spectrum canvas/image-processing blocks. Playwright shards by contiguous test order, so the alphabetically-adjacent color-* blocks all land in one shard and run 3-at-a-time (workers: 3), where they starve each other's decoration and time out in waitReady() (30s wait for data-block-status="loaded").

Reproduced locally: they pass solo and serial, fail clustered — pure concurrency contention, not a block bug. They already have martech=off, so it isn't trackers either.

Fix — isolate color into its own serial lane

  • Each of the 4 shard lanes now excludes @color (NALA_EXTRA_GREP_INVERT), so the non-color suite (215 tests) partitions cleanly 4 ways with no color cluster.
  • A new 5th matrix lane runs only @color with workers: 1 (serial), so the heavy color blocks never run concurrently.

Workers stay 3 on the shard lanes — no per-shard worker tuning. The color lane is part of the same run-nala-tests matrix, so the existing aggregate gate (needs: run-nala-tests) covers it with no branch-protection change.

pr.run.sh

  • Collapse the two --grep-invert flags into one combined regex — Playwright only honours the last --grep-invert, so nopr was effectively dead; now nopr|@monitoring[|@color] all apply. Extendable via NALA_EXTRA_GREP_INVERT.
  • Add NALA_GREP for a positive lane-restricting grep (the color lane).

Verified locally (against stage)

  • Color lane (-g @color --workers=1, all 3 browsers): 24 passed / 6 skipped, ~1.5 min — the exact blocks that were failing under concurrency.
  • Shard lanes exclude color: 0 color tests, 215 non-color split 4×54.
  • Workflow YAML valid (5 lanes); pr.run.sh syntax OK; both lane commands construct correctly.

Cost

The color lane runs in parallel with the 4 shards (~2–4 min serial), so it doesn't add to gate wall-clock. Independent of #704 (tracker rollout) — different files, merge in any order.

Follow-up option (not here): now that the heavy color blocks are out of the shards, the shard lanes could likely go back to workers: 4 for speed — worth trying once this lands.

🤖 Generated with Claude Code

The color-shared blocks (color-contrast-checker, color-explore, color-extract,
color-headline, color-search-marquee, color-wheel) are heavy Spectrum
canvas/image-processing blocks. Playwright shards by contiguous test order, so
the alphabetically-adjacent color-* blocks all land in ONE shard and run
3-at-a-time (workers=3), where they starve each other's decoration and time
out in waitReady() (30s wait for data-block-status="loaded"). They pass solo
and serial, fail clustered — pure concurrency contention, not a block bug.

Isolate them:
- Each of the 4 sharded lanes now excludes @color (NALA_EXTRA_GREP_INVERT),
  so the non-color suite (215 tests) partitions cleanly 4 ways with no color
  cluster.
- A new 5th matrix lane runs ONLY @color with workers=1 (serial), so the heavy
  color blocks never run concurrently.

The lane is part of the same run-nala-tests matrix, so the existing aggregate
gate (needs: run-nala-tests) covers it with no branch-protection change.

pr.run.sh: collapse the two --grep-invert flags into one combined regex
(Playwright only honours the last --grep-invert), extendable via
NALA_EXTRA_GREP_INVERT; add NALA_GREP for a positive lane-restricting grep.

Verified locally against stage:
- Color lane (-g @color --workers=1, all 3 browsers): 24 passed / 6 skipped.
- Shard lanes exclude color: 0 color tests, 215 non-color split 4x54.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@aem-code-sync

aem-code-sync Bot commented Aug 25, 2026

Copy link
Copy Markdown

Hello, I'm the AEM Code Sync Bot and I will run some actions to deploy your branch and validate page speed.
In case there are problems, just click a checkbox below to rerun the respective action.

  • Re-run all PSI checks
  • Re-run failed PSI checks
  • Re-sync branch
Commits

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant