This is an automated email from the ASF dual-hosted git repository.

shahar1 pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new c011b5960ac Install ibmmq from a wheel in IBM MQ lowest-dependency 
tests (#74132)
c011b5960ac is described below

commit c011b5960acb0c64306d33e9b9976c140275a6b9
Author: Shahar Epstein <[email protected]>
AuthorDate: Sat Oct 3 11:36:47 2026 +0300

    Install ibmmq from a wheel in IBM MQ lowest-dependency tests (#74132)
    
    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.
---
 Dockerfile.ci                                   |  2 +-
 contributing-docs/12_provider_distributions.rst |  8 +++---
 providers/ibm/mq/docs/index.rst                 |  2 +-
 providers/ibm/mq/pre_extras_install.yaml        | 33 -------------------------
 providers/ibm/mq/pyproject.toml                 |  4 ++-
 providers/ibm/mq/tests/conftest.py              |  8 ++++--
 scripts/docker/entrypoint_ci.sh                 |  2 +-
 uv.lock                                         |  2 +-
 8 files changed, 18 insertions(+), 43 deletions(-)

diff --git a/Dockerfile.ci b/Dockerfile.ci
index f7ce2971649..75bb1e19c82 100644
--- a/Dockerfile.ci
+++ b/Dockerfile.ci
@@ -1553,7 +1553,7 @@ function reinstall_shared_distributions() {
     uv pip install --no-deps $(ls -d /opt/airflow/shared/*/)
 }
 
-PROVIDERS_NEEDING_PRE_EXTRAS_INSTALL=("ibm.mq")
+PROVIDERS_NEEDING_PRE_EXTRAS_INSTALL=()
 
 function run_pre_extras_install_if_registered() {
     local provider_id="${1}"
diff --git a/contributing-docs/12_provider_distributions.rst 
b/contributing-docs/12_provider_distributions.rst
index b6be6afa537..a93c83e10d5 100644
--- a/contributing-docs/12_provider_distributions.rst
+++ b/contributing-docs/12_provider_distributions.rst
@@ -158,8 +158,10 @@ Because the new group is *not* part of ``dev``, a plain 
``uv sync`` on a contrib
 will not try to install it. The CI image installs it via ``ci-image``.
 
 **Shape B: the Python package's wheel build needs a proprietary SDK that 
cannot live in the
-base CI image** (e.g. IBM MQ's ``ibmmq`` needs the IBM MQ Redistributable 
Client headers and
-``MQ_FILE_PATH`` set at build time). Bundling such SDKs in the base image has 
licence,
+base CI image** (e.g. ``ibmmq`` releases before 2.1.0 were sdist-only and 
needed the IBM MQ
+Redistributable Client headers and ``MQ_FILE_PATH`` set at build time). First 
check whether
+raising the lower bound to a release that ships wheels avoids the build — a 
download at test
+time makes the job depend on the upstream host being reachable. Bundling such 
SDKs in the base image has licence,
 maintenance, and image-size costs that the project does not want to pay on 
every CI run.
 The lowest-direct-dependency provider tests still call ``uv sync 
--all-extras`` inside the
 provider directory, so simply mocking the package in tests is not enough — the 
sync itself
@@ -185,7 +187,7 @@ must succeed first. Use the per-provider pre-extras-install 
manifest:
 
    .. code:: yaml
 
-       # providers/ibm/mq/pre_extras_install.yaml
+       # providers/<id>/pre_extras_install.yaml
        downloads:
          - url: 
https://public.dhe.ibm.com/.../9.4.0.0-IBM-MQC-Redist-LinuxX64.tar.gz
            sha256: <64 lowercase hex chars>
diff --git a/providers/ibm/mq/docs/index.rst b/providers/ibm/mq/docs/index.rst
index 70e6fe86092..d0199675bdb 100644
--- a/providers/ibm/mq/docs/index.rst
+++ b/providers/ibm/mq/docs/index.rst
@@ -139,7 +139,7 @@ Install them when installing from PyPI. For example:
 ====================  
===============================================================================
 Extra                 Dependencies
 ====================  
===============================================================================
-``ibmmq``             ``ibmmq>=2.0.6; platform_machine != "aarch64" and 
platform_machine != "arm64"``
+``ibmmq``             ``ibmmq>=2.1.0; platform_machine != "aarch64" and 
platform_machine != "arm64"``
 ``common.messaging``  ``apache-airflow-providers-common-messaging>=2.0.0``
 ====================  
===============================================================================
 
diff --git a/providers/ibm/mq/pre_extras_install.yaml 
b/providers/ibm/mq/pre_extras_install.yaml
deleted file mode 100644
index 054d2453b98..00000000000
--- a/providers/ibm/mq/pre_extras_install.yaml
+++ /dev/null
@@ -1,33 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
----
-downloads:
-  - url: 
https://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/messaging/mqdev/redist/9.4.0.0-IBM-MQC-Redist-LinuxX64.tar.gz
  # yamllint disable-line rule:line-length
-    sha256: a839db8f14cef59319639336e951a52dc320fd6a42ab5bee9bc925e43985f457
-    extract_to: /opt/mqm
-    # Anycast IPs published by IBM for public.dhe.ibm.com (see
-    # https://www.ibm.com/support/pages/node/6826677). Used only when DNS
-    # resolution of the hostname fails inside the test container; TLS SNI
-    # and certificate verification remain bound to public.dhe.ibm.com.
-    fallback_ips:
-      - 170.225.126.18
-      - 129.35.224.1
-      - 129.124.168.5
-      - 9.133.44.11
-env:
-  MQ_FILE_PATH: /opt/mqm
diff --git a/providers/ibm/mq/pyproject.toml b/providers/ibm/mq/pyproject.toml
index 632458b07a8..2e88bdad4f7 100644
--- a/providers/ibm/mq/pyproject.toml
+++ b/providers/ibm/mq/pyproject.toml
@@ -72,7 +72,9 @@ dependencies = [
     # Required at Runtime
     # IBM MQ ships its native C client only for Linux x86_64 / Windows x64, so 
the `ibmmq`
     # bindings cannot be built on ARM. Skip it there (mirrors provider.yaml 
excluded-platforms).
-    "ibmmq>=2.0.6; platform_machine != \"aarch64\" and platform_machine != 
\"arm64\"",
+    # 2.1.0 is the first release with a Linux x86_64 wheel; older ones are 
sdist-only and need the
+    # IBM MQ C client to build.
+    "ibmmq>=2.1.0; platform_machine != \"aarch64\" and platform_machine != 
\"arm64\"",
 ]
 "common.messaging" = [
     "apache-airflow-providers-common-messaging>=2.0.0"
diff --git a/providers/ibm/mq/tests/conftest.py 
b/providers/ibm/mq/tests/conftest.py
index e21ed098eb7..d5075114a4b 100644
--- a/providers/ibm/mq/tests/conftest.py
+++ b/providers/ibm/mq/tests/conftest.py
@@ -34,8 +34,12 @@ def _ensure_fake_ibmmq_if_missing():
     behavior.
     """
 
-    if importlib.util.find_spec("ibmmq") is not None:
-        # Real package available, nothing to do.
+    try:
+        importlib.import_module("ibmmq")
+    except ImportError:
+        # Not installed, or installed from a wheel without the IBM MQ C client 
(libmqm_r) available.
+        pass
+    else:
         yield
         return
 
diff --git a/scripts/docker/entrypoint_ci.sh b/scripts/docker/entrypoint_ci.sh
index 4611d28cdaa..b27b986df65 100755
--- a/scripts/docker/entrypoint_ci.sh
+++ b/scripts/docker/entrypoint_ci.sh
@@ -432,7 +432,7 @@ function reinstall_shared_distributions() {
 # export. Providers cannot run arbitrary code through this hook. Maintainers 
should
 # review every addition to this list as a privileged change. See
 # contributing-docs/12_provider_distributions.rst.
-PROVIDERS_NEEDING_PRE_EXTRAS_INSTALL=("ibm.mq")
+PROVIDERS_NEEDING_PRE_EXTRAS_INSTALL=()
 
 function run_pre_extras_install_if_registered() {
     local provider_id="${1}"
diff --git a/uv.lock b/uv.lock
index 18197984171..ba1face9cb7 100644
--- a/uv.lock
+++ b/uv.lock
@@ -6376,7 +6376,7 @@ requires-dist = [
     { name = "apache-airflow-providers-common-messaging", marker = "extra == 
'common-messaging'", editable = "providers/common/messaging" },
     { name = "asgiref", marker = "python_full_version < '3.14'", specifier = 
">=2.3.0" },
     { name = "asgiref", marker = "python_full_version >= '3.14'", specifier = 
">=3.11.1" },
-    { name = "ibmmq", marker = "platform_machine != 'aarch64' and 
platform_machine != 'arm64' and extra == 'ibmmq'", specifier = ">=2.0.6" },
+    { name = "ibmmq", marker = "platform_machine != 'aarch64' and 
platform_machine != 'arm64' and extra == 'ibmmq'", specifier = ">=2.1.0" },
 ]
 provides-extras = ["ibmmq", "common-messaging"]
 

Reply via email to