Lee-W commented on code in PR #50371:
URL: https://github.com/apache/airflow/pull/50371#discussion_r2081758552
##########
airflow-core/src/airflow/dag_processing/processor.py:
##########
@@ -94,6 +94,18 @@ def _parse_file_entrypoint():
def _parse_file(msg: DagFileParseRequest, log: FilteringBoundLogger) ->
DagFileParsingResult | None:
# TODO: Set known_pool names on DagBag!
+ # Pre-import modules
+ if conf.getboolean("scheduler", "parsing_pre_import_modules",
fallback=True):
+ import importlib
+
+ from airflow.utils.file import iter_airflow_imports
+
+ for module in iter_airflow_imports(msg.file):
Review Comment:
Not really familiar with this area. but the indentation here looks weird 🤔
should we one more indentaion?
--
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]