ephraimbuddy commented on code in PR #55126:
URL: https://github.com/apache/airflow/pull/55126#discussion_r2313147773
##########
airflow-core/src/airflow/jobs/scheduler_job_runner.py:
##########
@@ -1837,6 +1837,12 @@ def _schedule_dag_run(
self.log.error("Couldn't find DAG %s in DAG bag or database!",
dag_run.dag_id)
return callback
+ # Handle stale DAGs (removed from filesystem but still have task
instances in DB)
+ if dag_model.is_stale and not dag:
+ self.log.error("DAG %s is stale (removed from filesystem),
skipping scheduling for DAG run %s",
+ dag_run.dag_id, dag_run.run_id)
+ return callback
Review Comment:
Can you share the error you got that resulted in this fix?
--
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]