ci: remove --no-optional from vscode dependency install (fix #9140)#9180
ci: remove --no-optional from vscode dependency install (fix #9140)#9180vhvb1989 wants to merge 1 commit into
Conversation
esbuild ships its platform-specific binary (@esbuild/<platform>) as an optional dependency. Installing with 'npm ci --no-optional' drops that binary, causing the vscode ADO pipeline Test task to fail on all three OSes with '@esbuild/<platform> could not be found'. Remove --no-optional from both the ADO job and the GitHub Actions workflow so the correct esbuild platform binary is installed. Fixes #9140 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: bfac0afb-0a7c-4406-93f8-ee4506b494e6
|
Azure Pipelines: 22 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
|
Azure Pipelines: 22 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
📋 Prioritization NoteThanks for the contribution! The linked issue isn't in the current milestone yet. |
jongio
left a comment
There was a problem hiding this comment.
The same npm ci --no-optional pattern (with a preceding global npm i -g npm) is still in eng/pipelines/templates/jobs/build-scan-vscode.yml line 38. That job runs ci-package.ps1 -> npm run build:esbuild -> node esbuild.mjs, so it'll hit the same missing @esbuild/<platform> failure the moment it runs. It's wired into the build-notice pipeline rather than the PR gate, so it doesn't block here, but it has the identical latent bug. Worth dropping --no-optional there too for parity while you're in this area.
Summary
Fixes #9140.
The
azure-dev - vscodeADO pipeline Test task fails on all three OSes for any PR touchingext/vscodewith:Root cause
The dependency install step used
npm ci --no-optional. esbuild ships its platform-specific binary (@esbuild/<platform>) as an optional dependency, so--no-optionaldrops it, breaking bothbuild:esbuildand the extension-host test runner. Recent global npm (npm i -g npm) strictly honors--no-optional, which is why this regressed silently on ADO while GitHub Actions (using setup-node's bundled npm) stayed green.Change
Remove
--no-optionalfrom the dependency install step in:eng/pipelines/templates/jobs/vscode-build.yml(ADO job).github/workflows/vscode-ci.yml(GitHub Actions, for parity)