-
Notifications
You must be signed in to change notification settings - Fork 309
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make --skip-existing less brittle #332
Comments
Thanks for the report, @mayeut -- I suspect Twine should fix this, but thanks for reporting it in Warehouse too. |
--skip-existing is broken at the moment c.f. pypa/twine#332
--skip-existing is broken at the moment c.f. pypa/twine#332
I fixed the regression in pypi/warehouse#3522, but we should modify this issue to something like "Make --skip-existing less brittle" |
We have a similar problem in Artifactory 6.12.2 rev 61202900. Even if user uses --skip-existing, the twine fails with error. Here is a message returned by Artifactory: "Not enough permissions to delete/overwrite artifact ..." So, current string doesn't match the one returned by Artifactory. Would be great to have a solution that would allow to avoid this kind of situation. |
@di I'm looking into this, thinking that an I'm assuming that just checking the status code is insufficient. twine/twine/commands/upload.py Lines 24 to 48 in 5cb1867
|
@theold190 can you give us more details about the error? I'm disappointed that we're not getting a 429 from PyPI or Artifactory because that would be a reliable status code for a conflict (file exists and cannot be created) |
@sigmavirus24 here is more information:
I am not sure what more information is needed. My guess is that skip_upload code in twine/twine/commands/upload.py expects specific error message. And Artifactory returns a different one. Here are messages that I have already provided in previous comment (see difference marked with bold):
|
I just wanted the content received from the server. Sorry I wasn't specific enough. Thanks for all that detail. @bhrutledge Perhaps we can remove the necessity to check the error message and instead provide what was returned on a log level such that users can debug things if we get an error code like this that could mean "Invalid credentials" just as easily as "You can't do that"? |
@sigmavirus24 Thanks for the suggestion. Can you elaborate on the resulting behavior of |
Thanks for a fast fix! We would like to get a new version of a package to test the fix. Does anyone know how to trigger a release process? Is it done on request or when there are enough fixes? Information in https://github.com/pypa/twine/milestones seems to be a bit outdated. |
Could you make your own package of twine (from git master) to test locally? See https://packaging.python.org/tutorials/packaging-projects/ for how to package a project. https://twine.readthedocs.io/en/latest/contributing.html#making-a-new-release steps 1, 2, 3, 4, 8, and 9 will help you run tests and make a twine package so you can install it into a local virtualenv to test. Twine maintainers don't have a specific systematic "time to make a release" decision process as I understand it. As https://pypi.org/project/twine/#history shows, cadence has been more frequent recently. So I would guess it's likely there will be another point release in 2020. |
@brainwane, thanks for the heads up. I was able to verify that --skip-existing flag works as expected with locally build package and latest 3.0.0. version. Thanks for a fast fix and info! |
twine
checks for message starting withFile already exists
:twine/twine/commands/upload.py
Lines 58 to 61 in bcb73e0
Message has been changed to one starting with
The filename or contents already exist
in pypi/warehouse#3310:https://github.com/pypa/warehouse/blob/969695d030aef8b11d5b052e8731a80746c404c8/warehouse/forklift/legacy.py#L1083-L1094
c.f. failing deployment: https://travis-ci.org/mayeut/gcovr/builds/360424325
The text was updated successfully, but these errors were encountered: