You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2020/01/16 11:16:24 UTC

[GitHub] [airflow] potiuk commented on a change in pull request #7187: [AIRFLOW-6576] fix scheduler crash caused by deleted task with sla misses

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:
users@infra.apache.org


With regards,
Apache Git Services