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 09d0ea1c97a Ignore the runner's OTEL_* variables in the observability 
shared tests (#75828)
09d0ea1c97a is described below

commit 09d0ea1c97acb7b31cd108d9de944ed1c71a884a
Author: Jarek Potiuk <[email protected]>
AuthorDate: Wed Oct 28 04:13:12 2026 +0100

    Ignore the runner's OTEL_* variables in the observability shared tests 
(#75828)
    
    Shared distribution tests run on the CI runner itself rather than in
    Breeze, and RunsOn runners export OTEL_* variables for their own
    OpenTelemetry collector. Those take precedence over the Airflow
    configuration, so the tests expecting the endpoint from the configuration
    failed on such runners.
    
    Generated-by: Claude Opus 5
---
 shared/observability/tests/conftest.py | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/shared/observability/tests/conftest.py 
b/shared/observability/tests/conftest.py
index 93aecf26184..3815664d04a 100644
--- a/shared/observability/tests/conftest.py
+++ b/shared/observability/tests/conftest.py
@@ -18,4 +18,15 @@ from __future__ import annotations
 
 import os
 
+import pytest
+
 os.environ["_AIRFLOW__AS_LIBRARY"] = "true"
+
+
[email protected](autouse=True)
+def clear_otel_env_vars(monkeypatch):
+    # These tests run on the CI runner itself, and a runner may export OTEL_* 
variables for its own
+    # OpenTelemetry collector (RunsOn does), which take precedence over the 
Airflow configuration.
+    for name in list(os.environ):
+        if name.startswith("OTEL_"):
+            monkeypatch.delenv(name)

Reply via email to