[Engsys] Configure cibuildwheel for compiled dev requirements in live test jobs - #48371
Merged
Merged
Conversation
Storage live test jobs have been failing on every run at dev requirement install. All four storage packages list ../azure-storage-extensions as a relative dev requirement, so build_whl_for_req -> create_package detects ext_modules and shells out to cibuildwheel. cibuildwheel then builds in a manylinux container that cannot reach pypi.org, and on Windows fetches a CPython from api.nuget.org, which is blackholed on the isolated pools. The build pipeline already solves this in steps/build-package-artifacts.yml, but that template is only reachable from ci.yml. The live test chain (tests.yml -> archetype-sdk-tests.yml -> jobs/live.tests.yml -> steps/build-test.yml) is disjoint from it and had none of the workarounds. Add the equivalent steps to jobs/live.tests.yml, gated on the service directory actually containing a package configured for cibuildwheel so other services are unaffected. Unlike the build pipeline, these wheels are only pip installed into the job's own venv, so restrict the matrix to the single wheel this interpreter can use: CIBW_ARCHS=native plus skipping PyPy and musllinux takes Linux from 8 wheels to 1, Windows from 4 to 1, and macOS from 3 to 1. That also avoids needing QEMU for aarch64 and pythonarm64 for win_arm64, both of which the build pipeline has to provision. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: c9501be1-48b1-4429-942e-0100988a41e2
|
Azure Pipelines: Successfully started running 1 pipeline(s). 9 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
|
Azure Pipelines: Successfully started running 1 pipeline(s). 9 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
There was a problem hiding this comment.
Pull request overview
Configures live-test jobs to build compiled development requirements reliably with cibuildwheel across supported platforms.
Changes:
- Detects service packages using cibuildwheel.
- Limits builds to the native CPython wheel and forwards Linux feed authentication.
- Pre-provisions CPython from Azure Artifacts on Windows.
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.
Description
Storage live test jobs have been failing on every scheduled run since at least 2026-07-10 — 22 of 24 jobs in build 6634674 never got as far as running a test.
Root cause
All four storage packages list
../azure-storage-extensionsas a relative dev requirement.build_whl_for_req→create_packagedetectsext_modulesand shells out tocibuildwheel, which then cannot reach the network the way it needs to:PIP_INDEX_URLdoesn't cross the Docker boundary.No matching distribution found for setuptools>=77.0.3nugetcan't reachapi.nuget.org(blackholed to192.0.2.88) while fetching a CPythonfile-datalake/file-sharepassed (public egress);blob/queuehit the 60-minute job timeoutThe build pipeline already solves this in
steps/build-package-artifacts.yml, but that template is only reachable fromci.yml. The live test chain is completely disjoint from it:Every workaround there is a step-scoped
##vso[task.setvariable], so nothing propagates across chains.Fix
Add the equivalent steps to
jobs/live.tests.yml, gated on the service directory actually containing a package configured forcibuildwheel.steps/build-test.ymlis deliberately not touched — it's shared withci.tests.ymland the blast radius would be every package in the repo.Unlike the build pipeline, these wheels are only
pip installed into the job's own venv, so the matrix is cut to the single wheel that interpreter can use:cp310-manylinux_x86_64cp310-win_amd64cp310-macosx_arm64Everything dropped is untestable in that job anyway: wrong CPU arch, wrong libc, or a PyPy interpreter the job never runs. The surviving wheel is
cp310-abi3, forward-compatible with the 3.11–3.14 jobs via the limited API. This also means no QEMU (aarch64) and nopythonarm64(win_arm64), both of which the build pipeline has to provision.Two details worth calling out:
CIBW_ENVIRONMENT_PASS_LINUX, notCIBW_ENVIRONMENT— the latter would clobber the package's own[tool.cibuildwheel].environment(CFLAGS).CIBW_SKIP='pp* *musllinux*'rather thanCIBW_ENABLE=''—enableusesInheritRule.APPEND, so an env value appends to the pyprojectenable = ["pypy"]instead of replacing it, and PyPy still builds.azure-storage-extensionsis currently the only package in the repo with[tool.cibuildwheel], so no other service is affected.Validation — build 6636078
Found compiled package: azure-storage-extensions)Run Testswent from 2 passing to 13 passing, and 0 jobs failed at dev-requirement install (was 22 of 24).Exactly one wheel per platform. Linux built in 38 seconds:
Pre-existing failures this uncovers
These are not regressions — the pipeline died before reaching them for weeks, so a real backlog accumulated. Filing separately:
test_arrow*, 10test_blob_encryption*, 8 access-tier. Ruled out the new wheel as a cause:azure-storage-extensionsships onlychecksums, and blob's_encryption.pynever imports it.test_abort_copy_file→NoPendingCopyOperation, a copy-completes-before-abort race. Flaky.Test Samplesfails on all 4 OS with exit99, which isdispatch_checks.py:470wrapping an exception in the dispatcher, not a sample failure (duration0.00confirms). Dies while streamingnetwork_activity_logging.py, whose output contains raw non-UTF8 bytes from an encrypted queue message.summarize()never prints the exception text, so the cause is swallowed.Unrelated observation
live.tests.ymldeclares aBeforeTestStepsparameter (line 20) that it never forwards tobuild-test.yml, so live-test callers setting it have them silently dropped.ci.tests.yml:154forwards correctly. Not addressed here.All SDK Contribution checklist:
General Guidelines and Best Practices
Testing Guidelines