Skip to content

engineering: use tar+zstd for win32 node_modules cache#293356

Closed
joaomoreno wants to merge 9 commits intomainfrom
joao/turquoise-tahr
Closed

engineering: use tar+zstd for win32 node_modules cache#293356
joaomoreno wants to merge 9 commits intomainfrom
joao/turquoise-tahr

Conversation

@joaomoreno
Copy link
Copy Markdown
Member

Second attempt after #291624 and revert #291740

tmm1 and others added 9 commits August 6, 2025 09:38
@joaomoreno joaomoreno requested a review from lszomoru as a code owner February 6, 2026 09:55
Copilot AI review requested due to automatic review settings February 6, 2026 09:55
@joaomoreno joaomoreno marked this pull request as draft February 6, 2026 09:56
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR switches the Windows node_modules caching mechanism from 7z compression to tar+zstd compression for improved build performance. This is a second attempt after the initial PR #291624 was reverted in #291740. The change reduces the extraction time from 120-180 seconds to approximately 60 seconds by leveraging tar and zstandard utilities that are bundled in GitHub Actions and Azure Pipelines Windows images.

Changes:

  • Replaced 7z.exe commands with tar.exe+zstd for node_modules caching on Windows
  • Updated cache file extension from .7z to .tzst
  • Updated cache salt timestamp to invalidate old caches

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
build/azure-pipelines/win32/steps/product-build-win32-compile.yml Updated extraction and creation commands to use tar+zstd instead of 7z
build/azure-pipelines/win32/product-build-win32-node-modules.yml Updated creation command to use tar+zstd instead of 7z
build/.cachesalt Updated timestamp to invalidate old 7z-based caches
.github/workflows/pr-win32-test.yml Updated extraction and creation commands to use tar+zstd instead of 7z
.github/workflows/pr-node-modules.yml Updated creation command to use tar+zstd instead of 7z

@joaomoreno
Copy link
Copy Markdown
Member Author

@copilot There's a bug, CI fails when running the Extract node_modules cache:

Run & "C:\Program Files\Git\usr\bin\tar.exe" -xf .build/node_modules_cache/cache.tzst -C . --force-local --use-compress-program "zstd -d"
tar (child): .build/node_modules_cache/cache.tzst: Cannot open: No such file or directory
tar (child): Error is not recoverable: exiting now
/usr/bin/tar: Child returned status 2
/usr/bin/tar: Error is not recoverable: exiting now
Error: Process completed with exit code 1.

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 6, 2026

@joaomoreno I've opened a new pull request, #293358, to work on those changes. Once the pull request is ready, I'll request review from you.

@joaomoreno joaomoreno closed this Feb 6, 2026
@vs-code-engineering vs-code-engineering bot locked and limited conversation to collaborators Mar 23, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants