-
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
Add a graceful retry logic for intermittent network failure when downloading packages #2736
Comments
Strangely I was about to file an issue for this and saw this near the top. Same problem at my work, the corp proxies are a touch flaky and will occasionally fail a connection, with a long set of dependencies to resolve you're almost assured to get a network failure which derails the whole process. I have a fix that I've been using for forever now, using urllib3.Retry. I'm still testing it against poetry 1.10.0 so I haven't created a PR yet but it's worked solidly from 0.12.something up to 1.9.0: https://github.com/python-poetry/poetry/compare/master...danmur:retry-bad-status-line?expand=1 If I don't get any critical feedback in the next few days, and it looks like it's working ok, I'll make a PR for it. |
Woops, didn't realise 1.0.10 was already out! Anyhow, it works fine against master. |
@danmur while the |
Hmm yeah that makes sense. The error I was getting was a bad status line, at the http level. Thanks, I'll do some testing on the weekend and confirm, but yes will probably need more. |
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. |
In certain cases, it is possible that the network might not be reliable and be prone to outages. In these cases, it would be great if poetry's artifact download logic would recover gracefully. Ideally, with both an exponential back-off as well as a retry attempts.
A sample output when this happens.
The relevant logic could be implemented here.
poetry/poetry/installation/authenticator.py
Lines 37 to 70 in cae154c
The text was updated successfully, but these errors were encountered: