Add manylinux_2_28 wheel build alongside manylinux_2_34#70
Draft
saurabh500 wants to merge 2 commits into
Draft
Conversation
mssql-py-core wheels are repackaged into mssql-python, which ships a
single 'manylinux_2_28' Linux wheel tag. Today our build produces only
glibc-2.34 / OpenSSL-3 binaries, so the .so embedded in mssql-python's
2_28 wheel will not load on real glibc-2.28 hosts (RHEL 8, Ubuntu 20.04,
Debian 11, Amazon Linux 2) — the tag is a lie.
Add a true manylinux_2_28 build path while keeping the existing 2_34
path, so we can deliver an ABI-honest .so for each deployment target:
- manylinux_2_28 (AlmaLinux 8): libssl.so.1.1, GLIBC <= 2.28
- manylinux_2_34 (AlmaLinux 9): libssl.so.3, GLIBC <= 2.34
OpenSSL stays a runtime OS dependency in both flavors (auditwheel=skip
preserved); the wheel never bundles or statically links libssl.
Changes:
- New Dockerfile.PythonBuild.manylinux_2_28.{x64,arm64} mirroring the
existing 2_34 ones, FROM the imported 2_28 ACR base.
- build-/push-python-images.sh build and push both flavors.
- build-python-wheels-in-container.sh reads MATURIN_COMPATIBILITY env
and passes --compatibility to maturin so wheels get the correct
manylinux_2_*_<arch> tag (previously fell back to the un-publishable
linux_* tag because auditwheel=skip). Also runs cargo clean first to
prevent cross-flavor cache contamination when both flavors run in the
same job's workspace.
- build-wheels-docker-host.sh takes a MANYLINUX_FLAVOR arg, picks the
right _rust image and sets MATURIN_COMPATIBILITY. Fixed stale refs to
the non-_rust base images.
- build-python-wheels-template.yml adds a manylinuxFlavor parameter
(default 2_28) and includes the flavor in the published artifact
name on Linux so two invocations per arch produce distinct artifacts.
- OneBranch/stages.yml and validation-stages.yml call the wheel
template twice per Linux x64/arm64 job (once per flavor).
- pyproject.toml comment and PYTHON_WHEELS_README.md describe the
dual-flavor strategy.
Verified end-to-end locally:
manylinux_2_28_x86_64.whl -> libssl.so.1.1, max GLIBC 2.28
manylinux_2_34_x86_64.whl -> libssl.so.3, max GLIBC 2.34
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Why
mssql-py-core wheels are repackaged into
mssql-python, which ships a singlemanylinux_2_28Linux wheel tag per arch. Today our build produces only glibc-2.34 / OpenSSL-3 binaries, so the.soembedded inside mssql-python'smanylinux_2_28wheel actually requiresGLIBC_2.34andlibssl.so.3— the tag is a lie and the wheel will not load on real glibc-2.28 hosts (RHEL 8, Ubuntu 20.04, Debian 11, Amazon Linux 2).This PR adds a true
manylinux_2_28build path while keeping the existingmanylinux_2_34path, so we can hand mssql-python an ABI-honest.sofor each deployment target.manylinux_2_28_<arch>libssl.so.1.1manylinux_2_34_<arch>libssl.so.3OpenSSL stays a runtime OS dependency in both flavors (
auditwheel = "skip"preserved); the wheel never bundles or statically links libssl.What changed
containers/Dockerfile.PythonBuild.manylinux_2_28.{x64,arm64}mirroring the existing 2_34 ones,FROMthe imported 2_28 ACR base.containers/build-python-images.sh/push-python-images.shbuild and push both manylinux flavors (4 manylinux images + 2 musllinux = 6 total).scripts/build-python-wheels-in-container.shreadsMATURIN_COMPATIBILITYenv and passes--compatibilityto maturin so the wheel filename / WHEEL metadata carry the correctmanylinux_2_<N>_<arch>tag. Previously fell back to the un-publishablelinux_*tag becauseauditwheel = "skip"is set. Also runscargo cleanfirst so running both flavors against the same workspace in one job doesn't leak OpenSSL/glibc cache across flavors.scripts/build-wheels-docker-host.shtakes aMANYLINUX_FLAVORarg (default2_28), picks the right_rustimage, and setsMATURIN_COMPATIBILITY. Fixed stale references to the non-_rustbase images..pipeline/templates/build-python-wheels-template.ymladds amanylinuxFlavorparameter (default2_28); the published artifact name on Linux now includes the flavor (wheels_Linux_<arch>_manylinux_2_28,..._manylinux_2_34) so the two invocations per arch don't collide..pipeline/OneBranch/stages.ymland.pipeline/templates/validation-stages.ymlcall the wheel template twice per Linux x64/arm64 job (once per flavor).mssql-py-core/pyproject.tomlcomment +containers/PYTHON_WHEELS_README.mddescribe the dual-flavor strategy.Verification
Built both Dockerfiles locally, ran the in-container wheel build through each, then inspected the produced wheels:
Cross-flavor cache contamination was reproduced and confirmed fixed by the new
cargo cleanstep.Follow-ups (out of scope for this PR)
manylinux_2_28_*_rustimages to ACR (./containers/build-python-images.sh && ./containers/push-python-images.sh) and mirror to GHCR via the existing sync.wheels_Linux_<arch>_manylinux_2_28for its 2_28 wheel (and...manylinux_2_34if/when they ship a 2_34 wheel as well).Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com