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

eladkal 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 c91458391be Run Elasticsearch and OpenSearch integration tests per 
major version (#77231)
c91458391be is described below

commit c91458391beb943f7125c7dae04bb85e7f48bf2a
Author: Owen Leung <[email protected]>
AuthorDate: Wed Nov 25 23:56:48 2026 +0800

    Run Elasticsearch and OpenSearch integration tests per major version 
(#77231)
    
    * Run Elasticsearch and OpenSearch integration tests per major version
    
    The integrations ran against one pinned server each (ES 9.3.1, OpenSearch 
2.19.0), so
    ES 8 and OpenSearch 3 deployments were never exercised; an ES 8 
compatibility break
    already shipped once (provider 6.5.1).
    
    * Run the e2e remote logging tests on the latest Elasticsearch and 
OpenSearch
    
    The e2e compose files still pinned ES 9.3.1 and OpenSearch 2.19.0, behind 
the
    integration test defaults.
    
    * Run a provider's integration tests when its dependencies change
    
    A pyproject.toml bump runs no unit tests, so client/server compatibility 
breaks such
    as the one in elasticsearch provider 6.5.1 went untested until a full CI 
run.
---
 .github/workflows/ci-amd.yml                       |  8 ++-
 .github/workflows/ci-arm.yml                       |  8 ++-
 .github/workflows/integration-system-tests.yml     | 14 +++--
 airflow-e2e-tests/docker/elasticsearch.yml         |  2 +-
 airflow-e2e-tests/docker/opensearch.yml            |  2 +-
 contributing-docs/testing/integration_tests.rst    |  8 +++
 dev/breeze/doc/ci/04_selective_checks.md           |  2 +
 .../output_testing_providers-integration-tests.svg | 56 +++++++++++------
 .../output_testing_providers-integration-tests.txt |  2 +-
 .../src/airflow_breeze/commands/common_options.py  | 20 ++++++
 .../airflow_breeze/commands/testing_commands.py    |  8 +++
 .../commands/testing_commands_config.py            |  5 +-
 dev/breeze/src/airflow_breeze/global_constants.py  | 11 ++++
 .../src/airflow_breeze/params/shell_params.py      |  6 ++
 .../src/airflow_breeze/utils/selective_checks.py   | 35 ++++++++++-
 dev/breeze/tests/test_selective_checks.py          | 72 ++++++++++++++++++++++
 .../elasticsearch/log/test_es_remote_log_io.py     | 30 ++++++---
 .../docker-compose/integration-elasticsearch.yml   |  3 +-
 .../ci/docker-compose/integration-opensearch.yml   |  3 +-
 19 files changed, 253 insertions(+), 42 deletions(-)

diff --git a/.github/workflows/ci-amd.yml b/.github/workflows/ci-amd.yml
index 420fb9f01bf..a9b49159466 100644
--- a/.github/workflows/ci-amd.yml
+++ b/.github/workflows/ci-amd.yml
@@ -420,6 +420,8 @@ jobs:
       sqlite-exclude: ${{ steps.selective-checks.outputs.sqlite-exclude }}
       testable-core-integrations: ${{ 
steps.selective-checks.outputs.testable-core-integrations }}
       testable-providers-integrations: ${{ 
steps.selective-checks.outputs.testable-providers-integrations }}
+      testable-providers-integrations-matrix: >
+        ${{ 
steps.selective-checks.outputs.testable-providers-integrations-matrix }}
       use-uv: ${{ steps.selective-checks.outputs.force-pip == 'true' && 
'false' || 'true' }}
       upgrade-to-newer-dependencies: ${{ 
steps.selective-checks.outputs.upgrade-to-newer-dependencies }}
       is-uv-lock-update: ${{ steps.selective-checks.outputs.is-uv-lock-update 
}}
@@ -1189,6 +1191,8 @@ jobs:
       platform: ${{ needs.build-info.outputs.platform }}
       testable-core-integrations: ${{ 
needs.build-info.outputs.testable-core-integrations }}
       testable-providers-integrations: ${{ 
needs.build-info.outputs.testable-providers-integrations }}
+      testable-providers-integrations-matrix: >
+        ${{ needs.build-info.outputs.testable-providers-integrations-matrix }}
       run-system-tests: ${{ needs.build-info.outputs.run-system-tests }}
       default-python-version: "${{ 
needs.build-info.outputs.default-python-version }}"
       default-postgres-version: ${{ 
needs.build-info.outputs.default-postgres-version }}
@@ -1197,7 +1201,9 @@ jobs:
       debug-resources: ${{ needs.build-info.outputs.debug-resources }}
       skip-providers-tests: ${{ needs.build-info.outputs.skip-providers-tests 
}}
       use-uv: ${{ needs.build-info.outputs.use-uv }}
-    if: needs.build-info.outputs.run-unit-tests == 'true'
+    if: >
+      needs.build-info.outputs.run-unit-tests == 'true' ||
+      needs.build-info.outputs.testable-providers-integrations != '[]'
 
   tests-with-lowest-direct-resolution-core:
     name: "Low dep tests:core"
diff --git a/.github/workflows/ci-arm.yml b/.github/workflows/ci-arm.yml
index ced6b22c6bb..0fb8ed31043 100644
--- a/.github/workflows/ci-arm.yml
+++ b/.github/workflows/ci-arm.yml
@@ -296,6 +296,8 @@ jobs:
       sqlite-exclude: ${{ steps.selective-checks.outputs.sqlite-exclude }}
       testable-core-integrations: ${{ 
steps.selective-checks.outputs.testable-core-integrations }}
       testable-providers-integrations: ${{ 
steps.selective-checks.outputs.testable-providers-integrations }}
+      testable-providers-integrations-matrix: >
+        ${{ 
steps.selective-checks.outputs.testable-providers-integrations-matrix }}
       use-uv: ${{ steps.selective-checks.outputs.force-pip == 'true' && 
'false' || 'true' }}
       upgrade-to-newer-dependencies: ${{ 
steps.selective-checks.outputs.upgrade-to-newer-dependencies }}
       is-uv-lock-update: ${{ steps.selective-checks.outputs.is-uv-lock-update 
}}
@@ -1065,6 +1067,8 @@ jobs:
       platform: ${{ needs.build-info.outputs.platform }}
       testable-core-integrations: ${{ 
needs.build-info.outputs.testable-core-integrations }}
       testable-providers-integrations: ${{ 
needs.build-info.outputs.testable-providers-integrations }}
+      testable-providers-integrations-matrix: >
+        ${{ needs.build-info.outputs.testable-providers-integrations-matrix }}
       run-system-tests: ${{ needs.build-info.outputs.run-system-tests }}
       default-python-version: "${{ 
needs.build-info.outputs.default-python-version }}"
       default-postgres-version: ${{ 
needs.build-info.outputs.default-postgres-version }}
@@ -1073,7 +1077,9 @@ jobs:
       debug-resources: ${{ needs.build-info.outputs.debug-resources }}
       skip-providers-tests: ${{ needs.build-info.outputs.skip-providers-tests 
}}
       use-uv: ${{ needs.build-info.outputs.use-uv }}
-    if: needs.build-info.outputs.run-unit-tests == 'true'
+    if: >
+      needs.build-info.outputs.run-unit-tests == 'true' ||
+      needs.build-info.outputs.testable-providers-integrations != '[]'
 
   tests-with-lowest-direct-resolution-core:
     name: "Low dep tests:core"
diff --git a/.github/workflows/integration-system-tests.yml 
b/.github/workflows/integration-system-tests.yml
index 0e250cbafeb..e0f880f7f38 100644
--- a/.github/workflows/integration-system-tests.yml
+++ b/.github/workflows/integration-system-tests.yml
@@ -43,6 +43,10 @@ on:  # yamllint disable-line rule:truthy
         description: "The list of testable providers integrations as JSON 
array."
         required: true
         type: string
+      testable-providers-integrations-matrix:
+        description: "Matrix include entries for the providers integration 
jobs as JSON array."
+        required: true
+        type: string
       run-system-tests:
         description: "Run system tests (true/false)"
         required: true
@@ -139,7 +143,7 @@ jobs:
   tests-providers-integration:
     timeout-minutes: 30
     if: inputs.testable-providers-integrations != '[]' && 
inputs.skip-providers-tests != 'true'
-    name: "Integration: providers ${{ matrix.integration }}"
+    name: "Integration: providers ${{ matrix.id }}"
     runs-on: ${{ format(fromJSON(inputs.runners)[0], '8+16', '32+64') }}
     strategy:
       fail-fast: false
@@ -147,12 +151,12 @@ jobs:
       # runners are the project's own capacity, so a run there starts the 
whole matrix at once.
       max-parallel: ${{ contains(inputs.runners, 'runs-on=') && 256 || 20 }}
       matrix:
-        integration: ${{ fromJSON(inputs.testable-providers-integrations) }}
+        include: ${{ fromJSON(inputs.testable-providers-integrations-matrix) }}
     env:
       BACKEND: "postgres"
       BACKEND_VERSION: ${{ inputs.default-postgres-version }}
       PYTHON_MAJOR_MINOR_VERSION: "${{ inputs.default-python-version }}"
-      JOB_ID: "integration-providers-${{ matrix.integration }}"
+      JOB_ID: "integration-providers-${{ matrix.id }}"
       SKIP_PROVIDERS_TESTS: "${{ inputs.skip-providers-tests }}"
       ENABLE_COVERAGE: "${{ inputs.run-coverage}}"
       DEBUG_RESOURCES: "${{ inputs.debug-resources }}"
@@ -180,9 +184,11 @@ jobs:
           python: "${{ inputs.default-python-version }}"
           use-uv: ${{ inputs.use-uv }}
           make-mnt-writeable-and-cleanup: true
-      - name: "Integration: providers ${{ matrix.integration }}"
+      - name: "Integration: providers ${{ matrix.id }}"
         env:
           INTEGRATION: "${{ matrix.integration }}"
+          ELASTICSEARCH_VERSION: "${{ matrix.elasticsearch-version }}"
+          OPENSEARCH_VERSION: "${{ matrix.opensearch-version }}"
         run: ./scripts/ci/testing/run_integration_tests_with_retry.sh 
providers "${INTEGRATION}"
       - name: "Post Tests success"
         uses: ./.github/actions/post_tests_success
diff --git a/airflow-e2e-tests/docker/elasticsearch.yml 
b/airflow-e2e-tests/docker/elasticsearch.yml
index 7991c09b0dc..11d7387a057 100644
--- a/airflow-e2e-tests/docker/elasticsearch.yml
+++ b/airflow-e2e-tests/docker/elasticsearch.yml
@@ -17,7 +17,7 @@
 ---
 services:
   elasticsearch:
-    image: docker.elastic.co/elasticsearch/elasticsearch:9.3.1
+    image: docker.elastic.co/elasticsearch/elasticsearch:9.5.6
     environment:
       - discovery.type=single-node
       - xpack.security.enabled=false
diff --git a/airflow-e2e-tests/docker/opensearch.yml 
b/airflow-e2e-tests/docker/opensearch.yml
index f6fc0b72cc3..4bb08103161 100644
--- a/airflow-e2e-tests/docker/opensearch.yml
+++ b/airflow-e2e-tests/docker/opensearch.yml
@@ -17,7 +17,7 @@
 ---
 services:
   opensearch:
-    image: opensearchproject/opensearch:2.19.0
+    image: opensearchproject/opensearch:3.10.0
     environment:
       - discovery.type=single-node
       - DISABLE_SECURITY_PLUGIN=true
diff --git a/contributing-docs/testing/integration_tests.rst 
b/contributing-docs/testing/integration_tests.rst
index a2e615ccaf3..10697bd6724 100644
--- a/contributing-docs/testing/integration_tests.rst
+++ b/contributing-docs/testing/integration_tests.rst
@@ -211,6 +211,14 @@ Runs mongo providers integration tests:
 
        breeze testing providers-integration-tests  --db-reset --integration 
mongo
 
+The ``elasticsearch`` and ``opensearch`` integrations start the latest server 
version by default. Pick another
+supported version with ``--elasticsearch-version`` or ``--opensearch-version`` 
(``--help`` lists them).
+CI runs their tests once per supported version.
+
+  .. code-block:: bash
+
+       breeze testing providers-integration-tests  --db-reset --integration 
elasticsearch --elasticsearch-version <VERSION>
+
 
 Runs kerberos core integration tests:
 
diff --git a/dev/breeze/doc/ci/04_selective_checks.md 
b/dev/breeze/doc/ci/04_selective_checks.md
index 8260dcdee9d..4ff67215a1c 100644
--- a/dev/breeze/doc/ci/04_selective_checks.md
+++ b/dev/breeze/doc/ci/04_selective_checks.md
@@ -301,6 +301,7 @@ representative examples (file → effect):
 | `core_api/openapi/_private_ui.yaml` (UI-only spec)     | UI compile/lint 
prek hooks, **no full matrix**                       | matches `UI OpenAPI 
files`; the UI codegen input must be type-checked, but the public contract is 
unchanged |
 | `chart/templates/...yaml` (on `main`)                  | `run_helm_tests` (+ 
PROD image)                                      | matches `HELM_FILES`; Helm 
tests only on `main` |
 | `task-sdk/.../task_runner.py` or `airflow-core/tests/integration/otel/...` | 
the `otel` core integration                       | matches `OTEL_FILES`; the 
otel integration tests assert the span hierarchy task_runner emits |
+| `providers/elasticsearch/pyproject.toml` (+ `uv.lock`) | the `elasticsearch` 
integration, once per server version             | a provider's 
`pyproject.toml` / `provider.yaml` runs its owning integration even though no 
unit tests run; versions come from `PROVIDERS_INTEGRATION_SERVER_VERSIONS` |
 | `airflow-core/src/airflow/ui/...tsx` only              | `run_ui_tests`, 
**no** unit tests                                    | "only new-UI files" 
short-circuit skips Python unit tests |
 
 The "complexity" you feel reading the code is just *many* such rules stacked 
up — each one on its own
@@ -841,6 +842,7 @@ GitHub Actions to pass the list of parameters to a command 
to execute
 | sqlite-exclude                                          | Which versions of 
Sqlite to exclude for tests as JSON array                                       
      | []                                       |      |
 | testable-core-integrations                              | List of core 
integrations that are testable in the build as JSON array                       
           | \['celery', 'kerberos'\]                 |      |
 | testable-providers-integrations                         | List of core 
integrations that are testable in the build as JSON array                       
           | \['mongo', 'kafka'\]                     |      |
+| testable-providers-integrations-matrix                  | Matrix entries for 
the providers integration jobs: one per integration, and one per server version 
for integrations in `PROVIDERS_INTEGRATION_SERVER_VERSIONS` (elasticsearch, 
opensearch) | \[{}\]                                   |      |
 | upgrade-to-newer-dependencies                           | Whether the image 
build should attempt to upgrade all dependencies (true/false or commit hash); 
false when no CI image is built | false                                    |    
  |
 | use-pinned-os-deps-images                               | Whether the CI and 
PROD image builds start from the pinned OS-dependencies images; false with the 
`disable image cache` label or a changed OS-dependencies script | true          
                           |      |
 
diff --git 
a/dev/breeze/doc/images/output_testing_providers-integration-tests.svg 
b/dev/breeze/doc/images/output_testing_providers-integration-tests.svg
index fff5763d2ab..141f48b2a45 100644
--- a/dev/breeze/doc/images/output_testing_providers-integration-tests.svg
+++ b/dev/breeze/doc/images/output_testing_providers-integration-tests.svg
@@ -1,4 +1,4 @@
-<svg class="rich-terminal" viewBox="0 0 1482 1367.6" 
xmlns="http://www.w3.org/2000/svg";>
+<svg class="rich-terminal" viewBox="0 0 1482 1465.1999999999998" 
xmlns="http://www.w3.org/2000/svg";>
     <!-- Generated with Rich https://www.textualize.io -->
     <style>
 
@@ -43,7 +43,7 @@
 
     <defs>
     <clipPath id="breeze-testing-providers-integration-tests-clip-terminal">
-      <rect x="0" y="0" width="1463.0" height="1316.6" />
+      <rect x="0" y="0" width="1463.0" height="1414.1999999999998" />
     </clipPath>
     <clipPath id="breeze-testing-providers-integration-tests-line-0">
     <rect x="0" y="1.5" width="1464" height="24.65"/>
@@ -204,9 +204,21 @@
 <clipPath id="breeze-testing-providers-integration-tests-line-52">
     <rect x="0" y="1270.3" width="1464" height="24.65"/>
             </clipPath>
+<clipPath id="breeze-testing-providers-integration-tests-line-53">
+    <rect x="0" y="1294.7" width="1464" height="24.65"/>
+            </clipPath>
+<clipPath id="breeze-testing-providers-integration-tests-line-54">
+    <rect x="0" y="1319.1" width="1464" height="24.65"/>
+            </clipPath>
+<clipPath id="breeze-testing-providers-integration-tests-line-55">
+    <rect x="0" y="1343.5" width="1464" height="24.65"/>
+            </clipPath>
+<clipPath id="breeze-testing-providers-integration-tests-line-56">
+    <rect x="0" y="1367.9" width="1464" height="24.65"/>
+            </clipPath>
     </defs>
 
-    <rect fill="#292929" stroke="rgba(255,255,255,0.35)" stroke-width="1" 
x="1" y="1" width="1480" height="1365.6" rx="8"/><text 
class="breeze-testing-providers-integration-tests-title" fill="#c5c8c6" 
text-anchor="middle" x="740" 
y="27">Command:&#160;testing&#160;providers-integration-tests</text>
+    <rect fill="#292929" stroke="rgba(255,255,255,0.35)" stroke-width="1" 
x="1" y="1" width="1480" height="1463.2" rx="8"/><text 
class="breeze-testing-providers-integration-tests-title" fill="#c5c8c6" 
text-anchor="middle" x="740" 
y="27">Command:&#160;testing&#160;providers-integration-tests</text>
             <g transform="translate(26,22)">
             <circle cx="0" cy="0" r="7" fill="#ff5f57"/>
             <circle cx="22" cy="0" r="7" fill="#febc2e"/>
@@ -253,23 +265,27 @@
 </text><text class="breeze-testing-providers-integration-tests-r5" x="0" 
y="849.6" textLength="12.2" 
clip-path="url(#breeze-testing-providers-integration-tests-line-34)">│</text><text
 class="breeze-testing-providers-integration-tests-r5" x="610" y="849.6" 
textLength="341.6" 
clip-path="url(#breeze-testing-providers-integration-tests-line-34)">[default:&#160;force-sa-warnings]</text><text
 class="breeze-testing-providers-integration-tests-r5" x="1451.8" y="849.6" 
textLength="12.2" clip-path [...]
 </text><text class="breeze-testing-providers-integration-tests-r5" x="0" 
y="874" textLength="1464" 
clip-path="url(#breeze-testing-providers-integration-tests-line-35)">╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯</text><text
 class="breeze-testing-providers-integration-tests-r1" x="1464" y="874" 
textLength="12.2" 
clip-path="url(#breeze-testing-providers-integration-tests-line-35)">
 </text><text class="breeze-testing-providers-integration-tests-r5" x="0" 
y="898.4" textLength="24.4" 
clip-path="url(#breeze-testing-providers-integration-tests-line-36)">╭─</text><text
 class="breeze-testing-providers-integration-tests-r5" x="24.4" y="898.4" 
textLength="231.8" 
clip-path="url(#breeze-testing-providers-integration-tests-line-36)">&#160;Integration&#160;tests&#160;</text><text
 class="breeze-testing-providers-integration-tests-r5" x="256.2" y="898.4" 
textLength="1183.4" clip- [...]
-</text><text class="breeze-testing-providers-integration-tests-r5" x="0" 
y="922.8" textLength="12.2" 
clip-path="url(#breeze-testing-providers-integration-tests-line-37)">│</text><text
 class="breeze-testing-providers-integration-tests-r4" x="24.4" y="922.8" 
textLength="158.6" 
clip-path="url(#breeze-testing-providers-integration-tests-line-37)">--integration</text><text
 class="breeze-testing-providers-integration-tests-r1" x="207.4" y="922.8" 
textLength="878.4" clip-path="url(#breeze-testi [...]
-</text><text class="breeze-testing-providers-integration-tests-r5" x="0" 
y="947.2" textLength="12.2" 
clip-path="url(#breeze-testing-providers-integration-tests-line-38)">│</text><text
 class="breeze-testing-providers-integration-tests-r6" x="207.4" y="947.2" 
textLength="1171.2" 
clip-path="url(#breeze-testing-providers-integration-tests-line-38)">cassandra&#160;|&#160;celery&#160;|&#160;drill&#160;|&#160;elasticsearch&#160;|&#160;kafka&#160;|&#160;localstack&#160;|&#160;mongo&#160;|&#160;m
 [...]
-</text><text class="breeze-testing-providers-integration-tests-r5" x="0" 
y="971.6" textLength="12.2" 
clip-path="url(#breeze-testing-providers-integration-tests-line-39)">│</text><text
 class="breeze-testing-providers-integration-tests-r6" x="207.4" y="971.6" 
textLength="756.4" 
clip-path="url(#breeze-testing-providers-integration-tests-line-39)">opensearch&#160;|&#160;pinot&#160;|&#160;qdrant&#160;|&#160;redis&#160;|&#160;tinkerpop&#160;|&#160;trino&#160;|&#160;ydb)</text><text
 class="bree [...]
-</text><text class="breeze-testing-providers-integration-tests-r5" x="0" 
y="996" textLength="1464" 
clip-path="url(#breeze-testing-providers-integration-tests-line-40)">╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯</text><text
 class="breeze-testing-providers-integration-tests-r1" x="1464" y="996" 
textLength="12.2" 
clip-path="url(#breeze-testing-providers-integration-tests-line-40)">
-</text><text class="breeze-testing-providers-integration-tests-r5" x="0" 
y="1020.4" textLength="24.4" 
clip-path="url(#breeze-testing-providers-integration-tests-line-41)">╭─</text><text
 class="breeze-testing-providers-integration-tests-r5" x="24.4" y="1020.4" 
textLength="402.6" 
clip-path="url(#breeze-testing-providers-integration-tests-line-41)">&#160;Advanced&#160;flag&#160;for&#160;tests&#160;command&#160;</text><text
 class="breeze-testing-providers-integration-tests-r5" x="427" y="102 [...]
-</text><text class="breeze-testing-providers-integration-tests-r5" x="0" 
y="1044.8" textLength="12.2" 
clip-path="url(#breeze-testing-providers-integration-tests-line-42)">│</text><text
 class="breeze-testing-providers-integration-tests-r4" x="24.4" y="1044.8" 
textLength="317.2" 
clip-path="url(#breeze-testing-providers-integration-tests-line-42)">--github-repository&#160;&#160;&#160;&#160;&#160;&#160;&#160;</text><text
 class="breeze-testing-providers-integration-tests-r7" x="366" y="1044.8 [...]
-</text><text class="breeze-testing-providers-integration-tests-r5" x="0" 
y="1069.2" textLength="12.2" 
clip-path="url(#breeze-testing-providers-integration-tests-line-43)">│</text><text
 class="breeze-testing-providers-integration-tests-r4" x="24.4" y="1069.2" 
textLength="317.2" 
clip-path="url(#breeze-testing-providers-integration-tests-line-43)">--mount-sources&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;</text><text
 class="breeze-testing-providers-integration-tests-r [...]
-</text><text class="breeze-testing-providers-integration-tests-r5" x="0" 
y="1093.6" textLength="12.2" 
clip-path="url(#breeze-testing-providers-integration-tests-line-44)">│</text><text
 class="breeze-testing-providers-integration-tests-r1" x="414.8" y="1093.6" 
textLength="134.2" 
clip-path="url(#breeze-testing-providers-integration-tests-line-44)">selected).&#160;</text><text
 class="breeze-testing-providers-integration-tests-r5" x="549" y="1093.6" 
textLength="231.8" clip-path="url(#breeze- [...]
-</text><text class="breeze-testing-providers-integration-tests-r5" x="0" 
y="1118" textLength="12.2" 
clip-path="url(#breeze-testing-providers-integration-tests-line-45)">│</text><text
 class="breeze-testing-providers-integration-tests-r6" x="414.8" y="1118" 
textLength="244" 
clip-path="url(#breeze-testing-providers-integration-tests-line-45)">providers-and-tests)</text><text
 class="breeze-testing-providers-integration-tests-r5" x="1451.8" y="1118" 
textLength="12.2" clip-path="url(#breeze-te [...]
-</text><text class="breeze-testing-providers-integration-tests-r5" x="0" 
y="1142.4" textLength="12.2" 
clip-path="url(#breeze-testing-providers-integration-tests-line-46)">│</text><text
 class="breeze-testing-providers-integration-tests-r4" x="24.4" y="1142.4" 
textLength="317.2" 
clip-path="url(#breeze-testing-providers-integration-tests-line-46)">--skip-docker-compose-down</text><text
 class="breeze-testing-providers-integration-tests-r1" x="414.8" y="1142.4" 
textLength="549" clip-path="url [...]
-</text><text class="breeze-testing-providers-integration-tests-r5" x="0" 
y="1166.8" textLength="12.2" 
clip-path="url(#breeze-testing-providers-integration-tests-line-47)">│</text><text
 class="breeze-testing-providers-integration-tests-r4" x="24.4" y="1166.8" 
textLength="317.2" 
clip-path="url(#breeze-testing-providers-integration-tests-line-47)">--keep-env-variables&#160;&#160;&#160;&#160;&#160;&#160;</text><text
 class="breeze-testing-providers-integration-tests-r1" x="414.8" y="1166.8" t 
[...]
-</text><text class="breeze-testing-providers-integration-tests-r5" x="0" 
y="1191.2" textLength="1464" 
clip-path="url(#breeze-testing-providers-integration-tests-line-48)">╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯</text><text
 class="breeze-testing-providers-integration-tests-r1" x="1464" y="1191.2" 
textLength="12.2" 
clip-path="url(#breeze-testing-providers-integration-tests-line-48)">
-</text><text class="breeze-testing-providers-integration-tests-r5" x="0" 
y="1215.6" textLength="24.4" 
clip-path="url(#breeze-testing-providers-integration-tests-line-49)">╭─</text><text
 class="breeze-testing-providers-integration-tests-r5" x="24.4" y="1215.6" 
textLength="195.2" 
clip-path="url(#breeze-testing-providers-integration-tests-line-49)">&#160;Common&#160;options&#160;</text><text
 class="breeze-testing-providers-integration-tests-r5" x="219.6" y="1215.6" 
textLength="1220" clip-pa [...]
-</text><text class="breeze-testing-providers-integration-tests-r5" x="0" 
y="1240" textLength="12.2" 
clip-path="url(#breeze-testing-providers-integration-tests-line-50)">│</text><text
 class="breeze-testing-providers-integration-tests-r4" x="24.4" y="1240" 
textLength="109.8" 
clip-path="url(#breeze-testing-providers-integration-tests-line-50)">--dry-run</text><text
 class="breeze-testing-providers-integration-tests-r7" x="158.6" y="1240" 
textLength="24.4" clip-path="url(#breeze-testing-provi [...]
-</text><text class="breeze-testing-providers-integration-tests-r5" x="0" 
y="1264.4" textLength="12.2" 
clip-path="url(#breeze-testing-providers-integration-tests-line-51)">│</text><text
 class="breeze-testing-providers-integration-tests-r4" x="24.4" y="1264.4" 
textLength="109.8" 
clip-path="url(#breeze-testing-providers-integration-tests-line-51)">--verbose</text><text
 class="breeze-testing-providers-integration-tests-r7" x="158.6" y="1264.4" 
textLength="24.4" clip-path="url(#breeze-testing [...]
-</text><text class="breeze-testing-providers-integration-tests-r5" x="0" 
y="1288.8" textLength="12.2" 
clip-path="url(#breeze-testing-providers-integration-tests-line-52)">│</text><text
 class="breeze-testing-providers-integration-tests-r4" x="24.4" y="1288.8" 
textLength="109.8" 
clip-path="url(#breeze-testing-providers-integration-tests-line-52)">--help&#160;&#160;&#160;</text><text
 class="breeze-testing-providers-integration-tests-r7" x="158.6" y="1288.8" 
textLength="24.4" clip-path="url( [...]
-</text><text class="breeze-testing-providers-integration-tests-r5" x="0" 
y="1313.2" textLength="1464" 
clip-path="url(#breeze-testing-providers-integration-tests-line-53)">╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯</text><text
 class="breeze-testing-providers-integration-tests-r1" x="1464" y="1313.2" 
textLength="12.2" 
clip-path="url(#breeze-testing-providers-integration-tests-line-53)">
+</text><text class="breeze-testing-providers-integration-tests-r5" x="0" 
y="922.8" textLength="12.2" 
clip-path="url(#breeze-testing-providers-integration-tests-line-37)">│</text><text
 class="breeze-testing-providers-integration-tests-r4" x="24.4" y="922.8" 
textLength="280.6" 
clip-path="url(#breeze-testing-providers-integration-tests-line-37)">--integration&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;</text><text
 class="breeze-testing-providers-integration-tests-r1" x="329. [...]
+</text><text class="breeze-testing-providers-integration-tests-r5" x="0" 
y="947.2" textLength="12.2" 
clip-path="url(#breeze-testing-providers-integration-tests-line-38)">│</text><text
 class="breeze-testing-providers-integration-tests-r6" x="329.4" y="947.2" 
textLength="1024.8" 
clip-path="url(#breeze-testing-providers-integration-tests-line-38)">|&#160;cassandra&#160;|&#160;celery&#160;|&#160;drill&#160;|&#160;elasticsearch&#160;|&#160;kafka&#160;|&#160;localstack&#160;|&#160;mongo&#160;|
 [...]
+</text><text class="breeze-testing-providers-integration-tests-r5" x="0" 
y="971.6" textLength="12.2" 
clip-path="url(#breeze-testing-providers-integration-tests-line-39)">│</text><text
 class="breeze-testing-providers-integration-tests-r6" x="329.4" y="971.6" 
textLength="927.2" 
clip-path="url(#breeze-testing-providers-integration-tests-line-39)">openlineage&#160;|&#160;opensearch&#160;|&#160;pinot&#160;|&#160;qdrant&#160;|&#160;redis&#160;|&#160;tinkerpop&#160;|&#160;trino&#160;|&#160;ydb)
 [...]
+</text><text class="breeze-testing-providers-integration-tests-r5" x="0" 
y="996" textLength="12.2" 
clip-path="url(#breeze-testing-providers-integration-tests-line-40)">│</text><text
 class="breeze-testing-providers-integration-tests-r4" x="24.4" y="996" 
textLength="280.6" 
clip-path="url(#breeze-testing-providers-integration-tests-line-40)">--elasticsearch-version</text><text
 class="breeze-testing-providers-integration-tests-r1" x="329.4" y="996" 
textLength="951.6" clip-path="url(#breeze-t [...]
+</text><text class="breeze-testing-providers-integration-tests-r5" x="0" 
y="1020.4" textLength="12.2" 
clip-path="url(#breeze-testing-providers-integration-tests-line-41)">│</text><text
 class="breeze-testing-providers-integration-tests-r5" x="329.4" y="1020.4" 
textLength="73.2" 
clip-path="url(#breeze-testing-providers-integration-tests-line-41)">9.5.6]</text><text
 class="breeze-testing-providers-integration-tests-r6" x="414.8" y="1020.4" 
textLength="207.4" clip-path="url(#breeze-testing-p [...]
+</text><text class="breeze-testing-providers-integration-tests-r5" x="0" 
y="1044.8" textLength="12.2" 
clip-path="url(#breeze-testing-providers-integration-tests-line-42)">│</text><text
 class="breeze-testing-providers-integration-tests-r4" x="24.4" y="1044.8" 
textLength="280.6" 
clip-path="url(#breeze-testing-providers-integration-tests-line-42)">--opensearch-version&#160;&#160;&#160;</text><text
 class="breeze-testing-providers-integration-tests-r1" x="329.4" y="1044.8" 
textLength="878.4"  [...]
+</text><text class="breeze-testing-providers-integration-tests-r5" x="0" 
y="1069.2" textLength="12.2" 
clip-path="url(#breeze-testing-providers-integration-tests-line-43)">│</text><text
 class="breeze-testing-providers-integration-tests-r6" x="329.4" y="1069.2" 
textLength="207.4" 
clip-path="url(#breeze-testing-providers-integration-tests-line-43)">(3.10.0&#160;|&#160;2.19.7)</text><text
 class="breeze-testing-providers-integration-tests-r5" x="1451.8" y="1069.2" 
textLength="12.2" clip-path= [...]
+</text><text class="breeze-testing-providers-integration-tests-r5" x="0" 
y="1093.6" textLength="1464" 
clip-path="url(#breeze-testing-providers-integration-tests-line-44)">╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯</text><text
 class="breeze-testing-providers-integration-tests-r1" x="1464" y="1093.6" 
textLength="12.2" 
clip-path="url(#breeze-testing-providers-integration-tests-line-44)">
+</text><text class="breeze-testing-providers-integration-tests-r5" x="0" 
y="1118" textLength="24.4" 
clip-path="url(#breeze-testing-providers-integration-tests-line-45)">╭─</text><text
 class="breeze-testing-providers-integration-tests-r5" x="24.4" y="1118" 
textLength="402.6" 
clip-path="url(#breeze-testing-providers-integration-tests-line-45)">&#160;Advanced&#160;flag&#160;for&#160;tests&#160;command&#160;</text><text
 class="breeze-testing-providers-integration-tests-r5" x="427" y="1118" t [...]
+</text><text class="breeze-testing-providers-integration-tests-r5" x="0" 
y="1142.4" textLength="12.2" 
clip-path="url(#breeze-testing-providers-integration-tests-line-46)">│</text><text
 class="breeze-testing-providers-integration-tests-r4" x="24.4" y="1142.4" 
textLength="317.2" 
clip-path="url(#breeze-testing-providers-integration-tests-line-46)">--github-repository&#160;&#160;&#160;&#160;&#160;&#160;&#160;</text><text
 class="breeze-testing-providers-integration-tests-r7" x="366" y="1142.4 [...]
+</text><text class="breeze-testing-providers-integration-tests-r5" x="0" 
y="1166.8" textLength="12.2" 
clip-path="url(#breeze-testing-providers-integration-tests-line-47)">│</text><text
 class="breeze-testing-providers-integration-tests-r4" x="24.4" y="1166.8" 
textLength="317.2" 
clip-path="url(#breeze-testing-providers-integration-tests-line-47)">--mount-sources&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;</text><text
 class="breeze-testing-providers-integration-tests-r [...]
+</text><text class="breeze-testing-providers-integration-tests-r5" x="0" 
y="1191.2" textLength="12.2" 
clip-path="url(#breeze-testing-providers-integration-tests-line-48)">│</text><text
 class="breeze-testing-providers-integration-tests-r1" x="414.8" y="1191.2" 
textLength="134.2" 
clip-path="url(#breeze-testing-providers-integration-tests-line-48)">selected).&#160;</text><text
 class="breeze-testing-providers-integration-tests-r5" x="549" y="1191.2" 
textLength="231.8" clip-path="url(#breeze- [...]
+</text><text class="breeze-testing-providers-integration-tests-r5" x="0" 
y="1215.6" textLength="12.2" 
clip-path="url(#breeze-testing-providers-integration-tests-line-49)">│</text><text
 class="breeze-testing-providers-integration-tests-r6" x="414.8" y="1215.6" 
textLength="244" 
clip-path="url(#breeze-testing-providers-integration-tests-line-49)">providers-and-tests)</text><text
 class="breeze-testing-providers-integration-tests-r5" x="1451.8" y="1215.6" 
textLength="12.2" clip-path="url(#bre [...]
+</text><text class="breeze-testing-providers-integration-tests-r5" x="0" 
y="1240" textLength="12.2" 
clip-path="url(#breeze-testing-providers-integration-tests-line-50)">│</text><text
 class="breeze-testing-providers-integration-tests-r4" x="24.4" y="1240" 
textLength="317.2" 
clip-path="url(#breeze-testing-providers-integration-tests-line-50)">--skip-docker-compose-down</text><text
 class="breeze-testing-providers-integration-tests-r1" x="414.8" y="1240" 
textLength="549" clip-path="url(#bree [...]
+</text><text class="breeze-testing-providers-integration-tests-r5" x="0" 
y="1264.4" textLength="12.2" 
clip-path="url(#breeze-testing-providers-integration-tests-line-51)">│</text><text
 class="breeze-testing-providers-integration-tests-r4" x="24.4" y="1264.4" 
textLength="317.2" 
clip-path="url(#breeze-testing-providers-integration-tests-line-51)">--keep-env-variables&#160;&#160;&#160;&#160;&#160;&#160;</text><text
 class="breeze-testing-providers-integration-tests-r1" x="414.8" y="1264.4" t 
[...]
+</text><text class="breeze-testing-providers-integration-tests-r5" x="0" 
y="1288.8" textLength="1464" 
clip-path="url(#breeze-testing-providers-integration-tests-line-52)">╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯</text><text
 class="breeze-testing-providers-integration-tests-r1" x="1464" y="1288.8" 
textLength="12.2" 
clip-path="url(#breeze-testing-providers-integration-tests-line-52)">
+</text><text class="breeze-testing-providers-integration-tests-r5" x="0" 
y="1313.2" textLength="24.4" 
clip-path="url(#breeze-testing-providers-integration-tests-line-53)">╭─</text><text
 class="breeze-testing-providers-integration-tests-r5" x="24.4" y="1313.2" 
textLength="195.2" 
clip-path="url(#breeze-testing-providers-integration-tests-line-53)">&#160;Common&#160;options&#160;</text><text
 class="breeze-testing-providers-integration-tests-r5" x="219.6" y="1313.2" 
textLength="1220" clip-pa [...]
+</text><text class="breeze-testing-providers-integration-tests-r5" x="0" 
y="1337.6" textLength="12.2" 
clip-path="url(#breeze-testing-providers-integration-tests-line-54)">│</text><text
 class="breeze-testing-providers-integration-tests-r4" x="24.4" y="1337.6" 
textLength="109.8" 
clip-path="url(#breeze-testing-providers-integration-tests-line-54)">--dry-run</text><text
 class="breeze-testing-providers-integration-tests-r7" x="158.6" y="1337.6" 
textLength="24.4" clip-path="url(#breeze-testing [...]
+</text><text class="breeze-testing-providers-integration-tests-r5" x="0" 
y="1362" textLength="12.2" 
clip-path="url(#breeze-testing-providers-integration-tests-line-55)">│</text><text
 class="breeze-testing-providers-integration-tests-r4" x="24.4" y="1362" 
textLength="109.8" 
clip-path="url(#breeze-testing-providers-integration-tests-line-55)">--verbose</text><text
 class="breeze-testing-providers-integration-tests-r7" x="158.6" y="1362" 
textLength="24.4" clip-path="url(#breeze-testing-provi [...]
+</text><text class="breeze-testing-providers-integration-tests-r5" x="0" 
y="1386.4" textLength="12.2" 
clip-path="url(#breeze-testing-providers-integration-tests-line-56)">│</text><text
 class="breeze-testing-providers-integration-tests-r4" x="24.4" y="1386.4" 
textLength="109.8" 
clip-path="url(#breeze-testing-providers-integration-tests-line-56)">--help&#160;&#160;&#160;</text><text
 class="breeze-testing-providers-integration-tests-r7" x="158.6" y="1386.4" 
textLength="24.4" clip-path="url( [...]
+</text><text class="breeze-testing-providers-integration-tests-r5" x="0" 
y="1410.8" textLength="1464" 
clip-path="url(#breeze-testing-providers-integration-tests-line-57)">╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯</text><text
 class="breeze-testing-providers-integration-tests-r1" x="1464" y="1410.8" 
textLength="12.2" 
clip-path="url(#breeze-testing-providers-integration-tests-line-57)">
 </text>
     </g>
     </g>
diff --git 
a/dev/breeze/doc/images/output_testing_providers-integration-tests.txt 
b/dev/breeze/doc/images/output_testing_providers-integration-tests.txt
index 08a22be4f5d..b401c7dc3b1 100644
--- a/dev/breeze/doc/images/output_testing_providers-integration-tests.txt
+++ b/dev/breeze/doc/images/output_testing_providers-integration-tests.txt
@@ -1 +1 @@
-049398240ffa361c5d4e4715a2e12f41
+84deb7f45f5b44e75419d8e5ef6d7abc
diff --git a/dev/breeze/src/airflow_breeze/commands/common_options.py 
b/dev/breeze/src/airflow_breeze/commands/common_options.py
index 4d5d614f37f..af6a84961b9 100644
--- a/dev/breeze/src/airflow_breeze/commands/common_options.py
+++ b/dev/breeze/src/airflow_breeze/commands/common_options.py
@@ -26,10 +26,12 @@ from airflow_breeze.global_constants import (
     ALLOWED_AUTH_MANAGERS,
     ALLOWED_BACKENDS,
     ALLOWED_DOCKER_COMPOSE_PROJECTS,
+    ALLOWED_ELASTICSEARCH_VERSIONS,
     ALLOWED_INSTALLATION_DISTRIBUTION_FORMATS,
     ALLOWED_LLM_MODELS,
     ALLOWED_MOUNT_OPTIONS,
     ALLOWED_MYSQL_VERSIONS,
+    ALLOWED_OPENSEARCH_VERSIONS,
     ALLOWED_POSTGRES_VERSIONS,
     ALLOWED_PYTHON_MAJOR_MINOR_VERSIONS,
     ALLOWED_SDKS,
@@ -40,6 +42,8 @@ from airflow_breeze.global_constants import (
     AUTOCOMPLETE_ALL_INTEGRATIONS,
     AUTOCOMPLETE_CORE_INTEGRATIONS,
     AUTOCOMPLETE_PROVIDERS_INTEGRATIONS,
+    DEFAULT_ELASTICSEARCH_VERSION,
+    DEFAULT_OPENSEARCH_VERSION,
     DEFAULT_POSTGRES_VERSION,
     DOCKER_DEFAULT_PLATFORM,
     SINGLE_PLATFORMS,
@@ -356,6 +360,22 @@ option_postgres_version = click.option(
     show_default=True,
     help="Version of Postgres used.",
 )
+option_elasticsearch_version = click.option(
+    "--elasticsearch-version",
+    type=BetterChoice(ALLOWED_ELASTICSEARCH_VERSIONS),
+    default=DEFAULT_ELASTICSEARCH_VERSION,
+    envvar="ELASTICSEARCH_VERSION",
+    show_default=True,
+    help="Version of the Elasticsearch server started by the elasticsearch 
integration.",
+)
+option_opensearch_version = click.option(
+    "--opensearch-version",
+    type=BetterChoice(ALLOWED_OPENSEARCH_VERSIONS),
+    default=DEFAULT_OPENSEARCH_VERSION,
+    envvar="OPENSEARCH_VERSION",
+    show_default=True,
+    help="Version of the OpenSearch server started by the opensearch 
integration.",
+)
 option_project_name = click.option(
     "--project-name",
     help="Compose project name. Defaults to breeze-<worktree directory name> 
in a linked worktree, "
diff --git a/dev/breeze/src/airflow_breeze/commands/testing_commands.py 
b/dev/breeze/src/airflow_breeze/commands/testing_commands.py
index 18449f1946a..e78dcee85c8 100644
--- a/dev/breeze/src/airflow_breeze/commands/testing_commands.py
+++ b/dev/breeze/src/airflow_breeze/commands/testing_commands.py
@@ -47,6 +47,7 @@ from airflow_breeze.commands.common_options import (
     option_e2e_reporter,
     option_e2e_timeout,
     option_e2e_workers,
+    option_elasticsearch_version,
     option_excluded_providers,
     option_force_lowest_dependencies,
     option_force_reinstall_deps,
@@ -60,6 +61,7 @@ from airflow_breeze.commands.common_options import (
     option_mount_sources,
     option_mysql_version,
     option_no_db_cleanup,
+    option_opensearch_version,
     option_parallelism,
     option_postgres_version,
     option_project_name,
@@ -1157,12 +1159,14 @@ def core_integration_tests(
 @option_enable_coverage
 @option_force_sa_warnings
 @option_forward_credentials
+@option_elasticsearch_version
 @option_github_repository
 @option_providers_integration
 @option_keep_env_variables
 @option_mount_sources
 @option_mysql_version
 @option_no_db_cleanup
+@option_opensearch_version
 @option_postgres_version
 @option_python
 @option_skip_docker_compose_down
@@ -1174,6 +1178,7 @@ def integration_providers_tests(
     collect_only: bool,
     custom_db_url: str | None,
     db_reset: bool,
+    elasticsearch_version: str,
     enable_coverage: bool,
     extra_pytest_args: tuple,
     force_sa_warnings: bool,
@@ -1184,6 +1189,7 @@ def integration_providers_tests(
     mount_sources: str,
     mysql_version: str,
     no_db_cleanup: bool,
+    opensearch_version: str,
     postgres_version: str,
     python: str,
     skip_docker_compose_down: bool,
@@ -1194,6 +1200,7 @@ def integration_providers_tests(
         backend=backend,
         collect_only=collect_only,
         custom_db_url=custom_db_url or "",
+        elasticsearch_version=elasticsearch_version,
         enable_coverage=enable_coverage,
         forward_credentials=forward_credentials,
         forward_ports=False,
@@ -1203,6 +1210,7 @@ def integration_providers_tests(
         mount_sources=mount_sources,
         mysql_version=mysql_version,
         no_db_cleanup=no_db_cleanup,
+        opensearch_version=opensearch_version,
         postgres_version=postgres_version,
         python=python,
         test_type="All",
diff --git a/dev/breeze/src/airflow_breeze/commands/testing_commands_config.py 
b/dev/breeze/src/airflow_breeze/commands/testing_commands_config.py
index 69ea45064a4..3e84166c5a1 100644
--- a/dev/breeze/src/airflow_breeze/commands/testing_commands_config.py
+++ b/dev/breeze/src/airflow_breeze/commands/testing_commands_config.py
@@ -254,7 +254,10 @@ TESTING_PARAMETERS: dict[str, list[dict[str, str | 
list[str]]]] = {
     "breeze testing providers-integration-tests": [
         TEST_OPTIONS_DB,
         TEST_ENVIRONMENT_DB,
-        INTEGRATION_TESTS,
+        {
+            **INTEGRATION_TESTS,
+            "options": [*INTEGRATION_TESTS["options"], 
"--elasticsearch-version", "--opensearch-version"],
+        },
         TEST_ADVANCED_FLAGS,
     ],
     "breeze testing system-tests": [
diff --git a/dev/breeze/src/airflow_breeze/global_constants.py 
b/dev/breeze/src/airflow_breeze/global_constants.py
index 754804917a9..ef088e98510 100644
--- a/dev/breeze/src/airflow_breeze/global_constants.py
+++ b/dev/breeze/src/airflow_breeze/global_constants.py
@@ -157,6 +157,17 @@ TESTABLE_PROVIDERS_INTEGRATION_OWNERS = {
     "trino": "trino",
     "ydb": "ydb",
 }
+# Server versions the elasticsearch and opensearch integrations can run 
against. The first one is
+# the default; CI runs each provider's integration tests once per listed 
version. Keep the image tags in
+# airflow-e2e-tests/docker/elasticsearch.yml and opensearch.yml on the 
defaults.
+ALLOWED_ELASTICSEARCH_VERSIONS = ["9.5.6", "8.19.25"]
+DEFAULT_ELASTICSEARCH_VERSION = ALLOWED_ELASTICSEARCH_VERSIONS[0]
+ALLOWED_OPENSEARCH_VERSIONS = ["3.10.0", "2.19.7"]
+DEFAULT_OPENSEARCH_VERSION = ALLOWED_OPENSEARCH_VERSIONS[0]
+PROVIDERS_INTEGRATION_SERVER_VERSIONS: dict[str, list[str]] = {
+    "elasticsearch": ALLOWED_ELASTICSEARCH_VERSIONS,
+    "opensearch": ALLOWED_OPENSEARCH_VERSIONS,
+}
 KEYCLOAK_INTEGRATION = "keycloak"
 STATSD_INTEGRATION = "statsd"
 OTEL_INTEGRATION = "otel"
diff --git a/dev/breeze/src/airflow_breeze/params/shell_params.py 
b/dev/breeze/src/airflow_breeze/params/shell_params.py
index ce10da06219..0dc6e9d7501 100644
--- a/dev/breeze/src/airflow_breeze/params/shell_params.py
+++ b/dev/breeze/src/airflow_breeze/params/shell_params.py
@@ -47,6 +47,8 @@ from airflow_breeze.global_constants import (
     CELERY_BROKER_URLS_MAP,
     CELERY_EXECUTOR,
     DEFAULT_CELERY_BROKER,
+    DEFAULT_ELASTICSEARCH_VERSION,
+    DEFAULT_OPENSEARCH_VERSION,
     DEFAULT_POSTGRES_VERSION,
     DOCKER_DEFAULT_PLATFORM,
     DRILL_HOST_PORT,
@@ -191,6 +193,7 @@ class ShellParams:
     downgrade_sqlalchemy: bool = False
     downgrade_pendulum: bool = False
     dry_run: bool = False
+    elasticsearch_version: str = DEFAULT_ELASTICSEARCH_VERSION
     enable_coverage: bool = False
     excluded_providers: str = ""
     executor: str = START_AIRFLOW_DEFAULT_ALLOWED_EXECUTOR
@@ -221,6 +224,7 @@ class ShellParams:
     no_db_cleanup: bool = False
     num_runs: str = ""
     only_min_version_update: bool = False
+    opensearch_version: str = DEFAULT_OPENSEARCH_VERSION
     distribution_format: str = ALLOWED_INSTALLATION_DISTRIBUTION_FORMATS[0]
     parallel_test_types_list: list[str] = field(default_factory=list)
     parallelism: int = 0
@@ -707,6 +711,7 @@ services:
         _set_var(_env, "DOWNGRADE_SQLALCHEMY", self.downgrade_sqlalchemy)
         _set_var(_env, "DOWNGRADE_PENDULUM", self.downgrade_pendulum)
         _set_var(_env, "DRILL_HOST_PORT", None, DRILL_HOST_PORT)
+        _set_var(_env, "ELASTICSEARCH_VERSION", self.elasticsearch_version)
         _set_var(_env, "ENABLE_COVERAGE", self.enable_coverage)
         _set_var(_env, "FLOWER_HOST_PORT", None, FLOWER_HOST_PORT)
         _set_var(_env, "GREMLIN_HOST_PORT", None, GREMLIN_HOST_PORT)
@@ -734,6 +739,7 @@ services:
         _set_var(_env, "MOUNT_UI_DIST", self.mount_ui_dist)
         _set_var(_env, "NUM_RUNS", self.num_runs)
         _set_var(_env, "ONLY_MIN_VERSION_UPDATE", self.only_min_version_update)
+        _set_var(_env, "OPENSEARCH_VERSION", self.opensearch_version)
         _set_var(_env, "DISTRIBUTION_FORMAT", self.distribution_format)
         _set_var(_env, "POSTGRES_DATA_VOLUME_PATH", 
self.postgres_data_volume_path)
         _set_var(_env, "POSTGRES_DRIVER", self.postgres_driver)
diff --git a/dev/breeze/src/airflow_breeze/utils/selective_checks.py 
b/dev/breeze/src/airflow_breeze/utils/selective_checks.py
index f7a3754105d..d9442a9058d 100644
--- a/dev/breeze/src/airflow_breeze/utils/selective_checks.py
+++ b/dev/breeze/src/airflow_breeze/utils/selective_checks.py
@@ -59,6 +59,7 @@ from airflow_breeze.global_constants import (
     NUMBER_OF_LOW_DEP_SLICES,
     PROVIDER_TEST_SPLITS,
     PROVIDERS_COMPATIBILITY_TESTS_MATRIX,
+    PROVIDERS_INTEGRATION_SERVER_VERSIONS,
     PUBLIC_AMD_RUNNERS,
     PUBLIC_ARM_RUNNERS,
     RUNS_ON_AMD_IN_MEMORY_RUNNER_TEMPLATE,
@@ -2825,7 +2826,14 @@ class SelectiveChecks:
 
     @cached_property
     def testable_providers_integrations(self) -> list[str]:
-        if not self.run_unit_tests:
+        # A provider dependency bump runs no unit tests, but it can break the 
client/server
+        # compatibility that the provider's integration tests check.
+        provider_config_changed = bool(
+            self._matching_files(
+                FileGroupForCi.ALL_PROVIDERS_DISTRIBUTION_CONFIG_FILES, 
CI_FILE_GROUP_MATCHES
+            )
+        )
+        if not self.run_unit_tests and not provider_config_changed:
             return []
         if self.full_tests_needed or self._is_canary_run():
             # All tests are running - exercise every provider integration.
@@ -2847,6 +2855,31 @@ class SelectiveChecks:
                 selected = []
         return [integration for integration in selected if not 
self._is_disabled_integration(integration)]
 
+    @cached_property
+    def testable_providers_integrations_matrix(self) -> str:
+        """
+        GitHub matrix ``include`` entries for the provider integration test 
jobs.
+
+        An integration listed in ``PROVIDERS_INTEGRATION_SERVER_VERSIONS`` 
gets one entry per server
+        version, carrying that version as ``<integration>-version``. The 
``id`` is unique per entry so
+        each job gets distinct names and artifacts.
+        """
+        entries: list[dict[str, str]] = []
+        for integration in self.testable_providers_integrations:
+            versions = PROVIDERS_INTEGRATION_SERVER_VERSIONS.get(integration)
+            if not versions:
+                entries.append({"integration": integration, "id": integration})
+                continue
+            entries.extend(
+                {
+                    "integration": integration,
+                    "id": f"{integration}-{version}",
+                    f"{integration}-version": version,
+                }
+                for version in versions
+            )
+        return json.dumps(entries)
+
     @cached_property
     def is_committer_build(self):
         if NON_COMMITTER_BUILD_LABEL in self._pr_labels:
diff --git a/dev/breeze/tests/test_selective_checks.py 
b/dev/breeze/tests/test_selective_checks.py
index 0d949f39b05..7edb99383df 100644
--- a/dev/breeze/tests/test_selective_checks.py
+++ b/dev/breeze/tests/test_selective_checks.py
@@ -27,7 +27,9 @@ import requests
 from rich.console import Console
 
 from airflow_breeze.global_constants import (
+    ALLOWED_ELASTICSEARCH_VERSIONS,
     ALLOWED_KUBERNETES_VERSIONS,
+    ALLOWED_OPENSEARCH_VERSIONS,
     ALLOWED_PYTHON_MAJOR_MINOR_VERSIONS,
     CI_AMD_PLATFORM,
     CI_ARM_PLATFORM,
@@ -4512,6 +4514,76 @@ def 
test_testable_providers_integrations_gated_by_affected_provider():
     assert "ydb" not in result
 
 
+@patch(
+    
"airflow_breeze.utils.selective_checks.PROVIDERS_INTEGRATION_SERVER_VERSIONS",
+    {"elasticsearch": ["9.0.0", "8.0.0"]},
+)
[email protected](
+    SelectiveChecks,
+    "testable_providers_integrations",
+    new=property(lambda self: ["celery", "elasticsearch"]),
+)
+def 
test_testable_providers_integrations_matrix_has_one_entry_per_server_version():
+    selective_checks = SelectiveChecks(
+        files=(),
+        commit_ref=NEUTRAL_COMMIT,
+        github_event=GithubEvents.PULL_REQUEST,
+        platform=CI_AMD_PLATFORM,
+    )
+    assert json.loads(selective_checks.testable_providers_integrations_matrix) 
== [
+        {"integration": "celery", "id": "celery"},
+        {"integration": "elasticsearch", "id": "elasticsearch-9.0.0", 
"elasticsearch-version": "9.0.0"},
+        {"integration": "elasticsearch", "id": "elasticsearch-8.0.0", 
"elasticsearch-version": "8.0.0"},
+    ]
+
+
[email protected](
+    ("changed_files", "integration", "versions"),
+    [
+        pytest.param(
+            
("providers/elasticsearch/src/airflow/providers/elasticsearch/log/es_task_handler.py",),
+            "elasticsearch",
+            ALLOWED_ELASTICSEARCH_VERSIONS,
+            id="elasticsearch-source",
+        ),
+        pytest.param(
+            
("providers/elasticsearch/tests/integration/elasticsearch/log/test_es_remote_log_io.py",),
+            "elasticsearch",
+            ALLOWED_ELASTICSEARCH_VERSIONS,
+            id="elasticsearch-integration-test",
+        ),
+        pytest.param(
+            ("providers/elasticsearch/pyproject.toml", "uv.lock"),
+            "elasticsearch",
+            ALLOWED_ELASTICSEARCH_VERSIONS,
+            id="elasticsearch-dependency-bump",
+        ),
+        pytest.param(
+            
("providers/opensearch/src/airflow/providers/opensearch/log/os_task_handler.py",),
+            "opensearch",
+            ALLOWED_OPENSEARCH_VERSIONS,
+            id="opensearch-source",
+        ),
+        pytest.param(
+            ("providers/opensearch/pyproject.toml", "uv.lock"),
+            "opensearch",
+            ALLOWED_OPENSEARCH_VERSIONS,
+            id="opensearch-dependency-bump",
+        ),
+    ],
+)
+def 
test_provider_change_runs_its_integration_once_per_server_version(changed_files,
 integration, versions):
+    selective_checks = SelectiveChecks(
+        files=changed_files,
+        commit_ref=NEUTRAL_COMMIT,
+        github_event=GithubEvents.PULL_REQUEST,
+        platform=CI_AMD_PLATFORM,
+    )
+    assert [entry["id"] for entry in 
json.loads(selective_checks.testable_providers_integrations_matrix)] == [
+        f"{integration}-{version}" for version in versions
+    ]
+
+
 def test_opensearch_provider_integration_triggered_by_affected_provider():
     """Verify that changes to the OpenSearch provider trigger its integration 
test."""
     selective_checks = SelectiveChecks(
diff --git 
a/providers/elasticsearch/tests/integration/elasticsearch/log/test_es_remote_log_io.py
 
b/providers/elasticsearch/tests/integration/elasticsearch/log/test_es_remote_log_io.py
index 8ba26091deb..d38473f2fea 100644
--- 
a/providers/elasticsearch/tests/integration/elasticsearch/log/test_es_remote_log_io.py
+++ 
b/providers/elasticsearch/tests/integration/elasticsearch/log/test_es_remote_log_io.py
@@ -23,9 +23,12 @@ from unittest.mock import patch
 
 import elasticsearch
 import pytest
+import requests
 
 from airflow.providers.elasticsearch.log.es_task_handler import 
ElasticsearchRemoteLogIO, _render_log_id
 
+from tests_common.test_utils.config import conf_vars
+
 # The ES service hostname as defined in 
scripts/ci/docker-compose/integration-elasticsearch.yml
 ES_HOST = "http://elasticsearch:9200";
 
@@ -42,6 +45,15 @@ class _MockTI:
     id: uuid.UUID = dataclasses.field(default_factory=uuid.uuid4)
 
 
[email protected](scope="module")
+def es_compat_with() -> str | None:
+    """Pin the server major only when it differs from the client's, so a 
same-major run keeps the default path."""
+    response = requests.get(ES_HOST, timeout=30)
+    response.raise_for_status()
+    server_major = response.json()["version"]["number"].split(".")[0]
+    return None if server_major == str(elasticsearch.__version__[0]) else 
server_major
+
+
 @pytest.mark.integration("elasticsearch")
 class TestElasticsearchRemoteLogIOIntegration:
     """
@@ -52,20 +64,20 @@ class TestElasticsearchRemoteLogIOIntegration:
     """
 
     @pytest.fixture(autouse=True)
-    def setup(self, tmp_path):
+    def setup(self, tmp_path, es_compat_with):
         # Use a unique index per test to avoid cross-test data pollution
         self.target_index = f"airflow-logs-{uuid.uuid4()}"
-        self.elasticsearch_io = ElasticsearchRemoteLogIO(
-            write_to_es=True,
-            write_stdout=False,
-            delete_local_copy=False,
-            host=ES_HOST,
-            base_log_folder=tmp_path,
-        )
+        with conf_vars({("elasticsearch", "es_compat_with"): es_compat_with}):
+            self.elasticsearch_io = ElasticsearchRemoteLogIO(
+                write_to_es=True,
+                write_stdout=False,
+                delete_local_copy=False,
+                host=ES_HOST,
+                base_log_folder=tmp_path,
+            )
         self.elasticsearch_io.target_index = self.target_index
         # Point index_patterns at the unique index so reads don't scan 
unrelated indices
         self.elasticsearch_io.index_patterns = self.target_index
-        self.elasticsearch_io.client = elasticsearch.Elasticsearch(ES_HOST)
 
     @pytest.fixture
     def ti(self):
diff --git a/scripts/ci/docker-compose/integration-elasticsearch.yml 
b/scripts/ci/docker-compose/integration-elasticsearch.yml
index 14de97fc23a..ed5a319cf29 100644
--- a/scripts/ci/docker-compose/integration-elasticsearch.yml
+++ b/scripts/ci/docker-compose/integration-elasticsearch.yml
@@ -17,7 +17,7 @@
 ---
 services:
   elasticsearch:
-    image: docker.elastic.co/elasticsearch/elasticsearch:9.3.1
+    image: 
docker.elastic.co/elasticsearch/elasticsearch:${ELASTICSEARCH_VERSION}
     labels:
       org.apache.airflow.breeze: "true"
       org.apache.airflow.breeze.worktree: "${BREEZE_WORKTREE_PATH:-}"
@@ -53,3 +53,4 @@ volumes:
       org.apache.airflow.breeze: "true"
       org.apache.airflow.breeze.worktree: "${BREEZE_WORKTREE_PATH:-}"
       org.apache.airflow.breeze.host: "${BREEZE_HOST_ID:-}"
+    name: 
"${COMPOSE_PROJECT_NAME}-elasticsearch${ELASTICSEARCH_VERSION}-db-volume"
diff --git a/scripts/ci/docker-compose/integration-opensearch.yml 
b/scripts/ci/docker-compose/integration-opensearch.yml
index 5f5c1670bec..16f924592c2 100644
--- a/scripts/ci/docker-compose/integration-opensearch.yml
+++ b/scripts/ci/docker-compose/integration-opensearch.yml
@@ -17,7 +17,7 @@
 ---
 services:
   opensearch:
-    image: opensearchproject/opensearch:2.19.0
+    image: opensearchproject/opensearch:${OPENSEARCH_VERSION}
     labels:
       org.apache.airflow.breeze: "true"
       org.apache.airflow.breeze.worktree: "${BREEZE_WORKTREE_PATH:-}"
@@ -54,3 +54,4 @@ volumes:
       org.apache.airflow.breeze: "true"
       org.apache.airflow.breeze.worktree: "${BREEZE_WORKTREE_PATH:-}"
       org.apache.airflow.breeze.host: "${BREEZE_HOST_ID:-}"
+    name: "${COMPOSE_PROJECT_NAME}-opensearch${OPENSEARCH_VERSION}-db-volume"

Reply via email to