Repository navigation
FIX: Restore Linux ARM64 Conda builds on Ubuntu 26.04 - #905
Jahnvi Thakkar (jahnvi480) wants to merge 10 commits into
Conversation
Port the focused QEMU provisioning and Linux interpreter failure handling from ADO PR 9017. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
PR Performance Report✅ No regression detectedNo consistent slowdowns detected across all 2 environments. 0 IMPROVEMENTS 0 SLOWDOWNS 2/2 ENVIRONMENTS Coverage: 2 of 2 environments completed. Advisory result; does not block merging. Performance diagnosticsPhase times are inclusive diagnostics and must not be added together. They identify where measured time changed, not why it changed. No affected phases or call-count changes were recorded. All database tasks and timingsUnix / SQL Server 2022
Unix / SQL Server 2025
Build and measurement detailsPR head:
A consistent change requires more than 20% median paired movement, at least 1 ms between the median runtimes, and at least 80% of pairs exceeding the relative threshold in the same direction. A slowdown without enough pair agreement is reported as inconsistent. The displayed change is the median of paired before-and-after ratios. It is not recalculated from the two displayed median runtimes. Both revisions use profiling-enabled builds on the same agent and database, with alternating order and discarded warmups. Results are diagnostic and do not represent production-wheel latency. Raw samples and logs are attached to the ADO run as |
There was a problem hiding this comment.
🟡 Changes recommended
The ARM64 build can proceed after a failed interpreter check, and the regression test does not verify that the prerequisite install command ran.
2 open issues
What changed in this PR
Restores Linux ARM64 Conda build provisioning on Ubuntu 26.04 and prevents failed Linux Python execution from entering the macOS-only wheel-extraction path.
Changes:
- Replaces
qemu-user-staticwith concrete QEMU packages and adds emulator, loader and binfmt checks. - Restricts interpreter-free extraction to
osx-*targets and adds actionable Linux emulation errors. - Adds eight regression cases and documents the provisioning requirements.
Hosted binfmt registration and a complete emulated ARM64 build remain unverified.
| File | Description |
|---|---|
| tests/test_035_conda_macho_assert.py | Adds three cases rejecting failed Linux Python execution before wheel extraction. |
| tests/test_027_conda_release_metadata.py | Adds five mocked QEMU provisioning and validation cases. |
| OneBranchPipelines/conda-build-pipeline.yml | Updates QEMU packages, restarts binfmt registration and checks prerequisites. |
| conda/README.md | Documents Linux ARM64 provisioning and extraction restrictions. |
| conda/mssql-python/build.sh | Limits extraction fallback to macOS and reports Linux emulation failures. |
Review effort: Balanced
📊 Code Coverage Report
Diff CoverageDiff: main...HEAD, staged and unstaged changesNo lines with coverage information in this diff. 📋 Files Needing Attention📉 Files with overall lowest coverage (click to expand)mssql_python.pybind.performance_counter.hpp: 0.7%
mssql_python.pybind.logger_bridge.cpp: 57.9%
mssql_python.pybind.ddbc_bindings.h: 64.5%
mssql_python.pybind.logger_bridge.hpp: 70.8%
mssql_python._native_fetch.py: 77.7%
mssql_python.__init__.py: 80.8%
mssql_python.pybind.ddbc_bindings.cpp: 81.4%
mssql_python.pybind.row_mapping_cache.hpp: 81.5%
mssql_python.pybind.connection.connection_pool.cpp: 82.5%
mssql_python.pybind.connection.connection.cpp: 83.1%🔗 Quick Links
|
Require the setup success output before running the ARM64 leg, preserve native artifact publication, and assert prerequisite package installation. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Trigger from successful main wheel builds and exact Conda producer runs. Restrict production publication to explicit manual opt-in, preserving provenance, matrix and approval gates. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Remove downstream release/rehearsal completion triggering and restore the original manual release configuration. Preserve the main wheel-to-Official-Conda-build trigger and QEMU review fixes. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🟡 Changes recommended
The provisioning test invokes unmocked readlink -e, which is unsupported on stock macOS and Alpine, causing pytest jobs, including the macOS wheel build, to fail.
1 open issue
3 resolved since last review
Review effort: Balanced
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
2098c95


Work Item / Issue Reference
Summary
Port the focused fix from ADO PR !9017, address the GitHub review feedback, and trigger only the Official Conda build after a successful main wheel build.
Root cause: Conda build 192868, sourced from ADO main
988922bff2602334adf5e0d2cc8e39288746fb53, failed QEMU setup on Ubuntu 26.04 becauseqemu-user-staticbecame a virtual package with no installation candidate. Correct Linux ARM64 wheels were present, but the non-executable target Python then entered macOS-only extraction and reported a misleading missing-wheel error.Changes
qemu-userandqemu-user-binfmtpackages withlibc6-arm64-cross; restart systemd binfmt registration and check the emulator, ARM64 loader, enabled handler and registered interpreter. Compare resolved interpreter paths so valid Ubuntu 24.04binfmt-Psymlinks work while broken or different interpreters fail.osx-*; failed Linux interpreter execution now reports an actionable QEMU/binfmt/loader diagnostic.Build-Release-Package-Pipelinecompletion onrefs/heads/main, automatically start an OfficialConda-Build-Pipelinerun. This trigger waits for the full upstream pipeline and retains its exact wheel producer run.publishToConda=falseby default, explicit production opt-in and all existing release safeguards.Runner selection, native build behavior, ARM64 failure isolation, required release matrices, native audits, intended macOS extraction, Windows settings and publisher implementation remain unchanged. Provenance is tightened, not bypassed. Incomplete ARM64 artifacts still block release. Production still requires the existing approvals, restricted publishing group and exclusive lock.
Source equivalence and follow-ups: The initial port commit
a0023d4a0e18407a259610cd6181481690404c1dexactly reproduced all five changed blobs from ADO !9017 head3f6a1c65d08dbf47b070cd605963b1cca42aeb45, relative to ADO base988922bff2602334adf5e0d2cc8e39288746fb53. Those baseline blobs also matched GitHub main98ed24fbc6023ae014bbd52eda1b34024f7e7d5b. ADO !9017 was already merged when refreshed read-only. Follow-up commits address review feedback and the requested build-only trigger. The previously added automatic release/rehearsal changes were removed in a new commit, without rewriting history. GitHub main6907546ebb2eab52341eafc4d1cad2e45333735eis merged. The eight-file PR diff contains no change toOneBranchPipelines/conda-release-pipeline.yml; the additional provenance module/test changes address the latest security-evidence comments.Current validation: latest review fixes on merged main
python -m pytest --noconftest -p no:cacheprovider tests/test_027_conda_release_metadata.py tests/test_035_conda_macho_assert.py tests/test_036_conda_provenance.py -k "linux_qemu_setup or unix_recipe or posix_python_selection or conda_build_completion or conda_release_remains_manual or automatic_conda or publication_lock or dry_release or test_036_conda_provenance" -q- 477 passed, 528 deselected.python -m pytest --noconftest -p no:cacheprovider tests/test_027_conda_release_metadata.py tests/test_036_conda_provenance.py -k "linux_qemu_setup or wheel_security_evidence or scheduled_official_wheel" -q --tb=line- 18 failed, 7 passed, 927 deselected, reproducing the symlink rejection and missing producer-security enforcement.425a707b(340f327c5c0f524397492646ee87444a78a79732). No downstream automation was reintroduced..\.venv\Scripts\python.exe -m pre_commit run black-check --all-files --hook-stage pre-push- passed with the repository-pinned Black hook.bash -n conda/mssql-python/build.shandbash -nwith the extracted QEMU setup block on stdin - passed.git diff --check- passed.The source-only tests used Linux CPython 3.13.15 / pytest 9.1.1 in a disposable container with networking disabled, all capabilities dropped and a read-only checkout. The repository's documented
--noconftestaudit path requires neither a native extension build nor SQL Server. Initial-port validation separately reproduced all eight original regressions and passed its 30-case focused selection.Historical ADO evidence (not rerun for this port): The source PR records official Ubuntu package/path verification, an offline QEMU 10.2.1 / ARM64 glibc-loader smoke check, and an exact-head ADO YAML preview.
Limits and rollout: The build-trigger YAML must reach the ADO repository's configured default branch, with existing pipeline-resource authorizations, before automatic Conda builds can run. No ADO definition or permission was changed, and no pipeline was manually queued, retried or previewed for these follow-ups. Hosted trigger delivery, systemd/binfmt registration and a complete emulated ARM64 Python/Conda build remain untested; local source tests and YAML parsing are not an ADO template compilation or hosted qualification. The full driver/integration suite was not run.
Manual rehearsal keeps its existing non-publishing authentication-probe behavior. No automatic release/rehearsal, package publication, merge or auto-merge is requested.