Skip to content
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

poetry should fail when it can't upload a dist #920

Closed
3 tasks done
cjw296 opened this issue Feb 27, 2019 · 13 comments
Closed
3 tasks done

poetry should fail when it can't upload a dist #920

cjw296 opened this issue Feb 27, 2019 · 13 comments
Labels
area/publishing Related to PyPI/PEP 503 publishing

Comments

@cjw296
Copy link

cjw296 commented Feb 27, 2019

  • I am on the latest Poetry version.

  • I have searched the issues of this repo and believe that this is not a duplicate.

  • If an exception occurs when executing a command, I executed it again in debug mode (-vvv option).

  • OS version and name: See below

  • Poetry version: See below

Issue

See this build log:
https://circleci.com/gh/cjw296/carthorse/26

Even though it failed to upload the wheel, poetry returns a zero return code.

I can reproduce this locally too:

$ poetry publish --build
Building carthorse (0.1.0)
 - Building sdist
 - Built carthorse-0.1.0.tar.gz

 - Building wheel
 - Built carthorse-0.1.0-py2.py3-none-any.whl

Publishing carthorse (0.1.0) to PyPI
 - Uploading carthorse-0.1.0-py2.py3-none-any.whl 100%
                                                                                                                             
[HTTPError]                                                                                                   
400 Client Error: File already exists. See https://pypi.org/help/#file-name-reuse for url: https://upload.pypi.org/legacy  
/                                                                                                                          
                                                                                                                             
publish [-r|--repository REPOSITORY] [-u|--username USERNAME] [-p|--password PASSWORD] [--build]

$ echo $?
0
@madig
Copy link

madig commented Feb 27, 2019

I ran into the same issue with misspelled upload credentials -- poetry quietly stopped uploading and returned a zero exit status, no error message.

@cjw296
Copy link
Author

cjw296 commented Feb 27, 2019

@madig - did it write an error to stderr in your case?

@madig
Copy link

madig commented Feb 27, 2019

Nothing.

> poetry config repositories.mypypi https://test.pypi.org/legacy/
> poetry config http-basic.mypypi assadas asdddfdfdsf
> poetry publish -r mypypi
Publishing statmake (0.1.0) to mypypi
> echo $LASTEXITCODE
0

@cjw296
Copy link
Author

cjw296 commented Feb 27, 2019

Oh, that's even sadder :'(

@stale
Copy link

stale bot commented Nov 13, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Nov 13, 2019
@madig
Copy link

madig commented Nov 13, 2019

Issue has been fixed in current version I think.

@stale stale bot removed the stale label Nov 13, 2019
@cjw296
Copy link
Author

cjw296 commented Nov 15, 2019

@bitprophet has seen this with the latest release attempting to upload to a devpi server. Not error, nothing logged, but also nothing uploaded.

@bitprophet
Copy link

FWIW that was on Poetry 0.12.17 and I gather there have been newer prereleases floating around. Happy to try again later on something newer.

@cjw296
Copy link
Author

cjw296 commented Dec 4, 2019

try this:

curl -sSL https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py > get-poetry.py
python3.6 get-poetry.py -p
source $HOME/.poetry/env

@bitprophet
Copy link

bitprophet commented Dec 4, 2019

Same behavior under 1.0.0b8/master unfortunately (though, with less whitespace between the username and password prompts).

Which reminds me we haven't described the full behavior yet: it's not only that there is no upload, but it does prompt for the index's auth; however it's clearly not submitting the auth either as I can put any random garbage in and get no error or other output. All of this is the same with -vvv in play.

Under 0.12.17, there's maybe 4 lines of whitespace between the username and password prompts; under 1.0.0b8 there are no blank lines. No idea if that helps 😂

Other random details: I ran 0.12.17 under Python 3.6.7; and 1.0.0b8 under (patched w/ modern TLS stuff, I believe) Python 2.7.5.

@finswimmer finswimmer added the area/publishing Related to PyPI/PEP 503 publishing label Feb 8, 2020
@jonathanunderwood
Copy link

Issue #2254 is also related to this.

@dimbleby
Copy link
Contributor

dimbleby commented Nov 6, 2022

all seems to be fixed now: I tried with

  • a non-existent package
  • bad credentials

and got non-zero error codes.

The redirect case was fixed at #3083.

I think that covers everything in this thread: close it out, and invite folk to raise new issues if they need to.

Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area/publishing Related to PyPI/PEP 503 publishing
Projects
None yet
Development

No branches or pull requests

7 participants