Use CFS rather than public npm registry in PR builds and official builds #9837
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.
This is a replacement for #9243. In that original PR, I was checking in
.npmrc
files which forced all builds (including builds on dev machines) to target Pyright's Azure Artifacts feed. In this PR, those.npmrc
files are generated during PR builds and official builds. in case you're wondering -- PR builds use the CFS feed because if CFS rejects a particular package dependency, we want to find out about that when the dependency is added rather than when we're trying to ship a release. The behavior of other build types (ex. dev machine builds) is unchanged; they will continue to target the public npm registry.In official builds on AzDO, the
.npmrc
files are generated by part of the pipeline that is owned by the Azure Artifacts team. This behavior is triggered by the existence of theAZURE_ARTIFACTS_FEED
variable inazure-pipelines-release.yml
. This is a new feature that they recently shipped.In GitHub PR builds, the
.npmrc
files are generated by a custom action (cfs-npm-authenticate
). The build authenticates with the Azure Artifacts feed using WIF. I'm expecting the initial PR validation build for this PR to fail because I haven't granted the pyright repo access to the relevant service principal yet. After the initial build fails, I will grant that access and verify that the PR build succeeds.Fix https://github.com/microsoft/pyrx/issues/6252