SamWheating commented on code in PR #54752:
URL: https://github.com/apache/airflow/pull/54752#discussion_r2291733793
##########
airflow-core/src/airflow/models/dagbag.py:
##########
@@ -659,6 +659,7 @@ def sync_bag_to_db(
bundle_version,
dags,
import_errors,
+ None, # file parsing duration is not well defined when parsing
multiple files / multiple DAGs.
Review Comment:
This is kinda tricky - in every other context when
`update_dag_parsing_results_in_db` is called, it is for syncing the results of
parsing a single file. But in this context, we're syncing the results of the
whole DAGBag, which is potentially multiple files each potentially containing
multiple DAGs.
So our options are:
1) try to parse the parsing durations + dag IDs out of
`dagbag.dagbag_stats`, and then pass a big dict of `dag_id: parse_duration`
through to the `update_dags` method.
2) just ignore this case, since its only called in testing and CLI code
paths
Thoughts?
--
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]