notatallshaw-gts commented on code in PR #30495:
URL: https://github.com/apache/airflow/pull/30495#discussion_r1159820008


##########
airflow/dag_processing/processor.py:
##########
@@ -187,6 +188,12 @@ def _handle_dag_file_processing():
 
     def start(self) -> None:
         """Launch the process and start processing the DAG."""
+        import importlib
+
+        modules = get_airflow_modules_in(self.file_path)
+        for module in modules:
+            importlib.import_module(module)

Review Comment:
   If there's a parsing error this will throw `ModuleNotFoundError`, best to 
catch it? Also if it's not catched and the DAG just has an incorrect import 
won't this now show a confusing error message?



-- 
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