Skip to content

feat: dotnet publish re-entrant - #571

Merged
bruno-garcia merged 3 commits into
masterfrom
bruno-garcia-patch-1
Oct 1, 2025
Merged

feat: dotnet publish re-entrant#571
bruno-garcia merged 3 commits into
masterfrom
bruno-garcia-patch-1

Conversation

@bruno-garcia

Copy link
Copy Markdown
Member

Use --skip-duplicate to allow the job to be retried

From docs:

When pushing multiple packages to an HTTP(S) server, treats any 409 Conflict response as a warning so that other pushes can continue.

Use --skip-duplicate to allow the job to be retried
@asottile-sentry

Copy link
Copy Markdown
Contributor

fwiw the craft targets are intended to not be reentrant to prevent accidental re-release

@bruno-garcia

Copy link
Copy Markdown
Member Author

Got it. I'm this case we end up with half the packages release and half not. Which is a pain to fix by hand. With this change we'll be able to finish the step at least.

@BYK

BYK commented Dec 5, 2024

Copy link
Copy Markdown
Member

@bruno-garcia when you check off a target in publish, it is skipped. Is this multiple packages in a single target? If so, this may be grounds for granting an exception maybe?

@bruno-garcia

bruno-garcia commented Feb 2, 2025

Copy link
Copy Markdown
Member Author

@bruno-garcia when you check off a target in publish, it is skipped. Is this multiple packages in a single target? If so, this may be grounds for granting an exception maybe?

It's a single target. It's just 1 command dotnet publish and it does the job on all packages.
The command is made re-entrant with the flag I added in this PR.

We don't really gain anything by not having that flag in, right? But definitely would be helpful having the flag in.

fwiw the craft targets are intended to not be reentrant to prevent accidental re-release

In this particular case, it won't re-release anything since dotnet publish either fails if it's already there, or just ignores it (the behavior I need with this PR)

@bruno-garcia
bruno-garcia enabled auto-merge (squash) February 2, 2025 19:17
@bruno-garcia
bruno-garcia merged commit 53fcf5d into master Oct 1, 2025
13 checks passed
@bruno-garcia
bruno-garcia deleted the bruno-garcia-patch-1 branch October 1, 2025 19:35
@BYK

BYK commented Oct 1, 2025

Copy link
Copy Markdown
Member

either fails if it's already there, or just ignores it (the behavior I need with this PR)

Just a heads up, I think we should clearly document this as the "just ignores it" is the behavior we explicitly did not want in Craft. Given your circumstances, I think this case deserves the exception but we should clearly document that this is a departure from the norm.

PS: We can also revisit the norm, just saying we should note the odd one out.

BYK pushed a commit that referenced this pull request Oct 1, 2025
Use --skip-duplicate to allow the job to be retried
@bruno-garcia

Copy link
Copy Markdown
Member Author

np, I'll add a note to the README

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.

4 participants