craft icon indicating copy to clipboard operation
craft copied to clipboard

feat: dotnet publish re-entrant

Open bruno-garcia opened this issue 1 year ago • 4 comments

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.

bruno-garcia avatar Nov 24 '24 00:11 bruno-garcia

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

asottile-sentry avatar Nov 25 '24 14:11 asottile-sentry

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.

bruno-garcia avatar Dec 05 '24 16:12 bruno-garcia

@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?

BYK avatar Dec 05 '24 20:12 BYK

@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 avatar Feb 02 '25 02:02 bruno-garcia

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 avatar Oct 01 '25 21:10 BYK

np, I'll add a note to the README

bruno-garcia avatar Oct 01 '25 22:10 bruno-garcia