ashb commented on code in PR #74499:
URL: https://github.com/apache/airflow/pull/74499#discussion_r4230529957


##########
airflow-core/src/airflow/jobs/scheduler_job_runner.py:
##########
@@ -3052,7 +3052,13 @@ def _update_state(dag: SerializedDAG, dag_run: DagRun):
             dag_id = dag_run.dag_id
             run_id = dag_run.run_id
             backfill_id = dag_run.backfill_id
-            dag = dag_run.dag = cached_get_dag(dag_run)
+            try:
+                dag = dag_run.dag = cached_get_dag(dag_run)
+            except DBAPIError:
+                raise
+            except Exception:
+                self.log.exception("Failed to load Dag %s for queued run %s, 
skipping it", dag_id, run_id)

Review Comment:
   That might be better overall, but this targeted fix is better than crashing



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