Repository navigation
Description
Current behavior 🐛
-
When the nuget.org push in the "Publish - Dev NuGet" stage stops midway, re-running the failed job doesn't resume it. The re-run fails on the first package the previous attempt already pushed:
Response status code does not indicate success: 409 (A package with ID 'Uno.DevServer' and version '7.0.0-dev.2428' already exists and cannot be modified.) -
The packages are pushed in alphabetical order, so a push that stops midway can leave a version half-published. In build 241054 (7.0.0-dev.2428),
Uno.WinUIandUno.Sdk.Privatewere published, but the 16 packages afterUno.WinUI.Graphics3DWebGpuweren't (see Uno.WinUI.Graphics3DWebGpu is never published, but the Uno.Sdk references it #25654). Those 16 had to be uploaded by hand.
Expected behavior 🎯
- A re-run pushes only the packages that aren't on nuget.org yet.
Uno.WinUIandUno.Sdk.Privateare pushed last. The uno.templates Uno.Sdk updater picks up new versions fromUno.Sdk.Private, so it should never see a version whose other packages are missing.
How to reproduce it (as minimally and precisely as possible) 🔬
- Open build 241054 of "Uno.UI - CI" (master, 7.0.0-dev.2428).
- Look at the "Publish to nuget.org" step of attempt 1. It stops with a 403 at
Uno.WinUI.Graphics3DWebGpu, afterUno.Sdk.PrivateandUno.WinUIwere pushed. - Look at attempts 2 and 3. Both stop with a 409 on
Uno.DevServer, the first package.
Workaround
Upload the remaining packages to nuget.org by hand from the build's nuget-packages artifact.
Root cause
build/ci/templates/nuget-publish-public.ymlsetsallowPackageConflicts: true, but for nuget.org NuGetCommand@2 only skips a conflict whose error contains "The feed already contains". nuget.org's 409 says "already exists and cannot be modified", so the task fails.- NuGetCommand@2 can't pass
-SkipDuplicate. NuGetAuthenticate@1 can't use an API-key service connection, sodotnet nuget push --skip-duplicateisn't an option without moving the key out of the "nuget.org uno packages" service connection.
Suggested fix
In nuget-publish-public.yml:
- On a re-run (
System.JobAttempt> 1), leave out the packages already listed on nuget.org. - Push in batches: all other packages first, then
Uno.WinUI, thenUno.Sdk.Private.
Works on UWP/WinUI
N/A (CI).
Environment
Azure DevOps "Uno.UI - CI", Windows agent, NuGetCommand@2 2.280.1 with NuGet 7.9.0.
Affected platforms
N/A (CI).
Activity
fix(ci): Make nuget.org push re-runs resume
fix(ci): Make nuget.org push re-runs resume