-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
fix lambda layer version compatibility with Python 3.11 #9020
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
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.
Nice fix, refactoring, and clarifying comments 👍
nit: Adding a comment pointing to the IMAGE_MAPPING
(and/or vice-versa) would help to catch this update chore the next time.
I agree that adding new runtimes is currently too much brittle error-prone manual work. Moving forward, the best solution would be to pick up specification-based validations again as suggested by Thomas a while back: #7675 (comment)
Thank you for adding the validated test @alexrashed 🚀
Thanks, @joe4dev for the review and the feedback! I added comments to both ( |
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.
Great idea with the unit test 👍
LGTM 🚀
(agree that splitting these variables across api_utils
and lambda_models
is not the best idea)
@alexrashed The Thanks for the input 👍 |
Motivation
This PR fixes an issue where Lambda layer compatibility check failed for the
python3.11
runtime:Changes
This PR adds
python3.11
to the list of supported runtimes for Lambda layer validation.Testing
A snapshot verified test creating a Lambda layer with all possible validations.
However, this test does not save us from the same mistake happening again, because it uses the list of
RUNTIMES
which is used by the validation.Initially, I wanted to use the keys of the
IMAGE_MAPPING
dict (which is described as the dict where newly supported runtimes should be added), but this mapping is contained inlambda_models
(even though I think it's not a model).We could move this mapping from there and directly use it for the runtime validation, then this issue could not happen in the future again. Happy for any feedback!