Repository navigation
build: cache Playwright browsers in product build test jobs - #343395
Merged
Bryan Chen (bryanchen-d) merged 1 commit intoOct 27, 2026
Merged
Conversation
Bryan Chen (bryanchen-d)
force-pushed
the
copilot/vscode/cache-restore-retry
branch
from
October 22, 2026 00:43
66394bc to
6d7acfd
Compare
Bryan Chen (bryanchen-d)
force-pushed
the
copilot/vscode/ado-playwright-cache
branch
from
October 22, 2026 00:43
2d27ad9 to
4d3365b
Compare
Collaborator
Author
|
Def 111 validation (CI mode, publish off): cold, then warm.
|
Bryan Chen (bryanchen-d)
force-pushed
the
copilot/vscode/cache-restore-retry
branch
from
October 22, 2026 20:22
6d7acfd to
2e46e71
Compare
Bryan Chen (bryanchen-d)
force-pushed
the
copilot/vscode/ado-playwright-cache
branch
from
October 22, 2026 20:25
4d3365b to
a23c4fe
Compare
Contributor
There was a problem hiding this comment.
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Copilot review overview
3 open issues
The cache key uses a file path that’s interpreted relative to the task’s working directory. To make… · New The template setsPLAYWRIGHT_BROWSERS_PATHto an absolute path under$(Build.SourcesDirectory),… · New Usingnode -ejust to construct and emit the##vso[task.setvariable ...]line adds quoting… · New
What changed in this PR
Adds an Azure Pipelines step template to cache Playwright browser downloads in product-build test jobs, reducing test flakiness when Playwright CDNs are unavailable.
Changes:
- Introduces a shared
restore-playwright-browsers.ymltemplate that setsPLAYWRIGHT_BROWSERS_PATHand restores/saves.build/ms-playwrightviaCache@2. - Wires the template into Linux, macOS, and Windows product-build test step templates immediately before the Playwright install step.
| File | Description |
|---|---|
| build/azure-pipelines/common/restore-playwright-browsers.yml | New template to set browser path and restore Playwright browser cache. |
| build/azure-pipelines/linux/steps/product-build-linux-test.yml | Calls the new restore template before Playwright install. |
| build/azure-pipelines/darwin/steps/product-build-darwin-test.yml | Calls the new restore template before Playwright install. |
| build/azure-pipelines/win32/steps/product-build-win32-test.yml | Calls the new restore template before Playwright install. |
Review effort: Lite
Bryan Chen (bryanchen-d)
force-pushed
the
copilot/vscode/ado-playwright-cache
branch
from
October 22, 2026 22:02
a23c4fe to
90c7615
Compare
The test jobs download every Playwright browser from Playwright's CDN. On Oct 21, 4 Windows test jobs in def 111 failed in `Download Electron and Playwright` while `playwright.download.prss.microsoft.com` didn't resolve, and the step's own retries were over in under a minute. Restore `.build/ms-playwright` with Cache@2 before the download, keyed on OS, arch and the pinned Playwright version, and point PLAYWRIGHT_BROWSERS_PATH at it. On a hit, `playwright install` finds the browsers and downloads nothing. On a miss, it downloads as before and the post-job step saves the cache. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Bryan Chen (bryanchen-d)
force-pushed
the
copilot/vscode/ado-playwright-cache
branch
from
October 26, 2026 22:48
90c7615 to
b3a9723
Compare
Bryan Chen (bryanchen-d)
marked this pull request as ready for review
October 26, 2026 23:06
Contributor
📬 CODENOTIFYThe following users are being notified based on files changed in this PR: Ladislau Szomoru (@lszomoru)Matched files:
|
Raymond Zhao (rzhao271)
approved these changes
Oct 26, 2026
Bryan Chen (bryanchen-d)
deleted the
copilot/vscode/ado-playwright-cache
branch
October 27, 2026 15:45
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Caches Playwright's browsers in the product build's test jobs (ADO def 111), so a Playwright CDN outage no longer fails them. This is the ADO half of B11. The GitHub half is #343387.
Stacked on #343325, which adds
retryCountOnTaskFailureto theCache@2steps. This PR targets that branch so the diff shows only this change. I'll retarget it tomainonce #343325 merges.Why
On Oct 21, 4 Windows test jobs in def 111 failed in
Download Electron and Playwright(487426, 487513, 487556, 487566).playwright.download.prss.microsoft.comreturnedENOTFOUNDand the fallbackcdn.playwright.dev/buildsreset the connection. The step'sretryCountOnTaskFailure: 3was exhausted in under a minute. Those were the only Playwright download failures in 14 days (out of about 9,840 runs of that step), but they come in bursts.What
There's a new step template,
build/azure-pipelines/common/restore-playwright-browsers.yml, used by the Linux, macOS and Windows test step templates right beforeDownload Electron and Playwright. It does two things:PLAYWRIGHT_BROWSERS_PATHto$(Build.SourcesDirectory)/.build/ms-playwright.Cache@2(retryCountOnTaskFailure: 2), keyed on"playwright" | Agent.OS | VSCODE_ARCH | node_modules/playwright/package.json. That's the pinned Playwright version, so the key only changes when Playwright does.Download Electron and Playwrightitself is unchanged. On a hit,playwright installfinds the browsers and downloads nothing. On a miss, it downloads as before, andCache@2's post-job step saves the folder. Electron comes from our Azure feed, so it doesn't need this.Validation (full def 111, publish off)
Downloadinglines.Results will be posted here before I ask for signing.