Skip to content
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 deployed lambda functions not working due to setuptools monkeypatching #16

Merged
merged 6 commits into from
Sep 1, 2020

Conversation

vladdyk
Copy link

@vladdyk vladdyk commented Aug 31, 2020

The issue has been affecting many people today

https://github.com/pypa/setuptools/issues/2350

This seems to be the fix to unblock us from deploying without having to modify a bunch of source files across repos. To override this value, a project can set this env var in its own buildspec.yml.

Tested by deploying from local, will also test on live before merging

entrypoint.sh Outdated
# tools is coming from on lambda except that it is causing all newly deployed lambda functions to fail.
# setting this env variable prevents the distutils being overwritten by this code here:
# https://github.com/pypa/setuptools/blob/04e3df22df840c6bb244e9b27bc56750c44b7c85/_distutils_hack/__init__.py#L36
echo "SETUPTOOLS_USE_DISTUTILS: ${SETUPTOOLS_USE_DISTUTILS:-stdlib}" >> ${ENV_FILE}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

im not sure if this will work for post deploy functions. try it out

Copy link

@kerr-bighealth kerr-bighealth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - thank you for all the digging you've done.

@vladdyk vladdyk merged commit d9ffea7 into master Sep 1, 2020
@kerr-bighealth kerr-bighealth deleted the vlad/distutils branch June 4, 2021 21:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants