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

potiuk 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 c29cc61998e Move jaeger CI host ports below ephemeral range to fix 
flake (#65867)
c29cc61998e is described below

commit c29cc61998e6507c105cb580f9aee903ff256809
Author: Jarek Potiuk <[email protected]>
AuthorDate: Sun Apr 26 13:53:56 2026 +0200

    Move jaeger CI host ports below ephemeral range to fix flake (#65867)
    
    The jaeger container in the otel integration compose file mapped four
    host ports (34317, 34318, 36686, 39422) inside the Linux default
    ephemeral port range (32768-60999). The kernel can transiently grab a
    port in that range as the source port of an outbound connection from
    any other process on the CI runner, which then races with the docker
    bind and surfaces as:
    
      failed to bind host port for 0.0.0.0:34318:172.18.0.3:4318/tcp:
      address already in use
    
    The retry mechanism (which restarts docker between attempts) does not
    help, because the holder is a non-docker process.
    
    Move the four jaeger host ports below 32768, matching the convention
    the other integration services in the same file already follow, and
    update the docstring in test_otel.py that pointed at the old jaeger UI
    port.
---
 airflow-core/tests/integration/otel/test_otel.py |  2 +-
 scripts/ci/docker-compose/integration-otel.yml   | 12 ++++++++----
 2 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/airflow-core/tests/integration/otel/test_otel.py 
b/airflow-core/tests/integration/otel/test_otel.py
index 6852b47af04..1b23fe0f754 100644
--- a/airflow-core/tests/integration/otel/test_otel.py
+++ b/airflow-core/tests/integration/otel/test_otel.py
@@ -173,7 +173,7 @@ class TestOtelIntegration:
     - start breeze with '--integration otel'
     - run on the shell 'export use_otel=true'
     - run the test
-    - check 'http://localhost:36686/'
+    - check 'http://localhost:26686/'
 
     To get a db dump on the stdout, run 'export log_level=debug'.
     """
diff --git a/scripts/ci/docker-compose/integration-otel.yml 
b/scripts/ci/docker-compose/integration-otel.yml
index f0d32104a14..3c1b83f4480 100644
--- a/scripts/ci/docker-compose/integration-otel.yml
+++ b/scripts/ci/docker-compose/integration-otel.yml
@@ -59,11 +59,15 @@ services:
     environment:
       COLLECTOR_OTLP_ENABLED: true
       COLLLECTOR_ZIPKIN_HOST_PORT: 9411
+    # Host ports are intentionally below 32768 to stay outside Linux's default
+    # ephemeral port range (32768-60999). Picking high ports inside that range
+    # causes intermittent CI failures when the kernel transiently grabs the
+    # same port for an outbound connection from another process on the runner.
     ports:
-      - "36686:16686"
-      - "34317:4317"
-      - "34318:4318"
-      - "39422:9422"
+      - "26686:16686"
+      - "24317:4317"
+      - "27318:4318"
+      - "29422:9422"
 
   airflow:
     environment:

Reply via email to