Pebble32 commented on code in PR #74499:
URL: https://github.com/apache/airflow/pull/74499#discussion_r4230263140
##########
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:
Yes, it stays queued and is retried each pass until the Dag loads, the same
as the "not found in serialized_dag table" case below it. I kept it retrying so
a transient failure such as a briefly missing Variable doesn't lose the run,
but happy to fail it after a few attempts instead if you prefer.
--
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]