Skip to content

Engineering - start the Component Fixtures jobs from the workspace images - #347300

Merged
Ladislau Szomoru (lszomoru) merged 1 commit into
mainfrom
lszomoru/agents/component-fixtures-workspace-image
Nov 10, 2026
Merged

Ladislau Szomoru (lszomoru) merged 1 commit into
mainfrom
lszomoru/agents/component-fixtures-workspace-image

Conversation

@lszomoru

Copy link
Copy Markdown
Member

Follow-up of #347275 and #347287, for #345429: the two jobs of component-fixtures.yml that install the dependencies, Playwright Fixture Tests and Screenshots, start from the workspace image of main, like the jobs of pr.yml.

What changes

  • Image steps: both jobs download the image scripts, set up Node.js and restore the Linux image before the checkout, exactly like the jobs of pr.yml (the steps are defined in Playwright Fixture Tests and reused with YAML anchors), and check out with clean: false when they mounted one. The install steps are unchanged, and install only what changed since the commit of the image.
  • Pull requests and pushes: the workflow also runs on pushes to main and release/*. Pull requests use the images of their base branch, and pushes those of their branch, so pushes to main also start from an image, while release branches, which have no images, install everything.
  • No pnpm store cache: without an image, or on any error or timeout of the restore, the jobs install everything with a plain pnpm install, like the jobs of pr.yml. The workflow no longer restores or saves pnpm-store-component-fixtures, which only these jobs used.
  • Playwright browsers: the jobs keep restoring the Playwright browsers cache, also with an image. They install full Chromium, while the image only holds Chromium's headless shell, so restore-playwright points PLAYWRIGHT_BROWSERS_PATH at the cached browsers in the workspace instead of the image's. Pushes to main keep saving that cache.
  • Permissions: the workflow gets actions: read to find and download the image artifacts.
  • Guard test and docs: workspaceImage.test.ts checks that both jobs download the image scripts like the jobs that build the images, and the workspace image README, the CI caches README and the header of pr-workspace-images.yml list them.

Reviewers should know

  • Playwright Fixture Tests gains little, if anything: with the store cache, its checkout, store restore and install take about 20 s in recent runs, and restoring the Linux image takes about 12–20 s on its own. It moves to the image mostly so that the workflow no longer depends on the pnpm store.
  • Screenshots should gain more: its 150-commit checkout, store restore and build install (which builds native modules) take about 55–75 s in recent runs.
  • Without an image, both jobs now download every package instead of restoring the store cache, so they set up more slowly in that case.
  • Merging this pull request builds new images, since it changes pr-workspace-images.yml.

How to test

This pull request's own run of Component Fixtures runs both jobs: each one reports in its job summary that it restored an image, or a Workspace image warning when it installed everything instead.

  • cd build && node --test lib/test/workspaceImage.test.ts lib/test/detectChanges.test.ts lib/test/detectMissingCaches.test.ts lib/test/agentHostTestSelection.test.ts: passed, 36 tests.
  • cd build && pnpm run typecheck: passed.
  • ./node_modules/.bin/eslint build/lib/test/workspaceImage.test.ts: passed.
  • actionlint -shellcheck= .github/workflows/component-fixtures.yml .github/workflows/pr-workspace-images.yml (actionlint 1.7.12): passed, apart from the custom runner labels.
  • Not run locally: the jobs themselves, with and without an image, and a push to main, which runs after merging.

🤖 Authored with GitHub Copilot on behalf of Ladislau Szomoru (@lszomoru).

…ages

Playwright Fixture Tests and Screenshots mount the workspace image of main before the checkout, on pull requests and on pushes, like the jobs of pr.yml, and install only what changed since. Pull requests use the images of their base branch, and pushes those of their branch, so release branches, which have no images, install everything. Without an image, or on any error, the jobs install everything without the pnpm store cache, which the workflow no longer restores or saves: it was the only user of pnpm-store-component-fixtures.

The jobs keep the Playwright browsers cache, also with an image: they install full Chromium, while the image holds only Chromium's headless shell. workspaceImage.test.ts checks that both jobs download the image scripts like the jobs that build the images.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings November 10, 2026 10:31
@lszomoru
Ladislau Szomoru (lszomoru) marked this pull request as ready for review November 10, 2026 10:31

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues remain for the Component Fixtures workspace-image reuse changes.

No open issues 🎉

What changed in this PR

Extends workspace-image reuse to the Component Fixtures workflow, following the earlier migration of PR build and test jobs.

Changes:

  • Restores workspace images before checkout in Playwright Fixture Tests and Screenshots, preserving installed dependencies when an image is available.
  • Removes pnpm store caching while retaining the separate Playwright browser cache and full-install fallback.
  • Extends the script-download guard test and updates workspace-image and cache documentation.
File Description
build/​lib/​test/​workspaceImage.test.ts Adds both fixture jobs to the image-script download guard test.
.github/​workflows/​workspace_image/​README.md Documents fixture-job image reuse and fallback behavior.
.github/​workflows/​pr-workspace-images.yml Updates header comments to list fixture jobs as image consumers.
.github/​workflows/​component-fixtures.yml Adds shared image setup steps and permissions; removes pnpm store caching.
.github/​workflows/​caches/​README.md Documents fixture jobs’ uncached-install fallback.

Review effort: Balanced

@lszomoru
Ladislau Szomoru (lszomoru) merged commit 1564f10 into main Nov 10, 2026
53 checks passed
@lszomoru
Ladislau Szomoru (lszomoru) deleted the lszomoru/agents/component-fixtures-workspace-image branch November 10, 2026 11:54
@vs-code-engineering vs-code-engineering Bot added this to the 1.147.0 milestone Nov 10, 2026
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.

4 participants