Skip to content

Include NuGet.config in Helix test payloads - #85210

Merged
JoeRobich merged 1 commit into
mainfrom
dev/jorobich/analyzer-tests-approved-nuget-config
Sep 8, 2026
Merged

Include NuGet.config in Helix test payloads#85210
JoeRobich merged 1 commit into
mainfrom
dev/jorobich/analyzer-tests-approved-nuget-config

Conversation

@JoeRobich

@JoeRobich JoeRobich commented Sep 8, 2026

Copy link
Copy Markdown
Member

Fixes a hermeticity gap in Roslyn Helix test work items.

PrepareTests preserves the repository NuGet.config, but HelixTestRunner only included eng and global.json in each generated work-item payload. As a result, runtime NuGet clients such as Microsoft.CodeAnalysis.Testing.ReferenceAssemblies loaded the Helix machine defaults and attempted to resolve packages from nuget.org.

This change includes NuGet.config at every work-item root. The config clears inherited package sources and uses the approved feeds, including dotnet-public.

This addresses the Microsoft.NETCore.App.Ref.10.0.1 failures observed in build 1587731 for #85107.

Validation:

  • Built src/Tools/RunTests/RunTests.csproj
  • Generated 27 local Helix work-item payloads and verified each contained NuGet.config
  • Ran the exact failing SkippedNamespace_MoreDerivedNamespace test with fresh NuGet and temporary package caches; it resolved Microsoft.NETCore.App.Ref.10.0.1 successfully
  • Ran all Microsoft.CodeAnalysis.PublicApiAnalyzers.UnitTests: 317 passed
Microsoft Reviewers: Open in CodeFlow

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 1d6a35c4-0f49-4671-b352-8cac98e9eaa4
Copilot AI lite review requested due to automatic review settings September 8, 2026 21:02
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 2 pipeline(s).
There may be pipelines that require an authorized user to comment /azp run to run.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟢 Approval recommended

The change is a small, targeted update consistent with existing payload setup patterns and directly addresses the missing config in work-item roots.

Review tier: Lite
Findings: None

What changed in this PR

Updates the Helix work-item payload generation in RunTests so each work item includes the repository NuGet.config, ensuring NuGet restore/asset resolution in Helix runs uses the repo-approved feeds rather than machine defaults.

Changes:

  • Add NuGet.config to each generated Helix work-item payload (alongside existing eng and global.json).
  • Preserve the existing payload-shaping approach by using a symbolic link from the work-item root to the repo root NuGet.config.
File Description
src/​Tools/​RunTests/​HelixTestRunner.cs Adds a NuGet.config symlink into each work-item payload directory so Helix executions pick up repo feed configuration.

@JoeRobich
JoeRobich enabled auto-merge September 8, 2026 21:23
@JoeRobich
JoeRobich merged commit 64ee94b into main Sep 8, 2026
31 of 36 checks passed
@dotnet-policy-service dotnet-policy-service Bot added this to the Next milestone Sep 8, 2026
@JoeRobich
JoeRobich deleted the dev/jorobich/analyzer-tests-approved-nuget-config branch September 8, 2026 22:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants