Skip to content

fix(publish): --skip-duplicate so nuget push is idempotent#108

Merged
ChrisonSimtian merged 1 commit into
mainfrom
fix/publish-skip-duplicate
May 22, 2026
Merged

fix(publish): --skip-duplicate so nuget push is idempotent#108
ChrisonSimtian merged 1 commit into
mainfrom
fix/publish-skip-duplicate

Conversation

@ChrisonSimtian

Copy link
Copy Markdown
Collaborator

Summary

Without `--skip-duplicate`, one failed push during `IPublish.Publish` aborts the whole batch, and any retry fails with HTTP 409 on every package that did succeed the first time. We hit this twice today (#107 SolutionPersistence prefix-reservation, then again during key-permission debugging), and it's painful: the release pipeline becomes non-recoverable from any partial-failure state.

Adds an `IPublish.PushSettings` override that calls `.EnableSkipDuplicate()`. Composes on top of the existing `PushSettingsBase` in `Fallout.Components`, so `--source` and `--api-key` still flow through.

Test plan

  • `dotnet build build/_build.csproj -c Release` clean (0 errors)
  • Next release.yml run pushes successfully, including any in-flight 10.3.x recovery
  • Rerunning a release with already-published versions no longer errors

🤖 Generated with Claude Code

Without --skip-duplicate, a single failed push aborts the whole publish
target, and a rerun then fails with HTTP 409 ("already exists") on
every package that did succeed the first time. That makes release.yml
non-recoverable from any partial-failure state, which we hit twice
today (#107 → SolutionPersistence prefix-reservation, then again
mid-key-permission-debug).

With --skip-duplicate, the push step returns success when a version
is already on nuget.org. Reruns are now safe and only the genuinely
missing packages get uploaded.

Wired via IPublish.PushSettings override (Configure<DotNetNuGetPushSettings>),
which composes on top of the existing PushSettingsBase in
Fallout.Components.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@ChrisonSimtian
ChrisonSimtian merged commit ccf4852 into main May 22, 2026
1 check passed
@ChrisonSimtian
ChrisonSimtian deleted the fix/publish-skip-duplicate branch May 22, 2026 08:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant