Fix internal feed auth in unofficial CI pipeline#54362
Merged
Merged
Conversation
…udit in tests The unofficial CI pipeline (1472) does not have the AzureDevOps-Artifact-Feeds-Pats variable group linked, causing $(dn-bot-dnceng-artifact-feeds-rw) to resolve to a literal string instead of a PAT. This results in 401 Unauthorized errors when Helix test machines try to access internal NuGet feeds. Use $(System.AccessToken) instead, which is always available in any AzDO pipeline. The build service identity already has read access to the internal feeds. Additionally, disable NuGet audit (NuGetAudit=false) in two tests that intentionally reference old vulnerable packages (System.Net.Http 4.3.0, System.Text.RegularExpressions 4.3.0, Microsoft.NETCore.App 2.1.0) for conflict resolution testing. The NU1903 vulnerability warnings were causing assertion failures. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates unofficial internal CI to authenticate private NuGet feeds without relying on the missing PAT variable group, and adjusts tests that intentionally restore vulnerable legacy packages.
Changes:
- Replaces private feed setup token usage with
$(System.AccessToken)ineng/build.yml. - Disables NuGet audit in two targeted tests that intentionally use vulnerable package versions.
- Adds Helix test step conditions to run after failed prior steps.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
eng/build.yml |
Updates private feed credential token and Helix test step conditions. |
src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildADesktopLibrary.cs |
Disables NuGet audit for assembly conflict resolution test. |
src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToControlGeneratedAssemblyInfo.cs |
Disables NuGet audit for target framework display name test projects. |
Comments suppressed due to low confidence (2)
eng/build.yml:139
- This condition makes the Helix test step run even when an earlier step in the job fails, including the preceding Build or private feed credential setup. That can submit Helix work with missing or stale artifacts and turn a setup/build failure into additional noisy failures; leave the default succeeded() condition (or gate specifically on the build step succeeding) so tests only run after the artifacts they depend on were produced.
condition: succeededOrFailed()
eng/build.yml:180
- This condition makes the Helix test step run even when an earlier step in the job fails, including the preceding Build or private feed credential setup. That can submit Helix work with missing or stale artifacts and turn a setup/build failure into additional noisy failures; leave the default succeeded() condition (or gate specifically on the build step succeeding) so tests only run after the artifacts they depend on were produced.
condition: succeededOrFailed()
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
46c18b3 to
79bf8c8
Compare
joeloff
approved these changes
May 18, 2026
Member
Author
|
/backport to release/8.0.4xx |
Contributor
|
Started backporting to |
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.
Summary
The unofficial CI pipeline (1472) does not have the
AzureDevOps-Artifact-Feeds-Patsvariable group linked, causing `` to resolve to a literal string instead of a PAT. This results in 401 Unauthorized errors when Helix test machines try to access internal NuGet feeds (e.g.dotnet8-internal).Changes
eng/build.yml
Use
instead offor the feed credential token.System.AccessTokenis always available in any AzDO pipeline — no variable group required. The build service identity already has read access to the internal feeds.Test fixes
Disable NuGet audit (
NuGetAudit=false) in two tests that intentionally reference old vulnerable packages for conflict resolution testing:It_resolves_assembly_conflicts_with_a_NETFramework_library— System.Net.Http 4.3.0, System.Text.RegularExpressions 4.3.0CheckTargetFrameworkDisplayName— Microsoft.NETCore.App 2.1.0The NU1903 vulnerability warnings were causing assertion failures.
Validation
Verified on internal ADO PR build — all tests pass with these changes.