-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Pip failures can result in incomplete scan of wheel dependency graph #497
Comments
This happens outside cross-compiling scenarios too. The errors that I'm seeing in
|
So in addition to propagating the pip exit status, I would consider not sanitizing the environment variables (at minimum |
The problem here is that the pip errors are not granular enough to be useful the way I am using pip. If it told me it was a networking error specifically I could retry or failout with a useful message. But for most error cases I DO want to ignore the error since I am more interested in what packages got downloaded into my working directory since in general I combine a bunch of mutually optional steps that can fail and still have the overall deployment succeed. The only real error is a networking error. One idea I had was to make a pull request to pip to separate out their error codes so that you can tell whether or not a particular error was networking related or not. But the way pip is now there is no useful information I can learn from the fact that pip failed parsing the output text which is possibly subject to change and not something I want to depend on. Simply wrapping pip with sys.exit is not acceptable since that breaks a lot of situations where a valid deployment package would have been built. If you can give me a specific |
I think PATH (at minimum) should be passed down, yes. Here is a
|
I'm not sure what the conditions are under which |
This looks like it can be separated out into two issues. The other is that subprocess errors do not get propagated up to Chalice from pip which is correct. I will open a separate issue for that as well. #500 One related to environment variables being passed down to the subprocess, which I believe is a bug, since I think this worked at one point and doesn't now due to some changes for the packager related to optional C extensions. #501 Given your example of import site
site.addsitedir('/var/task') I am going to close this issue, feel free to follow up in either of the new issues. Thanks for the detailed reports! |
Thanks. To clarify, we use Python 3.6 only. The issue that I saw with protobuf had to do with protobuf halting the |
It looks like the wheel dependency graph scanning process can be silently truncated. This results in chalice silently disregarding dependencies when handling wheels in "cross-compiling" mode (deploying from mac os to linux).
chalice/chalice/deploy/packager.py
Lines 577 to 595 in 3c75891
While it appears as though the error code is passed on, in fact pip errors are ignored (other than gross ones like if pip is missing entirely). To fix this, you'd need to wrap
pip.main()
insys.exit(pip_main())
.The text was updated successfully, but these errors were encountered: