From d943e644b0a336483dea90021e068c68be118475 Mon Sep 17 00:00:00 2001 From: Jarek Potiuk Date: Sun, 26 Apr 2026 13:53:56 +0200 Subject: [PATCH] [v3-2-test] 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. (cherry picked from commit c29cc61998e6507c105cb580f9aee903ff256809) Co-authored-by: Jarek Potiuk --- 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 6852b47af0402..1b23fe0f7549a 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 f0d32104a14ab..3c1b83f448063 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: