Skip to content

Stop dag processor from warning on every file path normalized for stats - #71091

Merged
ephraimbuddy merged 2 commits into
apache:mainfrom
bujjibabukatta:fix/#71084
Aug 18, 2026
Merged

Stop dag processor from warning on every file path normalized for stats#71091
ephraimbuddy merged 2 commits into
apache:mainfrom
bujjibabukatta:fix/#71084

Conversation

@bujjibabukatta

Copy link
Copy Markdown
Contributor

Summary
Right after the dag-processor starts, it repeatedly logs a warning like:
"Name 'dags/test/test_dag.py' contains invalid characters for stats
reporting. Reporting stats with normalized name 'dags_test_test_dag.py'."
This fires once per DAG file, on every processing cycle.

Root cause
DagFileInfo.normalized_file_path_for_stats calls normalize_name_for_stats()
without log_warning=False. A relative file path always contains "/" as a
directory separator, so normalization always requires substitution -- the
warning can never signal an actual problem, only expected, routine behavior.

Fix
Pass log_warning=False for this specific call. The other normalize_name_for_stats
call sites in the same file (bundle_name, file name stem) are left unchanged,
since those genuinely rarely contain invalid characters, so a warning there
still carries real diagnostic value.

Testing
Added a regression test asserting normalized_file_path_for_stats does not
emit a warning for a normal nested file path.

closes: #71084

Was generative AI tooling used ?

  • Yes - Claude

Generated-by: Claude following the guidelines

@potiuk potiuk added the ready for maintainer review Set after triaging when all criteria pass. label Aug 13, 2026
@ashb ashb added the backport-to-v3-3-test Backport to v3-3-test label Aug 18, 2026
@ashb ashb added this to the Airflow 3.3.2 milestone Aug 18, 2026
Comment thread airflow-core/tests/unit/dag_processing/test_manager.py Outdated
Co-authored-by: Ephraim Anierobi <splendidzigy24@gmail.com>
@ephraimbuddy
ephraimbuddy merged commit 8445422 into apache:main Aug 18, 2026
78 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

Backport successfully created: v3-3-test

Note: As of Merging PRs targeted for Airflow 3.X
the committer who merges the PR is responsible for backporting the PRs that are bug fixes (generally speaking) to the maintenance branches.

In matter of doubt please ask in #release-management Slack channel.

Status Branch Result
v3-3-test PR Link

github-actions Bot pushed a commit to aws-mwaa/upstream-to-airflow that referenced this pull request Aug 18, 2026
…ized for stats (apache#71091)

* Stop dag processor from warning on every file path normalized for stats

* Apply suggestions from code review

Co-authored-by: Ephraim Anierobi <splendidzigy24@gmail.com>

---------
(cherry picked from commit 8445422)

Co-authored-by: bujjibabukatta <bujjibabukatta6@gmail.com>
Co-authored-by: Ephraim Anierobi <splendidzigy24@gmail.com>
aws-airflow-bot pushed a commit to aws-mwaa/upstream-to-airflow that referenced this pull request Aug 18, 2026
…ized for stats (apache#71091)

* Stop dag processor from warning on every file path normalized for stats

* Apply suggestions from code review

Co-authored-by: Ephraim Anierobi <splendidzigy24@gmail.com>

---------
(cherry picked from commit 8445422)

Co-authored-by: bujjibabukatta <bujjibabukatta6@gmail.com>
Co-authored-by: Ephraim Anierobi <splendidzigy24@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:DAG-processing backport-to-v3-3-test Backport to v3-3-test ready for maintainer review Set after triaging when all criteria pass.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dag processor keep printing unnecessary warning log

5 participants