bujjibabukatta opened a new pull request, #71091:
URL: https://github.com/apache/airflow/pull/71091

   **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 ?
   
   - [X] Yes - Claude
   
   Generated-by: Claude 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]

Reply via email to