Skip to content

fix(ci): unblock the Playwright install and move the landing suite's port out of the ephemeral range - #382

Merged
AminDhouib merged 2 commits into
devfrom
fix/nightly-ci-hardening
Sep 9, 2026
Merged

fix(ci): unblock the Playwright install and move the landing suite's port out of the ephemeral range#382
AminDhouib merged 2 commits into
devfrom
fix/nightly-ci-hardening

Conversation

@AminDhouib

Copy link
Copy Markdown
Member

Two independent CI fixes. The first unblocks every Playwright job in the repo; the second moves one more fixed listen port below the Linux ephemeral range. The storybook / cross-framework half of the port sweep is deliberately NOT here — see "Not done" below; it needs a decision that belongs to the maintainer, not to this PR.

1 — drop Google's chrome-stable apt source before playwright install

Every Playwright job currently dies before it runs a test. Nightly run 34382957429 on master, attempts 1 and 2, three separate jobs, step "Install Playwright Chromium":

Get:29 https://dl.google.com/linux/chrome-stable/deb stable/main amd64 Packages
Err:29  https://dl.google.com/linux/chrome-stable/deb stable/main amd64 Packages
  Hash Sum mismatch
E: Failed to fetch .../binary-amd64/Packages.gz  Hash Sum mismatch
Failed to install browsers
Error: Installation process exited with code: 100

Every Ubuntu archive source fetched fine; only Google's chrome-stable index is broken, and --with-deps runs apt-get update across all sources, so one bad third-party repo fails the step. Playwright downloads its own Chromium and takes system deps from the Ubuntu archives — it never needs that repo — so the fix is to remove the source list, not to retry a broken mirror.

Applied to all four install steps: e2e.yml (E2E, Docs-E2E) and nightly.yml (E2E-Full, Landing-Feedback — its steps.creds.outputs.present guard is kept). Nothing in docs/, scripts/, or CONTRIBUTING.md documents this step, so there was nothing to keep in sync (grep -rn "playwright install\|with-deps\|chrome-stable" docs/ scripts/ CONTRIBUTING.md local-dev/*.md → no hits).

2 — 5308031080 (landing suite webServer)

Port Old New Where
Landing e2e webServer 53080 31080 apps/e2e-test/playwright.landing.config.ts

Same class as the 53061/53062 fix in #378: Linux draws ephemeral source ports from 32768–60999, so a fixed listen port in that window can be transiently held by one of the runner's own outbound connections, and Playwright then polls a URL that never comes up. The reason is recorded beside the constant, pointing at the resume harness that documented the rule.

Method: a small Node codemod over git ls-files — exact-substring, longest-key-first, with an explicit KEEP list (53000, 5305053056, 53060, 53070). It rewrote 1 file; git grep 53080 now matches only the explanatory comment. 3105031055, 31060, 31080 were verified free repo-wide beforehand (only 31061/31062 are taken, by the resume harness). parity-fixtures.json contains no port numbers at all, so no fixture regen is involved.

Not done — the storybook ports (53050–53055) and the cf harness (53060)

Renumbering these would change external service configuration, which is the stop condition on this task:

  • Each storybook's .env.example says: "Add this Storybook's origin (http://localhost:5305x) to each provider's list of authorized JavaScript origins / redirect URIs in its developer console", and for OneDrive/Dropbox/Box "redirectUri defaults to window origin". So the six origins are registered in four developer consoles (Google Cloud, Azure, Dropbox, Box).
  • local-dev/.env.ports records the same fact: "53056 sits inside the OAuth clients' registered redirect range (53050-53060)".
  • fix(ci): make nightly green — four independent causes behind #376 #378's own commit message states the ruling explicitly: ":53060 … sits inside the OAuth clients' registered redirect range (53050-53060), so it is pinned by external registration, not by convention."

Moving them silently breaks cloud-drive sign-in in the storybooks and the local playground until a human re-registers six origins in four consoles. Worth noting for whoever decides: the cf harness port is already env-overridable (UPUP_E2E_SERVER_PORT), while the six storybook ports are baked into each package's storybook script — so a CI-only override is a possible middle path that keeps the registered defaults intact.

53000 (the landing dev default) is also inside the ephemeral range but is left alone deliberately: it is the documented local-dev convention block (local-dev/LOCAL-DEV.md, local-dev/ports/landing.env, AGENTS_RULES.md), not a CI listen port.

Suspected, not proven

Attempt 1 of that nightly lost the cross-framework suite to a silent 900 s Timed out waiting 900000ms from config.webServer (job 102572070419) hours after a green ~52 s boot on dev. That is consistent with a storybook failing to bind a port inside the ephemeral range — Playwright only polls a URL and never surfaces the child's EADDRINUSE — but it is a hypothesis, not a demonstrated cause: the rerun died at the apt step before it ever reached the cross-framework job.

Gates (all via rtk proxy, raw exit codes captured)

Gate Result
YAML parse of both workflows (yaml package; asserts all 4 install steps + the if: guard) OK, exit 0
pnpm run typecheck 31/31 tasks, exit 0
pnpm --filter @useupup/e2e-test run typecheck exit 0
pnpm run test:quality 392 test files + 5 workflows clean, exit 0
prettier --check on all 3 touched files clean, exit 0
pre-commit (core + react + server suites) green on both commits
pre-push (typecheck + lint + knip) green

No package with unit tests was touched (packages/angular's server-mode-drive.spec.ts references :53060, which this PR does not move), so no suite needed re-running beyond the hooks.

…ywright

Every Playwright job in the repo — PR checks included — dies before it
runs a test:

  Err:29 https://dl.google.com/linux/chrome-stable/deb stable/main amd64 Packages
    Hash Sum mismatch
  E: Failed to fetch .../binary-amd64/Packages.gz  Hash Sum mismatch
  Failed to install browsers
  Error: Installation process exited with code: 100

Nightly run 34382957429 on master, attempts 1 and 2, three separate jobs.
Every Ubuntu archive source fetched fine; only Google's chrome-stable
index is broken, and `playwright install --with-deps` runs apt-get update
across all of them, so one bad third-party repo fails the step.

Playwright downloads its own Chromium and takes system deps from the
Ubuntu archives — it never needs that repo — so remove the source list
before installing rather than retrying against a broken mirror. Applied
to all four install steps (e2e.yml E2E + Docs-E2E, nightly.yml E2E-Full +
Landing-Feedback, whose creds guard is kept).
…range

Same class as the 53061/53062 fix: Linux draws ephemeral source ports
from 32768-60999, so :53080 — the landing suite's fixed webServer port —
can be transiently held by one of the runner's own outbound connections,
and Playwright then just polls a URL that never comes up.

53080 -> 31080, and the rule is recorded beside the constant. It appears
in exactly one tracked file, so this is the whole sweep for that port.

The six storybook ports (53050-53055) and the cross-framework harness
(:53060) are deliberately NOT moved here: those origins are registered
in the four cloud-drive providers' developer consoles (each storybook's
.env.example, local-dev/.env.ports), so renumbering them is an external
service-config change, not a repo change.
@codesandbox

codesandbox Bot commented Sep 9, 2026

Copy link
Copy Markdown

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

@AminDhouib
AminDhouib merged commit c0af288 into dev Sep 9, 2026
18 checks passed
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