Description
Issue Summary:
We are encountering deployment issues when using Azure Functions with Python applications, specifically related to the use of the cryptography
Python module version 44.0.0. The error occurs after the deployment process through GitHub Actions, where the functions do not appear on the portal despite the deployment being successful. After investigating, we found that the issue is related to a glibc version mismatch between the build and runtime environments.
Issue Details:
- Cryptography Version: 44.0.0
- Environment: Azure Functions with Python 3.11
- Operating System: Linux
- Error: Missing functions or "module not found" errors due to incompatibilities with glibc versions.
Developer's Response (from the cryptography
module team):
The issue stems from the fact that cryptography
44.0.0 ships a wheel compatible with glibc 2.34+, but Azure Functions uses glibc 2.31 or older in its runtime environment. This results in deployment failures when the Python package is built on a system with glibc 2.34+ but runs on Azure Functions with glibc 2.31. - Link to comment: Azure/azure-sdk-for-python#38725 (comment)
While the workaround is to either pin cryptography
to version 43.0.3 or use ubuntu-20.04
in the GitHub Actions runner, we are seeking long-term solutions for better compatibility.
Suggested Improvements for Azure Functions:
- Improve Build Process Tooling: Allow users to specify glibc version compatibility to avoid mismatches.
- Update Azure Functions Runtime: Ensure the runtime supports newer glibc versions to prevent similar issues.
- Documentation Changes: Consider providing clearer guidance on handling glibc version compatibility in the official Azure Functions documentation.
Temporary Workaround:
- We have switched the GitHub Actions runner from
ubuntu-latest
toubuntu-20.04
and pinnedcryptography
to43.0.3
to resolve the issue temporarily.
We would appreciate any updates or a more permanent fix from the Azure Functions team.