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

Missing value for pypi-token.pypi config value results in the wrong error message. #8503

Closed
4 tasks done
radoshi opened this issue Oct 3, 2023 · 3 comments · Fixed by #8502
Closed
4 tasks done

Missing value for pypi-token.pypi config value results in the wrong error message. #8503

radoshi opened this issue Oct 3, 2023 · 3 comments · Fixed by #8502
Labels
area/config Related to configuration management kind/bug Something isn't working as expected

Comments

@radoshi
Copy link
Contributor

radoshi commented Oct 3, 2023

  • I am on the latest stable Poetry version, installed using a recommended method.
  • I have searched the issues of this repo and believe that this is not a duplicate.
  • I have consulted the FAQ and blog for any relevant entries or release notes.
  • If an exception occurs when executing a command, I executed it again in debug mode (-vvv option) and have included the output below. https://gist.github.com/radoshi/70f1215ca969c8055715d207586d2f80

Issue

When executing poetry config pypi-token.pypi, if the value is missing, poetry returns the error

There is no pypi-token.pypi setting.

This error is rather confusing. It should say that the value is missing.

Real scenario where this happened: I'm using poetry to publish to pypi from a GH release action. I misconfigured the secret, so its not available, which results in an empty string. This results in the GH action failing with There is no pypi-token.pypi setting.

I imagine that people trying to configure a GH action would get similarly confused as me and go down the rabbit hole of making sure that they got poetry install and version correct etc.

I have a draft PR here that I'm happy to convert into a real PR if you would like:
#8502

@radoshi radoshi added kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels Oct 3, 2023
@radoering
Copy link
Member

IMO, it makes sense to improve the message.

@radoering radoering added area/config Related to configuration management and removed status/triage This issue needs to be triaged labels Oct 4, 2023
@radoshi
Copy link
Contributor Author

radoshi commented Oct 4, 2023

Thanks. Took your suggestions and PR is now ready for review.

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/config Related to configuration management kind/bug Something isn't working as expected
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants