Repository navigation
[ci] Restore official runtime manifests from transferred packages - #40320
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.sh | bash -s -- 40320Or
iex "& { $(irm https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.ps1) } 40320" |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
/rebase |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
| <!-- Final runtime manifests are published to NuGet.org rather than the build feeds. --> | ||
| <RestoreAdditionalProjectSources Condition="'$(_RuntimeManifestVersion)' == '$(VersionBand)'">$(RestoreAdditionalProjectSources);https://api.nuget.org/v3/index.json</RestoreAdditionalProjectSources> | ||
| <!-- Isolated builds can supply the exact runtime packages locally instead of using NuGet.org. --> | ||
| <RuntimeManifestPackageSource Condition="'$(RuntimeManifestPackageSource)' == '' and '$(_RuntimeManifestVersion)' == '$(VersionBand)'">https://api.nuget.org/v3/index.json</RuntimeManifestPackageSource> |
There was a problem hiding this comment.
[moderate] Regression Prevention and Test Coverage - The new source-selection branches have no committed regression coverage. Public Pack never supplies this override, and the existing DotNetProjectTests only evaluates installation paths, so those checks cannot catch NuGet.org being reintroduced into the isolated Windows restore. Add property-evaluation cases for stable manifests with a local override (local source present, NuGet.org absent), stable manifests without an override (NuGet.org retained), and prerelease manifests without an override (no added source), including preservation of existing additional sources. The existing MSBuild property-evaluation test infrastructure can exercise these conditions without signing or device execution.
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are reported for the runtime-manifest package-transfer changes.
No open issues 🎉
What changed in this PR
Repairs official Windows workload provisioning by reusing the exact runtime-manifest packages restored by Pack macOS, avoiding blocked NuGet.org access without changing package versions.
Changes:
- Stage runtime-manifest packages in the existing macOS artifact transfer for internal builds.
- Use the transferred directory during internal Windows provisioning while preserving public/local and prerelease restore defaults.
- Document the official package-transfer path and the requirement to preserve exact package contents.
| File | Description |
|---|---|
src/DotNet/Dependencies/Workloads.csproj |
Adds a configurable runtime-manifest source while retaining the final-runtime NuGet.org default. |
eng/pipelines/arcade/stage-pack.yml |
Stages macOS-restored packages and configures internal Windows provisioning to consume them. |
.github/docs/maui-ci-facts.md |
Documents the transfer mechanism and exact-package requirements. |
Review effort: Balanced
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
| <!-- Final runtime manifests are published to NuGet.org rather than the build feeds. --> | ||
| <RestoreAdditionalProjectSources Condition="'$(_RuntimeManifestVersion)' == '$(VersionBand)'">$(RestoreAdditionalProjectSources);https://api.nuget.org/v3/index.json</RestoreAdditionalProjectSources> | ||
| <!-- Isolated builds can supply the exact runtime packages locally instead of using NuGet.org. --> | ||
| <RuntimeManifestPackageSource Condition="'$(RuntimeManifestPackageSource)' == '' and '$(_RuntimeManifestVersion)' == '$(VersionBand)'">https://api.nuget.org/v3/index.json</RuntimeManifestPackageSource> |
There was a problem hiding this comment.
[moderate] Regression Prevention and Test Coverage - The source-selection branches have no committed regression coverage. Public Pack does not supply the override, and DotNetProjectTests only evaluates installation paths: neither detects NuGet.org being appended alongside the local override, which would reintroduce the original isolated Windows NU1301/HTTP 403 failure. Conversely, removing the stable default would undo #40159's NU1102 repair for public/macOS provisioning. Add MSBuild property-evaluation cases for stable manifests with a local override (local source present, NuGet.org absent), stable manifests without an override (NuGet.org retained), and prerelease manifests without an override (no added source), asserting preservation of existing additional sources. The existing DotNetProjectTests evaluation infrastructure can cover this matrix without signing or device execution.
|
@dalexsoto stamp |
This comment has been minimized.
This comment has been minimized.
PR Test Gate |
| <!-- Final runtime manifests are published to NuGet.org rather than the build feeds. --> | ||
| <RestoreAdditionalProjectSources Condition="'$(_RuntimeManifestVersion)' == '$(VersionBand)'">$(RestoreAdditionalProjectSources);https://api.nuget.org/v3/index.json</RestoreAdditionalProjectSources> | ||
| <!-- Isolated builds can supply the exact runtime packages locally instead of using NuGet.org. --> | ||
| <RuntimeManifestPackageSource Condition="'$(RuntimeManifestPackageSource)' == '' and '$(_RuntimeManifestVersion)' == '$(VersionBand)'">https://api.nuget.org/v3/index.json</RuntimeManifestPackageSource> |
There was a problem hiding this comment.
[moderate] Regression Prevention and Test Coverage - The source-selection branches have no committed regression coverage. Public Pack omits the local override, and DotNetProjectTests only evaluates installation paths; neither asserts that NuGet.org is absent when isolated Windows provisioning supplies RuntimeManifestPackageSource. Appending NuGet.org alongside that override would reintroduce the original NU1301/HTTP 403 failure, while dropping the stable default would undo #40159's NU1102 repair for public/local and macOS provisioning. Add MSBuild property-evaluation cases for stable manifests with a local override (local source present, NuGet.org absent), stable manifests without an override (NuGet.org retained), and prerelease manifests without an override (no added source), asserting that existing additional sources are preserved. The committed DotNetProjectTests property-evaluation pattern can cover these branches without signing or device execution.
Note
Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could test the resulting artifacts from this PR and let us know in a comment if this change resolves your issue. Thank you!
Target Branch
mainnet11, for reviewFor .NET 11 fixes, only a maintainer retargets the approved PR to the active
inflight lane and merges it after CI validates that final base. Do not merge
individual fixes directly into
net11; agents must not retarget or merge.This is the explicitly coordinated shared build-infrastructure repair against
main. It is independent of #40312 and does not change any candidate, inflight, or other protected branch.Description of Change
Reuse the exact runtime-manifest NuGet packages already restored by Pack macOS in the dependent internal Pack Windows job:
microsoft.net.workload.*.manifest-*.nupkgfiles from the existing isolatedtemp/workloadcache into the existingMacNativeArtifactstransfer.RuntimeManifestPackageSourceto that transferred local directory during internal Windows provisioning.Workloads.csprojuses this explicit source instead of requesting NuGet.org.No network-isolation policy, SDK/runtime/package pin, signing, or publication setting changes. A missing local artifact fails explicitly rather than silently falling back to NuGet.org or substituting another package version.
Failure evidence: official
dotnet-mauibuild 3137912, at this PR's exactmainbasedf3291c7610d36940be9c640a809824c3d95f842, fails in Windows Provision SDK & Workloads. Raw log 175 reportsNU1301forhttps://api.nuget.org/v3/index.json, rejected by the CFSClean proxy with HTTP 403. The macOS pack passes. This PR addresses that restore failure, not the build's separate OneLocBuild failure.This complements #40159 rather than reverting its public-CI repair: removing NuGet.org without supplying the exact packages reproduces
NU1102for all four final11.0.100runtime manifests. SDK-bundled manifests are not a safe replacement based on version labels alone: this exact main SDK bundles net10 manifests labeled11.0.100referencing10.0.12, whereas the requested NuGet packages reference10.0.15. The transfer preserves the actual requested package bytes.Searched upstream open and recently merged PRs for the manifest/bootstrap files and
NU1301, including release/inflight-targeted changes. No duplicate package-transfer fix was found; #40060's next-major migration is a separate change.Validation
Fix commit:
1370889ea4e9388c99ec82f2ede6291e232335d4.The original official Windows restore failure is empirically fixed. dotnet-maui build 3138084 (
20261116.5) runs this exact fix SHA on the isolated internal refvalidation/official-manifest-restore-1370889ea4, with the normal official CFSClean policy unchanged. Raw logs retrieved withaz devops invokeconfirm the complete artifact producer/consumer path:11.0.100runtime.nupkgfiles.MacNativeArtifactsintoartifacts/bin.Workloads.csprojrestored in 825 ms, thenBuild succeeded, 0 warnings / 0 errors at2026-11-17T01:01:36Z.Public Windows provisioning is preserved. Replacement maui-pr build 1684648, at PR merge SHA
2d5ee4ee327eb719af851be2309d55d68b7a938f, replaces canceled build 1684642. All four Windows Provision SDK & Build BuildTasks tasks passed: raw logs 114, 115, 116, and 117. Log 114 restoredWorkloads.csprojin 980 ms; each task's SDK and BuildTasks builds completed with 0 warnings / 0 errors.The existing Pester scripts check is red on both this head and its exact main base. Compared the complete
pester-results.xmlartifacts from PR run 43988419959 (1370889ea4e9388c99ec82f2ede6291e232335d4) and baseline run 43966407306 (df3291c7610d36940be9c640a809824c3d95f842): both report 2,671 cases and the same 15 failing test identities, with zero new or removed failures. This does not claim Pester is green.Both full Azure pipelines were still running when this evidence was recorded. No protected main/candidate ref was moved. This feature validation run is not evidence of candidate deployment, complete signing success, or customer publication.
Local fixed-path checks used the repository's exact SDK payload,
11.0.100-rtm.26514.118/ SDK commita586537b38, and fresh restore directories.$EVIDENCEdenotes an isolated session evidence directory; the transferred package directory isartifacts/bin/runtime-manifests.Inspected the successful restore graph: NuGet.org is absent. All four final runtime
.nupkg.metadatafiles name the local artifact source, all four staged packages are byte-identical to their freshly restored originals, and the real provisioning target installs the unchanged current11.0.0and previous10.0.15pack references. The complete nine-package download requirement set is identical before and after the fix. A separate missing-directory restore fails as expected with explicitNU1301. MSBuild evaluation confirms unchanged stable/prerelease defaults and preservation of pre-existing additional sources.Local transport limitation: this Mac cannot establish TLS to NuGet.org v3. The local package-staging fixture was acquired using the already-documented NuGet.org v2 restore override; no alternate endpoint is committed or used for the Windows fix. The committed macOS/public default remains v3. Windows runtime/MSI/signing execution is unavailable locally; the official raw-log evidence above independently confirms the complete manifest artifact producer/consumer and Windows provisioning path. No pipeline/configuration tests were added.
Issues Fixed
Repairs the official Windows runtime-manifest restoration failure demonstrated above. No product issue is closed.