-
Notifications
You must be signed in to change notification settings - Fork 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
interrupted download reports as hash failure #11153
Comments
I wonder why pip treats the download as successfully completed in the first place. Is this a limitation in requests or even urllib3? |
pip reads directly from |
We're consistently seeing this when downloading whls/artifacts that are ~20MB+. We can look into what's causing the networking flakes but this has been a confusing error that we're regularly seeing. Would be very supportive of this change. |
I’m marking this as help wanted since it requires someone that can reliably reproduce this to look into how urllib3 marks the download as complete, and how to perform further sniffing in pip’s networking code to work around this. I would strongly suggest anyone reaching here to attempt to dig deeper into urllib3 to figure out what exactly went wrong and work on a pull request. |
psf/requests#4956 perhaps |
I've also been seeing this issue occasionally in CI builds and have started to investigate this issue. It's true that this is related to the linked requests/urllib3 TracebacksResponse truncated downloading package
Response truncated getting package metadata
(This second error would be reported as There's some related retry discussion here: urllib3/urllib3#542 In essence, the issue is that (in this specific scenario), pip/requests/urllib3 don't cooperate very well to retry failed requests. I suspect that fixing this issue will require some other changes external to pip. |
There's a bunch of moving pieces here, so I'll just outline the steps which I believe are required to resolve these issues.
|
any workarounds? |
Description
follow-up to #4930
when a large package download is interrupted on a bad link, pip reports a bad hash instead of the interrupt of the download,
this leads to first misidentifying the problem
Expected behavior
pip should report the download as interrupted to indicate the actual problem
its a fact that the hash will of course differ, if you hash a subset instead of al lthe data,
however the error happens at obtaining the data, so failing at the hash is misleading,
i was earnestly trying to figure where my data had gotten corrupted until i realized that the progress was actually not done
pip version
22.1.1
Python version
3.8
OS
Fedora
How to Reproduce
unfortunately i cannot provide a broken network reproducer quickly
Output
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: