Closed marksweb closed 1 week ago
We just pass the corresponding CLI flag to twine upload
. Beyond that, we can't control how it behaves. This should probably be reported on the Twine's tracker.
But in general, I really dislike this flag as this hack is a footgun. I prefer vehsions to be unique, which build backend plugins like setuptools-scm
help me with — this produces different versions for different commits so there's no no need to ignore cases of somebody uploading the same version w/o my knowledge. Plus, there's a corner case for deleted projects that got new owners who they try to upload versions that existed at any point in the past, which this feature would hide and may cause an insanely difficult debugging experience.
@webknjaz Thank you for clarifying, I wasn't sure if there was some pass/fail handling going on here based on what happens.
And I agree with you, it's just a case of that being the easy implementation without changing the versioning scheme from SemVar. It's one of those todo list items to come to one day.
@marksweb here's my solution: https://github.com/ansible/awx-plugins/blob/c7fc0a1/.github/workflows/ci-cd.yml#L485-L538.
I have a workflow setup to ensure merged PRs don't break releases, so it uses
skip-existing
But this causes a 400 because there's an sdist already uploaded for the release.
I can see the wheel gets skipped, but shouldn't the workflow catch an error like this if the flag is set?