Skip to content

Can Twine improve feedback for existing uploads? #919

@zzzeek

Description

@zzzeek

So the context is yesterday pypi had a problem and the effect was that new project pages, that is after twine does its upload and gives you a new URL to click, were throwing a 500 error.

So from my end, I assumed it had something to do with my package being one of those new "critical" packages, or my two factor wasn't being used for twine (wasn't sure if I had created an API token, turns out I had), or anything like that.

Then what happened was I basically panicked, because SQLAlchemy's URL was throwing a 500 error, repeatedly calling twine upload was seemingly re-uploading the same file over and over, and pypi's status was just happily green "operational".

Basically I had no idea what was going on, because twine kept succeeding, over and over, even though we all know that once you upload a file to pypi, it can't be replaced. So I went nuts making new API tokens, changing configs, and all of that, assuming here comes another "Didn't you know? pypi did BLAH BLAH BLAH you have to change your BLAH BLAH BLAH!" moment, and I could only assume that twine was silently failing in some way.

the actual issue was kind of stupid which is just that the web page itself on pypi couldn't display correctly. it was a display issue in the UX. the file was there, it was fine. pypi veterans knew to look under /simple/ and see that the package was there. If I knew that, I would have just been like, OK great, I'll wait til they fix that. but without any feedback i had no idea what was going on and then you get the big "zzzeek is tweeting at @pypi like a fool' etc. thing.

if you've read this far, you know where I'm going!

is there any way that twine can give some kind of feedback if the file is already there ? Like an option so that it will check for /simple/ to see that the package was uploaded already, and just tell me, or refuse to do the upload if the file was already there. I get that "idempotent" behavior is cool and all but I dont understand the rationale for it in this case. like architecturally I dont actually understand why Pypi isnt using POST semantics for uploading a release and not PUT. Seeing twine actually move the bytes up the wire over and over again, just for the bytes to be thrown in the garbage each time and a happy colorful "all done!" coming back, that seems like not the ideal interface for what is actually happening here.

thanks for listening!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions