Skip to content

Re-running the nuget.org publish job fails on packages it already pushed #25665

Closed

Description

@agneszitte

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.WinUI and Uno.Sdk.Private were published, but the 16 packages after Uno.WinUI.Graphics3DWebGpu weren'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.WinUI and Uno.Sdk.Private are pushed last. The uno.templates Uno.Sdk updater picks up new versions from Uno.Sdk.Private, so it should never see a version whose other packages are missing.

How to reproduce it (as minimally and precisely as possible) 🔬

  1. Open build 241054 of "Uno.UI - CI" (master, 7.0.0-dev.2428).
  2. Look at the "Publish to nuget.org" step of attempt 1. It stops with a 403 at Uno.WinUI.Graphics3DWebGpu, after Uno.Sdk.Private and Uno.WinUI were pushed.
  3. 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.yml sets allowPackageConflicts: 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, so dotnet nuget push --skip-duplicate isn'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, then Uno.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

  1. self-assigned this
    on Oct 23, 2026
  2. added
    kind/bug
    triage/untriaged
    on Oct 23, 2026
  3. added a commit that references this issue on Oct 23, 2026
    ae3783d
  4. added a commit that references this issue on Nov 3, 2026
    f0367d5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area/cikind/bugtriage/untriaged

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions