-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Installing private packages from GAR in Docker build fails with 500 Internal Server Error on Poetry 1.8.0 #9026
Comments
500 Internal Server Error is a server error, you will want to report this to whoever is responsible for the server. meanwhile I guess this is related to the new "lazy wheel" stuff: see blog post and release notes for discussion of what that is and how to disable it if you need to do so |
If I report it to the GAR team, and say that it works with Poetry 1.7.1 but fails with Poetry 1.8.0, will that not lead me back here? |
In either case, adding |
no. a server error is exactly what it says it is: a server error. if the server (GAR) believes the client (poetry) is doing something wrong, it should return a 4XX error. 5XX is acknowledging that the problem is at their end. sometimes the way these things go is that the maintainer of the server says: ah, that is a client error - just not one that I had remembered to handle. But at least then they have told us what it is they think the client is doing wrong. |
I might make sense to add 500 to poetry/src/poetry/inspection/lazy_wheel.py Line 614 in fbffe8d
Even if good servers will return a more specific code like the ones we already catch but servers that are not able to handle it gracefully just fail with an internal error. I don't think it hurts to be more robust on our side: #9030 |
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. |
-vvv
option) and have included the output below.Issue
I have a Python service whose pyproject.toml includes some dependencies from a private Google Artifact Registry Python repository. Until yesterday, this all worked fine. Poetry is installed in the container via:
and this keyring, given an environment with active application credentials, is able to authenticate me to my GAR repository and install the required dependencies. A build ran this morning and failed with the following error:
The image to this point in the build had installed Poetry 1.8.0. I then went back to this step in the build and added:
poetry self update 1.7.1
. The build completed successfully after doing this.poetry install
commands on my local machine, running Arch Linux (uname -r == 6.6.16-1-lts
) with Python 3.12.1, complete successfully whether I have Poetry 1.7.1 or Poetry 1.8.0 installed, so this seems to only impact Docker.This error occurs even if I am interacting with a container; if I cut off the Dockerfile to the instruction just before the
poetry install
and run the poetry install myself, I get the same 500 error. If I then take the URL given in the error message andcurl
it manually, I get a 200 response. Similarly I get a 200 response withrequests
in a Python interactive session.I have tried this with multiple GAR repositories across multiple GCP projects under multiple accounts, so it is not related to a specific GAR repository or GCP account.
Here's a minimal version of the Dockerfile I'm using:
My temporary fix is to add the following to the
# install poetry
instruction:&& poetry self update 1.7.1
at which point it works fine.
To summarize:
poetry install
commands that install from private GAR sources throw 500 Internal Server Error.The text was updated successfully, but these errors were encountered: