Skip to content

Deployment Failure in Azure Functions Due to glibc Version Mismatch with cryptography 44.0.0 #2570

Closed
@VashBik

Description

@VashBik

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.
Image

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:

  1. Improve Build Process Tooling: Allow users to specify glibc version compatibility to avoid mismatches.
  2. Update Azure Functions Runtime: Ensure the runtime supports newer glibc versions to prevent similar issues.
  3. 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 to ubuntu-20.04 and pinned cryptography to 43.0.3 to resolve the issue temporarily.

We would appreciate any updates or a more permanent fix from the Azure Functions team.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions