build: use lambda image to ensure binary compatibility when building from source #650
Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
What does this PR do?
This PR changes the base image for the layer creation process.
Instead of using the generic python image (
docker/library/pythonbased on debian), I suggest using the lambda python image (lambda/pythonbased on AL2 or AL2023 depending on python3 version).Motivation
ddtracecontains native dependencies which enforce a minimal version of glibc set by the version found at build time.This means that the glibc version of the build image must be the same as (or older than) the glibc version of the runtime image.
When pushing wheels to
PyPi, thedd-trace-pycompiles native dependencies for themanylinux2014target which uses an old version of glibc (2.17).With the release of Debian Trixie last week, all python have now a newer version of glibc than Amazon Linux 2023 (2.34) and executing a function with a layer built from source for python3.13 yields the following error
By building on the same image used by the runtime, we ensure the binary compatibility.
Testing Guidelines
All builds in the CI and snapshot tests pass.
Additional Notes
This is a blocker for the enabling system-tests for lambda: https://github.com/DataDog/system-tests/actions/runs/17033940078/job/48282245449?pr=4891#step:91:105
Types of Changes
Check all that apply