Use ${{ runner.temp }} for PLAYWRIGHT_BROWSERS_PATH so install and launch agree on the browser path - #61423
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
There was a problem hiding this comment.
🟡 Changes recommended
Three Playwright WASM golden outputs remain stale and will fail byte-for-byte tests.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
Fixes Playwright browser installation and launch to share the runner’s resolved temporary directory.
Changes:
- Uses
${{ runner.temp }}forPLAYWRIGHT_BROWSERS_PATH. - Updates unit expectations and 19 compiled workflows.
- Adds a patch changeset.
File summaries
| File | Description |
|---|---|
pkg/workflow/playwright_cli.go |
Corrects the shared browser path. |
pkg/workflow/playwright_cli_test.go |
Updates install-step expectations. |
.github/workflows/weekly-editors-health-check.lock.yml |
Recompiles Playwright environment paths. |
.github/workflows/visual-regression-checker.lock.yml |
Recompiles Playwright environment paths. |
.github/workflows/smoke-test-tools.lock.yml |
Recompiles Playwright environment paths. |
.github/workflows/smoke-gemini.lock.yml |
Recompiles Playwright environment paths. |
.github/workflows/smoke-copilot.lock.yml |
Recompiles Playwright environment paths. |
.github/workflows/smoke-copilot-small.lock.yml |
Recompiles Playwright environment paths. |
.github/workflows/smoke-copilot-arm.lock.yml |
Recompiles Playwright environment paths. |
.github/workflows/smoke-copilot-aoai-entra.lock.yml |
Recompiles Playwright environment paths. |
.github/workflows/smoke-copilot-aoai-apikey.lock.yml |
Recompiles Playwright environment paths. |
.github/workflows/smoke-codex.lock.yml |
Recompiles Playwright environment paths. |
.github/workflows/smoke-claude.lock.yml |
Recompiles Playwright environment paths. |
.github/workflows/smoke-agent-scoped-approved.lock.yml |
Recompiles Playwright environment paths. |
.github/workflows/slide-deck-maintainer.lock.yml |
Recompiles Playwright environment paths. |
.github/workflows/docs-noob-tester.lock.yml |
Recompiles Playwright environment paths. |
.github/workflows/daily-multi-device-docs-tester.lock.yml |
Recompiles Playwright environment paths. |
.github/workflows/daily-model-inventory.lock.yml |
Recompiles Playwright environment paths. |
.github/workflows/cloclo.lock.yml |
Recompiles Playwright environment paths. |
.github/workflows/blog-auditor.lock.yml |
Recompiles Playwright environment paths. |
.github/workflows/archivx-agentic-workflows-analyzer.lock.yml |
Recompiles Playwright environment paths. |
.changeset/playwright-browsers-path-runner-temp.md |
Documents the patch-level fix. |
Review details
- Files reviewed: 22/22 changed files
- Comments generated: 1
- Review effort level: Balanced
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
| browserStep := strings.Join(steps[1], "\n") | ||
| assert.Contains(t, browserStep, `bash "${RUNNER_TEMP}/gh-aw/actions/install_playwright_browsers.sh" chromium`) | ||
| assert.Contains(t, browserStep, "PLAYWRIGHT_BROWSERS_PATH: ${RUNNER_TEMP}/gh-aw/playwright-browsers") | ||
| assert.Contains(t, browserStep, "PLAYWRIGHT_BROWSERS_PATH: ${{ runner.temp }}/gh-aw/playwright-browsers") |
|
@copilot CI is failing on this PR and the latest review still requests changes. Please fix the failing checks below, refresh any stale generated outputs, and then run the Failed checks:
Latest review summary: three Playwright WASM golden outputs appear stale and need to be regenerated before this can merge. If the branch is behind, refresh it and push the smallest necessary fix set. Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
To allow these domains, add them to the network:
allowed:
- defaults
- "github.com"See Network Configuration for more information.
|
Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
Fixed in |
|
🎉 This pull request is included in a new release. Release: |
playwrightBrowsersPathwas emitted as the shell string${RUNNER_TEMP}/gh-aw/playwright-browsersand set viaenv:, which GitHub Actions never shell-expands. The install step therefore downloaded browsers into a relative directory literally named${RUNNER_TEMP}(rooted at the job cwd), while playwright-core expanded the variable itself at launch — so the agent looked for a browser that wasn't there.Changes
pkg/workflow/playwright_cli.go: switch the constant to the Actions expression form, which is expanded by the runner before the step executes. This matches the form already used in.github/workflows/ci.yml.The constant is only ever used in step-level
env:blocks (browser install,playwright-cli install --skills, and the agent execution step viaapplyPlaywrightBrowserEnv), where therunnercontext is available — top-level workflowenvwould still be rejected byvalidateTopLevelEnvExpressions.Tests: updated expectations in
pkg/workflow/playwright_cli_test.go.Lock files: recompiled the 19 affected
.lock.ymlworkflows (three env lines each). Action-pin JSON files were deliberately left untouched to keep unrelated pin churn out of the diff.Changeset: added a patch changeset.
Note:
make check-workflow-driftfails on.github/workflows/release.lock.ymlon the unmodified baseline as well (flaky action-pin resolution in the sandbox); unrelated to this change.