dilnazanlid commented on code in PR #72442:
URL: https://github.com/apache/airflow/pull/72442#discussion_r3935962265
##########
airflow-core/src/airflow/dag_processing/manager.py:
##########
@@ -958,12 +958,10 @@ def _refresh_dag_bundles(self, known_files: dict[str,
set[DagFileInfo]]):
def _find_files_in_bundle(self, bundle: BaseDagBundle) -> list[Path]:
"""Get relative paths for dag files from bundle dir."""
- # Build up a list of Python files that could contain DAGs
self.log.info("Searching for files in %s at %s", bundle.name,
bundle.path)
- rel_paths = [
- Path(x).relative_to(bundle.path)
- for x in list_py_file_paths(bundle.path,
safe_mode=self.dag_discovery_safe_mode)
- ]
+ importer_registry = bundle.importer_registry
+ dag_files = importer_registry.list_dag_files(bundle.path,
safe_mode=self.dag_discovery_safe_mode)
Review Comment:
Added the changes specified above, seems like it solves the problem and
tried to make them follow the best practice, PTAL
--
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]