Skip to content

[tests] Use dotnet-public for CI package resolution - #12198

Merged
jonathanpeppers merged 3 commits into
mainfrom
jonathanpeppers-fix-cfsclean-nuget-feeds
Jul 22, 2026
Merged

[tests] Use dotnet-public for CI package resolution#12198
jonathanpeppers merged 3 commits into
mainfrom
jonathanpeppers-fix-cfsclean-nuget-feeds

Conversation

@jonathanpeppers

Copy link
Copy Markdown
Member

CFSClean reports network-isolation warnings when tests and CI tooling resolve packages directly from public NuGet endpoints. Route those package downloads through the existing dnceng dotnet-public Azure Artifacts feed and rely on the repository NuGet.config for generated test projects and the API-docs tool installation.

Direct .nupkg test downloads now use the feed's V3 package base address, while obsolete ExtraNuGetConfigSources public overrides are removed. No fallback to nuget.org is retained.

Xamarin.Google.Android.InstallReferrer 1.1.2.6 is not currently mirrored to dotnet-public; InstallAndRunTests.GradleFBProj will require that package to be mirrored.

  • Useful description of why the change is necessary.
  • Links to issues fixed
  • Unit tests

Validation:

  • FilterAssembliesTests: 4 passed
  • Forced no-cache restore of the generated DotNetBuild project using its generated NuGet.config
  • boots 1.1.0.36 installation using the repository NuGet.config
  • Test and automation endpoint scan for api.nuget.org, www.nuget.org, and globalcdn.nuget.org

jonathanpeppers and others added 2 commits July 21, 2026 13:48
Route test package downloads and CI tool installation through the dnceng dotnet-public Azure Artifacts feed. Remove public NuGet overrides from generated test configurations.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 275239ae-25dd-465c-baca-77875b6b4b0f
Rely on the repository NuGet.config for the boots tool source and retain the informational NuGet package link in the device test comment.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 275239ae-25dd-465c-baca-77875b6b4b0f
Copilot AI review requested due to automatic review settings July 21, 2026 19:05

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.

Pull request overview

Routes test/CI package resolution away from public NuGet endpoints and through the dnceng dotnet-public Azure Artifacts feed by relying on the repository NuGet.config and updating direct .nupkg downloads.

Changes:

  • Removed ExtraNuGetConfigSources overrides pointing at api.nuget.org from generated test projects.
  • Updated FilterAssembliesTests direct package downloads to use the dotnet-public V3 flat2 package base address.
  • Updated the API docs pipeline to install the boots tool without explicitly adding nuget.org as a source.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
tests/MSBuildDeviceIntegration/Tests/InstallAndRunTests.cs Removes nuget.org override for a generated device-integration test project.
src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/Tasks/FilterAssembliesTests.cs Switches direct .nupkg downloads from nuget.org to dotnet-public flat-container URLs.
src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/BuildTest.cs Removes nuget.org override so restores use the repo NuGet.config feeds only.
build-tools/automation/azure-pipelines-apidocs.yaml Removes --add-source nuget.org from dotnet tool update so it uses repo feeds after NuGetAuthenticate.
Comments suppressed due to low confidence (1)

tests/MSBuildDeviceIntegration/Tests/InstallAndRunTests.cs:2532

  • This test no longer adds nuget.org as an extra source, so package restore relies entirely on the repo NuGet.config feeds. Since this project references Xamarin.Google.Android.InstallReferrer 1.1.2.6 (and the PR description notes it is not mirrored to dotnet-public), the build will fail in network-isolated CI until that package is mirrored (or the test switches to a mirrored package/version).
			var proj = new XamarinAndroidApplicationProject (packageName: PackageUtils.MakePackageName (runtime)) {
				IsRelease = isRelease,
				OtherBuildItems = {
					new AndroidItem.TransformFile ("Transforms\\Metadata.xml") {
						TextContent = () => $@"<metadata><attr path=""/api/package[@name='{gradleModule.PackageName}']"" name=""managedName"">Facebook</attr></metadata>",
					},

Normalize NuGet flat-container version paths to lowercase and cover prerelease versions with a focused regression test.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 275239ae-25dd-465c-baca-77875b6b4b0f
@jonathanpeppers jonathanpeppers added the ready-to-review This PR is ready to review/merge, I think any CI failures are just flaky (ignorable). label Jul 21, 2026
@jonathanpeppers
jonathanpeppers enabled auto-merge (squash) July 21, 2026 22:04
@jonathanpeppers
jonathanpeppers merged commit 8df1e87 into main Jul 22, 2026
44 checks passed
@jonathanpeppers
jonathanpeppers deleted the jonathanpeppers-fix-cfsclean-nuget-feeds branch July 22, 2026 06:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-review This PR is ready to review/merge, I think any CI failures are just flaky (ignorable).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants