Skip to content

ci: skip the Playwright browser download in release builds - #33

Merged
ndemianc merged 1 commit into
developfrom
fix/ci-skip-playwright-download
Jul 23, 2026
Merged

ci: skip the Playwright browser download in release builds#33
ndemianc merged 1 commit into
developfrom
fix/ci-skip-playwright-download

Conversation

@ndemianc

Copy link
Copy Markdown
Contributor

The x64 build failed in bootstrap (getaddrinfo ENOTFOUND cdn.playwright.dev) while playwright-core's postinstall tried to download a Chromium. arm64 and the test job passed the SAME commit (v0.9.1 → 2e1b857), so this is a transient network dependency, not a code defect — and an unnecessary one: no LevelCode build runs Playwright browser tests. playwright-core is pulled in transitively by the upstream copilot extension.

Set PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1 on the Build job env, alongside the GITHUB_TOKEN mitigation that already exists for the same class of problem (postinstall network fetches). Verified against the installed playwright-core: installBrowsersForNpmInstall() short-circuits on getAsBooleanFromENV of this exact var, so the Chromium fetch never runs. Scoped to the Build jobs, not global, so it can't affect the test job if that ever wants a browser.

Note: v0.9.1 is a TAG, so this does not retroactively fix that release build (a re-run of the flaked job does); it prevents recurrence for every future release cut from develop.

The x64 build failed in bootstrap (getaddrinfo ENOTFOUND cdn.playwright.dev)
while playwright-core's postinstall tried to download a Chromium. arm64 and the
test job passed the SAME commit (v0.9.1 → 2e1b857), so this is a transient
network dependency, not a code defect — and an unnecessary one: no LevelCode
build runs Playwright browser tests. playwright-core is pulled in transitively by
the upstream `copilot` extension.

Set PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1 on the Build job env, alongside the
GITHUB_TOKEN mitigation that already exists for the same class of problem
(postinstall network fetches). Verified against the installed playwright-core:
installBrowsersForNpmInstall() short-circuits on getAsBooleanFromENV of this exact
var, so the Chromium fetch never runs. Scoped to the Build jobs, not global, so it
can't affect the test job if that ever wants a browser.

Note: v0.9.1 is a TAG, so this does not retroactively fix that release build (a
re-run of the flaked job does); it prevents recurrence for every future release
cut from develop.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 23, 2026 21:13
@ndemianc
ndemianc merged commit a676f6a into develop Jul 23, 2026
2 checks passed
@ndemianc
ndemianc deleted the fix/ci-skip-playwright-download branch July 23, 2026 21:14

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR hardens the release build workflow by removing an unnecessary network dependency: Playwright’s browser download during playwright-core’s postinstall. This aligns with LevelCode’s release pipeline (which doesn’t run Playwright browser tests) and prevents transient DNS/network failures from breaking x64 release builds.

Changes:

  • Set PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1 for the build job in the release workflow to skip Playwright’s Chromium download.
  • Document the rationale alongside the existing GITHUB_TOKEN mitigation for postinstall network fetch flakiness.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

ndemianc added a commit that referenced this pull request Jul 24, 2026
All five points were real. Two of them made the tool quietly report LESS than
the truth, which is the failure mode that matters most for something whose whole
job is producing accurate facts.

1. prevTag was interpolated into a shell string. A tag name is repo-controlled
   but still runtime-discovered input, so this is now defended twice: all git
   calls go through spawnSync with an argv array (a shell cannot be quoted out
   of one), and the base tag must match ^vX.Y.Z$ before use. Shape matters
   independently of injection — a stray v0.9.2-rc1 sorts into the 'v*' glob and
   would silently produce the wrong range, wrong commit list and wrong compare
   link. Verified: v0.9.2-rc1, v-wip and "v0.9.2; rm -rf /" are all rejected.

2. PRs were only detected from merge commits, so on a squash-merging repo the
   list would read "(none detected)" while every subject carried "(#123)". Both
   shapes are now collected.

3. Suites were keyed by basename, so two extensions with the same test filename
   would produce an ambiguous "biggest suites" list. Keyed by relative path now.

4. The coverage line printed "N cases in total" while suites whose summary could
   not be parsed silently contributed 0 — authoritative-sounding and UNDER-
   reporting. This one bit immediately: 5 of 24 suites do not print a count, so
   "273 cases in total" was wrong. It now says how many suites were counted and
   names the ones that were not.

5. The fix/perf heading also carried reverts; renamed to say so.

Also fixes a bug I introduced while making #2: prNumbers became a Set, but the
renderer still read .length, which is undefined on a Set — so the PR list emptied
itself silently. Caught by re-running against the real range (expected #33-36,
got "(none detected)"). Materialised to a sorted array.

Verified end to end against v0.9.1..HEAD: PRs #33-36 detected, coverage line now
honest about the 5 unparsed suites, and all guardrails still fire.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.

2 participants