uranusjr commented on a change in pull request #18575: URL: https://github.com/apache/airflow/pull/18575#discussion_r783661606
########## File path: airflow/models/dagbag.py ########## @@ -584,22 +584,35 @@ def _serialize_dag_capturing_errors(dag, session): We can't place them directly in import_errors, as this may be retried, and work the next time """ - if dag.is_subdag: - return [] try: # We can't use bulk_write_to_db as we want to capture each error individually dag_was_updated = SerializedDagModel.write_dag( dag, min_update_interval=settings.MIN_SERIALIZED_DAG_UPDATE_INTERVAL, session=session, ) - if dag_was_updated: - self._sync_perm_for_dag(dag, session=session) + return dag_was_updated, [] Review comment: Probably more readable to put this in an `else` block after all the exception handlers? -- 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: commits-unsubscr...@airflow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org