Skip to content

Gate Playwright CI setup on bucket content#14727

Merged
cderv merged 1 commit into
mainfrom
ci/gate-playwright-setup-on-buckets
Jul 24, 2026
Merged

Gate Playwright CI setup on bucket content#14727
cderv merged 1 commit into
mainfrom
ci/gate-playwright-setup-on-buckets

Conversation

@cderv

@cderv cderv commented Jul 24, 2026

Copy link
Copy Markdown
Member

Six Playwright setup steps in test-smokes.yml (node dependency install, browser cache/install, system deps) run on every Linux job regardless of whether the job's test bucket actually contains a Playwright test.

Under test-smokes-parallel.yml — which runs on every push/PR to main and splits the suite into ~20 bucket jobs — that means ~19 jobs pay 2–3 minutes of browser and system-dependency installation they never use, and carry its failure surface for no benefit. Run 30081294158 saw a job die in npx playwright install-deps on a transient apt failure, in a bucket that had no Playwright test to run.

The workflow already has the right precedent: the "Install rsvg-convert" step gates on format('{0}', inputs.buckets) == '' || contains(inputs.buckets, ...). The six Playwright steps now use the same idiom — they run only for a full serial run (empty buckets, which includes integration/) or a bucket containing integration/playwright-tests.test.ts, the only test file whose path matches "playwright".

The schedule escape is dropped rather than carried forward: the suite is ignored on Windows CI (ignore: gha.isGitHubActions() && isWindows in playwright-tests.test.ts), so npx playwright test never runs on Windows in any mode — browser setup there was pure waste, scheduled or not.

Self-trial

This PR's own "Parallel Smokes Tests" run exercises the gate directly. In the run's jobs, a bucket without a Playwright test shows the six setup steps skipped, while the bucket containing integration/playwright-tests.test.ts still installs browsers and passes. The only path not covered by PR CI is the Windows-schedule tightening — there is no scheduled event on a PR — which rests on the Windows ignore gate cited above.

No changelog entry: CI-only change with no user-facing effect.

Six Playwright setup steps in test-smokes.yml (node install, browser
cache/install, system deps) ran on every Linux job regardless of whether the
job's test bucket contained a Playwright test. Under test-smokes-parallel
(~20 bucket jobs per push/PR to main) that meant ~19 jobs paid 2-3 min of
unused browser/system-deps installation and carried its failure surface: run
30081294158 died in `npx playwright install-deps` on a transient apt failure a
bucket without Playwright had no reason to touch.

Gate the six steps the way the rsvg-convert step already gates on bucket
content: run only for a full serial run (empty buckets) or a bucket containing
integration/playwright-tests.test.ts. Drop the schedule escape, since the suite
is ignored on Windows CI (ignore: gha.isGitHubActions() && isWindows) and
browser setup was pure waste there in every mode.
@posit-snyk-bot

posit-snyk-bot commented Jul 24, 2026

Copy link
Copy Markdown
Collaborator

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@cderv
cderv merged commit e51339a into main Jul 24, 2026
51 checks passed
@cderv
cderv deleted the ci/gate-playwright-setup-on-buckets branch July 24, 2026 12:52
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