-
Notifications
You must be signed in to change notification settings - Fork 139
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
fix: Validate if pip is installed in the runtime path #549
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for addressing this issue. I have one general question, how this change will behave when customer tries to build a python lambda which doesn't have requirements.txt
file?
Thats a good call out. I'll move that validation logic out of the general pip validator and into the build action, that way this validation+setting of runtime will only apply to projects that the workflow has identified to build. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this fix!
Issue #, if available:
N/A.
Description of changes:
Previously, the Python runtime validator would only validate if the runtime contained the correct Python for the workflow. It did not validate whether or not this runtime had
pip
installed inside of it or not.This lead to a case where in a list of Python runtimes, it would select the first one that had Python without checking for
pip
. The correct runtime in this case would be the one that contains both Python andpip
.This change updates the build action to find and validate all the possible Python execution paths to find one that contains the correct version of Python while also containing
pip
.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.