Repository navigation
ci: start the Linux PR test jobs from the workspace images - #346362
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
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>
Contributor
There was a problem hiding this comment.
🔵 Needs a closer look
No Linux CI results were provided to validate image-hit and fallback runs, timeout cleanup, loop-device mounting, or checkout and native dependency reuse.
No open issues 🎉
What changed in this PR
Extends workspace-image reuse to Linux PR test jobs, following the Windows rollout, to reduce setup time while preserving the existing cache-based setup when an image is unavailable or restoration fails.
Changes:
- Restore Linux workspace images before checkout, preserve their dependencies, and skip redundant dependency and Playwright cache restores.
- Grant Linux jobs image-download permissions and select images from the PR’s target branch.
- Extend script-download consistency tests to Linux and update rollout documentation.
| File | Description |
|---|---|
build/lib/test/workspaceImage.test.ts |
Adds Linux coverage to the image-script download consistency test. |
.github/workflows/workspace_image/README.md |
Documents Linux adoption and reuse of image-provided build tools. |
.github/workflows/pr.yml |
Grants image-download permissions and passes the target branch. |
.github/workflows/pr-workspace-images.yml |
Updates the header comment to reflect Linux adoption. |
.github/workflows/pr-linux-test.yml |
Adds image restoration, conditional checkout cleaning, and cache bypasses. |
Review effort: Balanced
Ladislau Szomoru (lszomoru)
marked this pull request as ready for review
November 5, 2026 20:31
Ladislau Szomoru (lszomoru)
enabled auto-merge (squash)
November 5, 2026 20:32
Logan Ramos (lramos15)
approved these changes
Nov 5, 2026
Ladislau Szomoru (lszomoru)
deleted the
lszomoru/agents/linux-workspace-image-setup
branch
November 5, 2026 21:01
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 Linux, after #346270 for Windows.
The Linux test jobs of pull requests now mount the workspace image that
pr-workspace-images.ymlbuilds onmain(an ext4 volume on a loop device at the parent of the workspace), instead of restoring thenode_modulesand Playwright caches. With an image, the checkout keeps its untracked files and reuses its.git, and the usual install steps run 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. macOS follows in its own pull request.What changed
pr-linux-test.yml: before the checkout, the jobs download the image scripts at their commit (exactly as the Linux job ofpr-workspace-images.ymldoes, which a test now also checks for Linux), set up Node.js, and restore the image (image.ts restore --timeout-seconds 240, within the 5 minutes of the step; on failure it unmounts the image and detaches the loop device). With an image, thenode_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.buildroot install, then the root install, whosesetup-env.shreuses the sysroots, Clang and libc++ in the.buildfolder of the image. The apt packages (xvfb, libkrb5-dev, …) aren't in the image and are installed as before.pr.yml:linux-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.ts deps, which no longer exists).pr-workspace-images.ymlfollow.build/ripple/vscode.jsoncalready lists.github/workflows/workspace_image/**since ci: start the Windows PR test jobs from the workspace images #346270.What to look for in the checks of this pull request
main, mounts it on a loop device and setsused=true, and the job summary reports the restore;Restore node_modules cacheandRestore Playwright browsersare skipped;Install dependenciesprints "Using cached client sysroot"/"Using cached remote sysroot" and installs nothing new;Setup Electronkeeps the prepared Electron when its inputs match;Install Playwright Chromiumdownloads nothing.node_modulescache.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-linux-test.yml .github/workflows/pr.yml .github/workflows/pr-workspace-images.yml: only unknown custom runner labelsNATIVE_BUILD_INPUTSofimage.ts) of the newest Linux image ofmainare the same as on this branch.