potiuk commented on a change in pull request #7187: [AIRFLOW-6576] fix
scheduler crash caused by deleted task with sla misses
URL: https://github.com/apache/airflow/pull/7187#discussion_r367362316
##########
File path: airflow/jobs/scheduler_job.py
##########
@@ -429,7 +429,15 @@ def manage_slas(self, dag, session=None):
""".format(task_list=task_list,
blocking_task_list=blocking_task_list,
bug=asciiart.bug)
- tasks_missed_sla = [dag.get_task(sla.task_id) for sla in slas]
+ tasks_missed_sla = []
+ for sla in slas:
+ try:
+ task = dag.get_task(sla.task_id)
+ except AirflowException:
+ # task already deleted from DAG, skip it
Review comment:
We need to write a warning here. It's really dangerous to swallow exceptions
silently and it makes it easier to debug any kind of problems you might see in
production.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services