Skip to content

Install ibmmq from a wheel in IBM MQ lowest-dependency tests - #74132

Merged
shahar1 merged 1 commit into
apache:mainfrom
shahar1:fix-ibm-mq-lowest-deps-download
Oct 3, 2026
Merged

shahar1 merged 1 commit into
apache:mainfrom
shahar1:fix-ibm-mq-lowest-deps-download

Conversation

@shahar1

@shahar1 shahar1 commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

related: #71544

This PR solves the ibmmq flakiness in a more robust way - installing ibmmq from a wheel instead of downloading the redestributable.

AI Summary The lowest-direct-dependency tests for the IBM MQ provider fail intermittently, for example:
ERROR: all download attempts failed for https://public.dhe.ibm.com/.../9.4.0.0-IBM-MQC-Redist-LinuxX64.tar.gz; last error: <urlopen error [Errno 110] Connection timed out>
Pre-extras install failed for ibm.mq

The ibmmq>=2.0.6 floor made uv sync --resolution lowest-direct --all-extras pick ibmmq 2.0.6. On PyPI, 2.0.0–2.0.6 are sdist-only, and building them needs the IBM MQ C client. That is why the provider downloaded the IBM MQ redistributable from public.dhe.ibm.com before syncing, and the job failed whenever that host did not answer from the runner. ibmmq 2.1.0 is the first release with a manylinux_2_28_x86_64 wheel. Raising the floor to it removes the build, so it also removes the download, the pre_extras_install.yaml manifest and the provider's pre-extras registration. The generic pre-extras mechanism stays in place for future providers.

The wheel's extension still links libmqm_r.so at runtime, so import ibmmq raises ImportError when the client is not installed. The test conftest used to check find_spec, which passes once the wheel is installed. It now falls back to the fake module whenever the import fails.

Tradeoff: before this change, the lowest-dependency job could run the tests against a real ibmmq built against the downloaded client. The regular CI image never installs the ibmmq extra, so now every CI job runs these tests against the fake module. That seems the right trade for removing an unreliable external download from CI.

related: #71544, which keeps the download but adds timeouts and retries. This change removes the need for the download.

Checks run:

  • In Breeze, with MQ_FILE_PATH unset and no download, the lowest-direct sync installed ibmmq==2.1.0 from the wheel. Provider tests then passed, apart from airflow_shared import errors caused by skipping the entrypoint's reinstall_shared_distributions step in the ad-hoc run.
  • In the regular Breeze container, all 105 provider tests pass.
  • prek run --stage pre-commit passes.

Was generative AI tooling used to co-author this PR?
  • Yes — Claude Code (Opus 5.5)

Generated-by: Claude Code (Opus 5.5) following the guidelines

🤖 Generated with Claude Code

Lowest-direct resolution picked ibmmq 2.0.6, which is sdist-only and needed
the IBM MQ C client downloaded from public.dhe.ibm.com; the job failed
whenever that host timed out. ibmmq 2.1.0 is the first release with a Linux
x86_64 wheel, so raising the floor removes the download and its manifest.
The tests fall back to the fake ibmmq module when the wheel is installed but
the C client library is not available.
@shahar1
shahar1 force-pushed the fix-ibm-mq-lowest-deps-download branch from 4496bb2 to ef81db0 Compare October 3, 2026 06:42
@shahar1
shahar1 merged commit c011b59 into apache:main Oct 3, 2026
160 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants