From 77a11c9d3fa05bff9446506d4d55417470902222 Mon Sep 17 00:00:00 2001 From: SubbaraoGarlapati Date: Wed, 10 Jun 2026 13:03:22 -0400 Subject: [PATCH] [cinderx] Build free-threaded musllinux wheels Summary: Publish free-threaded (cp314t) musllinux wheels alongside the existing manylinux FT and non-FT musllinux wheels. - Add cp314t-musllinux_{x86_64,aarch64} to the cibuildwheel build list and drop the stale TODO about musllinux/FT issues. - Exclude test_concurrent_initialization_subinterpreter from the PGO profiling workload. It is flaky under free-threading (concurrent subinterpreter init of the _datetime C extension) and was failing the workload, which aborts the wheel build. check=True is kept so any other test failure still fails the build. - On Linux, build the musllinux wheels first (FT first) in CI so a musllinux/FT failure surfaces quickly instead of only after all the manylinux wheels have built. cibuildwheel builds in a fixed order, so --only is used to force musllinux ahead of manylinux. Test Plan: CI build_wheels job: musllinux wheels build first on Linux; the PGO workload no longer aborts on the flaky datetime subinterpreter test. Tasks: T270479926 --- .github/workflows/ci.yml | 14 ++++++++++++++ pyproject.toml | 3 ++- setup.py | 5 +++++ 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2fb7998ab..14c4cbefd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -84,8 +84,22 @@ jobs: - name: Install cibuildwheel run: python -m pip install cibuildwheel + # On Linux, build the musllinux wheels first (free-threaded first) so a + # musllinux/FT failure surfaces quickly instead of only after all the + # manylinux wheels have built. cibuildwheel builds in a fixed order + # (manylinux before musllinux), so the order is forced here with --only. + - name: Build musllinux wheels first (Linux) + if: runner.os == 'Linux' + run: | + arch=$(uname -m) + python -m cibuildwheel --only "cp314t-musllinux_${arch}" --output-dir wheelhouse + python -m cibuildwheel --only "cp314-musllinux_${arch}" --output-dir wheelhouse + - name: Build wheels run: python -m cibuildwheel --output-dir wheelhouse + env: + # musllinux already built above on Linux; build everything else here. + CIBW_SKIP: ${{ runner.os == 'Linux' && '*-musllinux_*' || '' }} build_sdist: name: Build source distribution diff --git a/pyproject.toml b/pyproject.toml index 138e1eda9..fe9845fe8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -33,14 +33,15 @@ filterwarnings = [ ] [tool.cibuildwheel] -# TODO(D107415749): muxllinux still has issues with FT. build = [ "cp314-manylinux_x86_64", "cp314t-manylinux_x86_64", "cp314-musllinux_x86_64", + "cp314t-musllinux_x86_64", "cp314-manylinux_aarch64", "cp314t-manylinux_aarch64", "cp314-musllinux_aarch64", + "cp314t-musllinux_aarch64", "cp314-macosx_arm64", "cp314-win_amd64", ] diff --git a/setup.py b/setup.py index 5bd03c155..6292d63af 100644 --- a/setup.py +++ b/setup.py @@ -202,6 +202,11 @@ def print_section(title: str) -> None: import sys sys.argv.append("--pgo") +# TODO(T270479926): test_concurrent_initialization_subinterpreter is flaky +# under free-threading (concurrent subinterpreter init of the _datetime C +# extension) and shouldn't gate the PGO wheel build. +sys.argv += ["--ignore", "test_concurrent_initialization_subinterpreter"] + def main(): # This import must not be in the module body as it will start the tests # running, and those using multiprocessing will fail because the initial