Repository navigation
fix(ci): Make nuget.org push re-runs resume (backport #25666) - #25967
Merged
Merged
Conversation
Re-running the nuget.org publish job failed on the first package the previous attempt had pushed: NuGetCommand@2 can't pass -SkipDuplicate, and its allowPackageConflicts doesn't recognize nuget.org's 409. A prepare step now sorts the packages into batches, leaving out the ones already on nuget.org on a re-run (System.JobAttempt > 1). The batches are pushed in order, with Uno.WinUI and then Uno.Sdk.Private last, so a push that stops midway doesn't expose a version whose other packages are missing. Fixes #25665 Co-Authored-By: Claude Opus 5.5 <[email protected]> (cherry picked from commit ae3783d)
Co-Authored-By: Claude Opus 5.5 <[email protected]> (cherry picked from commit a89958b)
Co-Authored-By: Claude Opus 5.5 <[email protected]> (cherry picked from commit e16a487)
The CI key can't create a package ID, so the push used to stop midway with an unexplained 403. The prepare step now checks every package ID first and, if one isn't on nuget.org yet, fails before pushing anything with an error that names the file to upload by hand. Co-Authored-By: Claude Opus 5.5 <[email protected]> (cherry picked from commit 677baf6)
- Define the last batches once, as package IDs in pushBatches. - Don't retry nuget.org answers that a retry won't change. - Log the 403 hint as its own warning. Co-Authored-By: Claude Opus 5.5 <[email protected]> (cherry picked from commit 987e24b)
1 of 5 tasks
agneszitte
approved these changes
Nov 3, 2026
Merged
1 task done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
GitHub Issue: closes #25665
PR Type:
🏗️ Build or CI related changes
What changed? 🚀
Before:
Uno.DevServerin build 241054). NuGetCommand@2 can't pass-SkipDuplicate, and itsallowPackageConflictsonly recognizes Azure Artifacts' conflict message, not nuget.org's.Uno.Sdk.PrivateandUno.WinUIwithout their other packages. That happened with 7.0.0-dev.2428.After (in
build/ci/templates/nuget-publish-public.yml, used by the dev and release publish stages):Uno.WinUI(what apps resolve),Uno.Sdk.Private(what the uno.templates Uno.Sdk updater picks new versions from)..nupkgto upload by hand from thenuget-packagesartifact, and says to re-run once it's listed. Today that case shows up as an unexplained 403 halfway through the push.System.JobAttempt> 1), the step leaves out packages already listed on nuget.org, so the re-run pushes only what's missing. First attempts still push everything, so an unexpected duplicate still fails.allowPackageConflictsis removed from the nuget.org push, since it had no effect there.Why not
dotnet nuget push --skip-duplicate: NuGetAuthenticate@1 can't use an API-key service connection, so it would need the nuget.org key as a separate pipeline secret. That's one more place to rotate it every 30 days.Validation
New package Uno.WinUI.FakeNotPublished isn't on nuget.org yet, and CI can't create a new package ID. Upload Uno.WinUI.FakeNotPublished.7.0.0-dev.2428.nupkg from this build's nuget-packages artifact at https://www.nuget.org/packages/manage/upload (owner: unoplatform), wait until it's listed, then re-run this job.Known limit
nuget.org doesn't list a new package right away: today's manual uploads took up to ~20 minutes. A re-run started sooner than that can still hit a 409 on a package the previous attempt just pushed. The step prints this, and a later re-run then completes the push.
PR Checklist ✅
Screenshots Compare Test Runresults.🤖 Generated with Claude Code
This is an automatic backport of pull request #25666 done by [Mergify](https://mergify.com).