vatsrahul1001 commented on code in PR #75842:
URL: https://github.com/apache/airflow/pull/75842#discussion_r4397771606


##########
shared/observability/tests/observability/metrics/test_otel_logger.py:
##########
@@ -499,7 +499,15 @@ def test_config_priorities(
         airflow_conf_port,
         expected_endpoint,
         expected_exporter_module,
+        monkeypatch,
     ):
+        # Clear any ambient OTEL_* vars so the case only sees its own 
provided_env_vars.
+        # CI runners (e.g. RunsOn) export OTEL_EXPORTER_OTLP_ENDPOINT, which 
otherwise wins
+        # over the Airflow config host/port and makes the config-priority 
cases fail.
+        for name in list(os.environ):

Review Comment:
   Good call — done. Moved it to a class-scoped `autouse` fixture 
(`_clear_otel_env`) so every test in `TestOtelMetrics` is isolated from ambient 
`OTEL_*` vars, not just `test_config_priorities`. Pushed as a follow-up commit.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to