Skip to content

Fix unnecessary DAG file stats warning - #71098

Closed
09Catho wants to merge 1 commit into
apache:mainfrom
09Catho:fix/dag-file-stats-warning
Closed

Fix unnecessary DAG file stats warning#71098
09Catho wants to merge 1 commit into
apache:mainfrom
09Catho:fix/dag-file-stats-warning

Conversation

@09Catho

@09Catho 09Catho commented Aug 4, 2026

Copy link
Copy Markdown

Fixes the repeated warning emitted when expected DAG relative paths are normalized for metrics tags.

The path is intentionally normalized, so DagFileInfo.normalized_file_path_for_stats now disables the invalid-character warning while preserving the normalized tag. A regression test covers both the normalized value and absence of a warning.

closes: #71084

Testing:

  • standalone regression for normalization and suppressed warning
  • python -m compileall -q airflow-core/src/airflow/dag_processing/manager.py airflow-core/tests/unit/dag_processing/test_manager.py
  • git diff --check

The repository's uv run pytest ... and Ruff commands could not reach collection on Windows because pykerberos==1.2.4 requires the unavailable gssapi/gssapi.h header.

Was generative AI tooling used to co-author this PR?
  • Yes (OpenAI Codex)

Generated-by: OpenAI Codex following the guidelines

Signed-off-by: 09Catho <ashketchume45@gmail.com>
Copilot AI lite review requested due to automatic review settings August 4, 2026 13:01

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR stops an expected, repeatedly-emitted stats-name warning when Dag file relative paths are normalized for metrics tags in the Dag processor. It keeps the normalized tag value while suppressing the invalid-character warning for this specific, intentionally-normalized path.

Changes:

  • Disable warning emission when normalizing DagFileInfo.rel_path for stats tags by passing log_warning=False.
  • Add a regression test asserting the normalized stats tag value and that no warning is emitted.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
airflow-core/src/airflow/dag_processing/manager.py Suppresses normalization warning for Dag file path stats tag (log_warning=False) while preserving normalized output.
airflow-core/tests/unit/dag_processing/test_manager.py Adds a regression test ensuring normalization happens and no warning is logged.

@ephraimbuddy

Copy link
Copy Markdown
Contributor

closed in #71091 which came first. Thanks for the work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dag processor keep printing unnecessary warning log

3 participants