Stop dag processor from warning on every file path normalized for stats - #71091
Merged
Conversation
bujjibabukatta
requested review from
ephraimbuddy and
jedcunningham
as code owners
August 4, 2026 12:28
ephraimbuddy
approved these changes
Aug 18, 2026
Co-authored-by: Ephraim Anierobi <splendidzigy24@gmail.com>
eladkal
approved these changes
Aug 18, 2026
1 task
Contributor
Backport successfully created: v3-3-testNote: As of Merging PRs targeted for Airflow 3.X In matter of doubt please ask in #release-management Slack channel.
|
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 ?
Generated-by: Claude following the guidelines