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

Subscription worker lambda fails with Runtime.ImportModuleError #1666

Closed
asjohnston-asf opened this issue Jun 15, 2023 · 2 comments · Fixed by #1667
Closed

Subscription worker lambda fails with Runtime.ImportModuleError #1666

asjohnston-asf opened this issue Jun 15, 2023 · 2 comments · Fixed by #1667
Labels
bug Something isn't working

Comments

@asjohnston-asf
Copy link
Member

asjohnston-asf commented Jun 15, 2023

Runtime.ImportModuleError: Unable to import module 'subscription_worker': cannot import name 'DEFAULT_CIPHERS' from 'urllib3.util.ssl_' (/var/task/urllib3/util/ssl_.py)

Likely introduced with requests v2.30.0 released May 4. We saw a similar error for the HyP3 API lambda when upgrading from requests==2.29.0 to 2.31.0 : #1654 . More details about the conflict between requests and botocore at psf/requests#6438

@asjohnston-asf
Copy link
Member Author

Here's count of production subscription worker lambda failures per 5 minutes for the last three months, suggesting the issue was introduced in production with https://github.com/ASFHyP3/hyp3/releases/tag/v3.5.0 on May 5, the first production release following the requests 2.30.0 release on May 4.
Screenshot from 2023-06-14 16-52-39

@asjohnston-asf asjohnston-asf added the bug Something isn't working label Jun 15, 2023
@asjohnston-asf
Copy link
Member Author

This error is due to incompatibility between requests>=2.30.0 and botocore<1.29.123. Troubleshooting revealed an invalid install_requires block in lib/dynamo/setup.py. This resulted in the latest-and-greatest boto3/botocore not being included in the subscription worker lambda deployment package, so the deployed code was pulling in the default botocore=1.29.90 in the Python 3.9 lamba runtime.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant