Dev-iL commented on code in PR #59785:
URL: https://github.com/apache/airflow/pull/59785#discussion_r2649010984
##########
airflow-core/src/airflow/dag_processing/dagbag.py:
##########
@@ -647,9 +647,16 @@ def collect_dags(
found_dags = self.process_file(filepath,
only_if_updated=only_if_updated, safe_mode=safe_mode)
file_parse_end_dttm = timezone.utcnow()
+ # Normalize paths to use forward slashes for consistent
cross-platform behavior.
+ # On Windows, settings.DAGS_FOLDER and filepath may have mixed
separators
+ # (e.g., DAGS_FOLDER='C:/foo/dags' vs
filepath='C:\foo\dags\my_dag.py'),
+ # causing the replace to fail.
+ normalized_filepath = Path(filepath).as_posix()
+ normalized_dags_folder = Path(settings.DAGS_FOLDER).as_posix()
Review Comment:
newsfragment added
--
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]