Repository navigation
ci: start the Windows PR test jobs from the workspace images - #346270
Merged
Ladislau Szomoru (lszomoru) merged 1 commit intoNov 5, 2026
Merged
Ladislau Szomoru (lszomoru) merged 1 commit into
Ladislau Szomoru (lszomoru) merged 1 commit into
Conversation
Contributor
There was a problem hiding this comment.
🔵 Needs a closer look
The newly enabled VHDX restore path affects nearly all Windows PR test jobs, but successful mounts and failure/timeout cleanup and fallback require Windows-runner validation that this source-only review could not provide.
No open issues 🎉
What changed in this PR
This PR enables workspace-image reuse for Windows PR test jobs, building on the image producer and restore-cleanup work. Linux and macOS adoption remains separate.
Changes:
- Restore images before checkout and reuse prepared dependencies, Electron, and Playwright browsers, with the existing setup as fallback.
- Preserve the WSL smoke shard’s setup and pass the target branch plus artifact-read permissions to Windows jobs.
- Update workflow consistency tests, change detection, and documentation.
| File | Description |
|---|---|
build/ripple/vscode.jsonc |
Includes image scripts in test-job change detection. |
build/lib/test/workspaceImage.test.ts |
Checks that Windows producer and consumer download scripts identically. |
build/lib/test/detectMissingCaches.test.ts |
Updates Dev Drive ordering assertions for image restoration. |
.github/workflows/workspace_image/README.md |
Documents Windows adoption, fallback, and cache handling. |
.github/workflows/pr.yml |
Grants artifact-read access and passes the PR target branch. |
.github/workflows/pr-workspace-images.yml |
Updates header comments to reflect Windows adoption. |
.github/workflows/pr-win32-test.yml |
Adds image restoration and conditional checkout/cache behavior while preserving the WSL exception. |
Review effort: Balanced
Phase 2 of #345429, for Windows: the Windows test jobs of pull requests mount the workspace image that pr-workspace-images.yml builds on main, instead of creating an empty Dev Drive and restoring the node_modules and Playwright caches. With an image, the checkout keeps its untracked files and reuses its .git, and the usual install step runs on top of its node_modules, so pnpm installs only what changed since the commit of the image. Without an image, or on any error, the jobs set up as before. The Linux and macOS test jobs follow in their own pull requests. The smoke test shard with the WSL suite, on the 1ES pool, runs none of the image steps and keeps today's setup. Pull requests to release branches look for images of their own branch, find none, and set up as before. The windows-tests call in pr.yml grants actions: read, to find and download the images. The restore step passes --timeout-seconds 240, within the 5 minutes of the step, so that image.ts gives up and cleans up before the runner stops it. Unlike in the pull request, the jobs have no step that compares the dependencies with the image, as image.ts has no `deps` command since image.ts expects, as pr-workspace-images.yml does, which a test keeps equal. Co-authored-by: Alex Dima <alexdima@microsoft.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Ladislau Szomoru (lszomoru)
force-pushed
the
lszomoru/agents/windows-workspace-image-setup
branch
from
November 5, 2026 19:40
45d1bc9 to
28f1878
Compare
Ladislau Szomoru (lszomoru)
marked this pull request as ready for review
November 5, 2026 19:55
Ladislau Szomoru (lszomoru)
enabled auto-merge (squash)
November 5, 2026 19:55
Alexandru Dima (alexdima)
approved these changes
Nov 5, 2026
Ladislau Szomoru (lszomoru)
deleted the
lszomoru/agents/windows-workspace-image-setup
branch
November 5, 2026 20:10
This was referenced Nov 5, 2026
Ladislau Szomoru (lszomoru)
added a commit
that referenced
this pull request
Nov 5, 2026
Phase 2 of #345429, for Linux, after #346270 for Windows: the Linux test jobs of pull requests mount the workspace image that pr-workspace-images.yml builds on main, an ext4 volume on a loop device at the parent of the workspace, instead of restoring the node_modules and Playwright caches. With an image, the checkout keeps its untracked files and reuses its .git, and the usual install steps (the build root, then the root with setup-env.sh) run on top of its node_modules, so pnpm installs only what changed since the commit of the image, and setup-env.sh reuses the sysroots and compilers in its .build folder. The system packages are not in the image, and are installed as before. Without an image, or on any error, the jobs set up as before. The jobs download the scripts of the image exactly as the job that builds the Linux image does, which the test of the Windows jobs now also checks for the Linux jobs. Pull requests to release branches look for images of their own branch, find none, and set up as before. The linux-tests call in pr.yml grants actions: read, to find and download the images. The restore step passes --timeout-seconds 240, within the 5 minutes of the step, so that image.ts gives up, unmounts the image and detaches the loop device before the runner stops it. Co-authored-by: Alex Dima <alexdima@microsoft.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.
Phase 2 of #345429, for Windows, after #346211 (the images), #346254 and #346256 (the deadline of the restore and its cleanup).
The Windows test jobs of pull requests now mount the workspace image that
pr-workspace-images.ymlbuilds onmain, instead of creating an empty Dev Drive and restoring thenode_modulesand Playwright caches. With an image, the checkout keeps its untracked files and reuses its.git, and the usual install step runs on top of itsnode_modules, so pnpm installs only what changed since the commit of the image. Without an image, or on any error, the jobs set up as before. Linux and macOS follow in their own pull requests.What changed
pr-win32-test.yml: before the checkout, the jobs download the image scripts at their commit (aspr-workspace-images.ymldoes, which a test keeps equal), set up Node.js, and restore the image (image.ts restore --timeout-seconds 240, within the 5 minutes of the step). With an image, the Dev Drive,node_modulescache and Playwright cache steps are skipped (the Playwright action would pointPLAYWRIGHT_BROWSERS_PATHinto the workspace instead of the image), and the checkout usesclean: false.pr.yml:windows-testsgetsactions: read, to find and download the images, and passesworkspace_image_branch: ${{ github.base_ref }}, so that pull requests to release branches look for images of their own branch, find none, and set up as before.image.tshas nodepscommand since build: remove the install-state fast path andinstall-fast#346049, and the install step runs on top of the image instead.pr-workspace-images.yml,build/ripple/vscode.jsonc(the image scripts define the test jobs) anddetectMissingCaches.test.ts(the steps before the Dev Drive) follow.What to look for in the checks of this pull request
Electron-Smoke (shard 1/3): "Restore the workspace image" finds the image ofmain, mounts it and setsused=true, and the job summary reports the restore; the Dev Drive,Restore node_modules cacheandRestore Playwright browserssteps are skipped;Setup Electronkeeps the prepared Electron;Install dependenciesinstalls nothing new;Install Playwright Chromiumdownloads nothing.Electron-Smoke (shard 1/3)sets up as before.Validation:
cd build && node --test lib/test/detectMissingCaches.test.ts lib/test/detectChanges.test.ts lib/test/workspaceImage.test.ts lib/test/agentHostTestSelection.test.ts: 35 passedgo run github.com/rhysd/actionlint/cmd/actionlint@latest -shellcheck= .github/workflows/pr-win32-test.yml .github/workflows/pr.yml .github/workflows/pr-workspace-images.yml: only unknown custom runner labels