-
Notifications
You must be signed in to change notification settings - Fork 368
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
Bypass python version runtime check when code run in docker #1180
Conversation
✨ handle case where "requestContext" is not provided by the event. > Systems calling the Lambda (other than API Gateway) may not provide the field requestContext in the event. ✅ add testcases
…orwardedfor-header
…orwardedfor-header
…orwardedfor-header
…orwardedfor-header
✅ update testcase to output the full filepath of file you are expected to compare the README.md to.
@monkut I think we need to merge master into this to keep it's code updated. |
@souravjamwal77 Conflicts have been resolved. |
…ll perform version check, but docker based installs shouldn't be capped.
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.
I couldn't test this inside the docker build because the aws-lambda image on the docker hub has no python3.10 version yet. If they publish a new version then I will test it out again. Approving for now.
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.
Looks Good!
* ✨ Handle spaces in x-forwared-for (zappa#1127) * 🔥 remove `six` (no longer needed as 2.x is no longer supported) * ✅ add testcase for SUPPORTED_VERSION check to increase code coverage. * 🎨 run black/isort * 🔧 rename function for clarity * 🔥 remove unnecessary import * 🔧 change name of unused mock instance * ✨ (zappa#879) Fix url decoding for query string * 🔧 change docstring type multi-line comment to standard multiline comment ✨ handle case where "requestContext" is not provided by the event. > Systems calling the Lambda (other than API Gateway) may not provide the field requestContext in the event. ✅ add testcases * 🔥 remove duplicate comment * 📝 add docstring to util function, `get_unsupported_sys_versioninfo()` * ✨ Add any python version support in the case where code is run in docker * 🎨 run black/isort * ✅ fix testcase ✅ update testcase to output the full filepath of file you are expected to compare the README.md to. * 🔧 Add python minor version check when using docker. * 🎨 fix flake8 * 🔧 don't limit the upper version of zappa on setup. Internal checks will perform version check, but docker based installs shouldn't be capped.
…zappa-0.57.0 * commit '0b1eab14ca39c3a3bfb4e915347e07495171dcba': (27 commits) updating workflow actions to remove deprecation warnings (zappa#1243) 📝 CHANGELOG.md update for 0.57.0 (zappa#1246) fixing compatibility with Django 4.2 (zappa#1237) Update Readme with patreon and donors (zappa#1234) adding support for Python 3.10 (zappa#1231) Nose to pytest (zappa#1239) lint: updating code style with `make black` (zappa#1238) Alternative way to check if running in Docker (zappa#1204) 📝 CHANGELOG.md update for 0.56.0 release (zappa#1187) Improve `get_best_match_zone()` to match by most matched components instead of by length of domain (zappa#1193) Bypass python version runtime check when code run in docker (zappa#1180) Be able to pass in a batch window when using batch size (zappa#1118) Correction to README. (zappa#1177) (zappa#908) Update BINARY_SUPPORT to use Content-Encoding to identify if data is binary (zappa#1155) Remove special check for Django<1.7, fix for zappa#1158 (zappa#1159) Resolve (zappa#410) Logs are missing query strings (zappa#1165) Handle spaces in x-forwared-for/remove six (zappa#1127) (zappa#1163) add feature (zappa#704) Check if args/kwargs are JSON Serializable while running locally (zappa#1154) docs: Add documentation for s3 event object key_filters (zappa#1169) Add feature pyenv virtualenv detecting .python-version file (zappa#1153) ... # Conflicts: # zappa/cli.py
Description
Currently zappa performs a supported python version check on import.
In the case where zappa is used with docker, zappa will not allow unsupported python versions to be used.
This PR by-passes the full SUPPORTED_VERSION check on import when it detects that it is being run within docker and ONLY checks the
MINIMUM_SUPPORTED_MINOR_VERSION
(newly defined/added) when docker is detected.This uses the
/proc/1/cgroup
check mentioned here to determine if code is being run in docker:https://stackoverflow.com/a/20012536/24718
GitHub Issues
#1140