CFSClean: Rush toolchain private-feed fix + transient tool-install retries - #3718
Open
Gavin Barron (gavinbarron) wants to merge 2 commits into
Open
CFSClean: Rush toolchain private-feed fix + transient tool-install retries#3718Gavin Barron (gavinbarron) wants to merge 2 commits into
Gavin Barron (gavinbarron) wants to merge 2 commits into
Conversation
After #3696/#3697/#3703, pipeline 187's SDK dependency restore is clean, but 2 residual registry.npmjs.org hits remain in the Rush Build step. They are Rush self-installing its own toolchain: `rush install` downloads the pinned Rush and pnpm packages into ~/.rush via `npm install`, and those npm invocations do not honor the transformed common/config/rush/.npmrc registry, so they fall back to registry.npmjs.org (verified: build 231349, node.exe during Rush Build). Fix: set $env:npm_config_registry to the authenticated private feed (read from ~/.npmrc) at the top of the Rush Build step, mirroring the same approach already used in GenerateServiceModule.ps1 for autorest's internal npm calls. npm_config_registry is the highest-precedence npm config source and is inherited by every child process (npx -> rush -> npm), so it covers the self-install npm calls that bypass the .npmrc. Auth continues to come from ~/.npmrc (the URL matches). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: d3f8fec7-b00b-46be-ba39-7e1f3e7f7188
…liability) The Weekly PowerShell V2 Build (221) intermittently fails at network-dependent tool-install steps in the shared install-tools.yml (observed: UseDotNet@2 extraction collision "dotnet.exe already exists", and Install Rush). These are transient — 187/663 pass on the same template. Add retryCountOnTaskFailure: 2 to the UseDotNet@2 (x2), NodeTool@0, and the three Npm@1 install steps so a transient failure retries instead of failing the whole generation build, improving the odds of a clean, trustworthy CFSClean validation run. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: d3f8fec7-b00b-46be-ba39-7e1f3e7f7188
Draft
3 tasks
Ramses Sanchez-Hernandez (ramsessanchez)
approved these changes
Aug 13, 2026
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.
CFSClean: fix Rush toolchain self-install npm egress + harden transient tool installs
Two related changes to the shared
common-templates/install-tools.yml(used by pipelines 187, 221, 663).1. Force the Rush toolchain self-install onto the private npm feed (CFSClean, strict tier)
After #3696 / #3697 / #3703, the SDK dependency restore is clean, but a validation run (build 231349) still showed 2 residual
registry.npmjs.orghits (PolicyViolation = CFSClean, the strict tier) in the Rush Build step. They are Rush self-installing its own toolchain —rush installbootstraps the pinned Rush (5.170.1) and pnpm (10.32.1) by runningnpm installinto~/.rush/..., and those self-install calls do not honor the transformedcommon/config/rush/.npmrcregistry, so they fall back toregistry.npmjs.org.Fix: set
$env:npm_config_registryto the authenticated private feed (read from~/.npmrc) at the top of the Rush Build step — the same technique already used inGenerateServiceModule.ps1for autorest's internal npm calls.npm_config_registryis the highest-precedence npm config source and is inherited by every child process (npx→rush→npm).2. Retry transient tool-install steps (build reliability)
The Weekly build (221) intermittently fails at network-dependent installs in this template (observed:
UseDotNet@2extraction collisiondotnet.exe already exists, andInstall Rush). AddedretryCountOnTaskFailure: 2to theUseDotNet@2(x2),NodeTool@0, and the threeNpm@1install steps so a transient failure retries instead of failing the whole generation build — improving the odds of a clean, trustworthy CFSClean validation run.Scope / tiers
CFSClean)registry.npmjs.orgegress for 187/221/663.www.powershellgallery.com/ CDN) is a separate CFSClean2-tier item, remediated in a follow-up (route module installs through a private PSResource feed).Validation
187 build 233065 (this branch) in progress; expect
registry.npmjs.org = 0in the Rush Build step. Then re-run 221/663.