vatsrahul1001 opened a new pull request, #75843: URL: https://github.com/apache/airflow/pull/75843
Manual backport of #75842 to `v3-4-test`. Opened directly (rather than waiting on the auto-backport bot) to unblock the `v3-4-test` CI gate for the RC1 cut — this shared-distributions/observability failure is currently red on every open PR into the branch. The `backport-to-v3-4-test` label has been removed from #75842 to avoid a duplicate auto-backport. ## Problem `TestOtelMetrics::test_config_priorities` fails on `v3-4-test` (and `main`) for the six cases that expect the Airflow config host/port to be used when no OTEL endpoint env var is provided: ``` AssertionError: assert '...127.0.0.1:4318...' == '...breeze-otel-collector:4318...' ``` The test overlaid only each case's `provided_env_vars` without clearing other ambient `OTEL_*` vars. The RunsOn CI runners export `OTEL_EXPORTER_OTLP_ENDPOINT` (→ `127.0.0.1:4318`), which correctly wins over the Airflow config, so the resolved endpoint is wrong. The test is non-hermetic; the production code is correct. This is why it fails on `main` and the release branches simultaneously — the runner env is shared. ## Fix Clear all `OTEL_*` env vars before applying the case's `provided_env_vars`, so the test only sees its own inputs regardless of the runner environment. ## Testing Reproduced the six failures locally by exporting `OTEL_EXPORTER_OTLP_ENDPOINT`, then confirmed all cases pass with the fix even with the ambient var set (`10 passed`). --- ##### Was generative AI tooling used to co-author this PR? - [X] Yes — Claude Code (Opus 4.8) Generated-by: Claude Code (Opus 4.8) following [the guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions) -- 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]
