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 00:31:02 UTC

[GitHub] [airflow] houqp opened a new pull request #7187: [AIRFLOW-6576] fix scheduler crash caused by deleted task with sla misses

houqp opened a new pull request #7187: [AIRFLOW-6576] fix scheduler crash caused by deleted task with sla misses
URL: https://github.com/apache/airflow/pull/7187
 
 
   ---
   Issue link: WILL BE INSERTED BY [boring-cyborg](https://github.com/kaxil/boring-cyborg)
   
   Make sure to mark the boxes below before creating PR: [x]
   
   - [x] Description above provides context of the change
   - [x] Commit message/PR title starts with `[AIRFLOW-NNNN]`. AIRFLOW-NNNN = JIRA ID<sup>*</sup>
   - [x] Unit tests coverage for changes (not needed for documentation changes)
   - [x] Commits follow "[How to write a good git commit message](http://chris.beams.io/posts/git-commit/)"
   - [x] Relevant documentation is updated including usage instructions.
   - [x] I will engage committers as explained in [Contribution Workflow Example](https://github.com/apache/airflow/blob/master/CONTRIBUTING.rst#contribution-workflow-example).
   
   <sup>*</sup> For document-only changes commit message can start with `[AIRFLOW-XXXX]`.
   
   ---
   In case of fundamental code change, Airflow Improvement Proposal ([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvements+Proposals)) is needed.
   In case of a new dependency, check compliance with the [ASF 3rd Party License Policy](https://www.apache.org/legal/resolved.html#category-x).
   In case of backwards incompatible changes please leave a note in [UPDATING.md](https://github.com/apache/airflow/blob/master/UPDATING.md).
   Read the [Pull Request Guidelines](https://github.com/apache/airflow/blob/master/CONTRIBUTING.rst#pull-request-guidelines) for more information.
   

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

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

Posted by GitBox <gi...@apache.org>.
jstern 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_r368011208
 
 

 ##########
 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:
   I was going to suggest maybe catching a more specific exception subclass (like `AirflowNotFoundException`, `TaskNotFound`, or `TaskInstanceNotFound` as appropriate), but it looks like we really do just throw `AirflowException` in the method: https://github.com/apache/airflow/blob/master/airflow/models/dag.py#L1214. Changing the exception that `get_task` method raises might be out of scope for this PR and have other unanticipated consequences, but it's something to think about...

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

[GitHub] [airflow] codecov-io commented on issue #7187: [AIRFLOW-6576] fix scheduler crash caused by deleted task with sla misses

Posted by GitBox <gi...@apache.org>.
codecov-io commented on issue #7187: [AIRFLOW-6576] fix scheduler crash caused by deleted task with sla misses
URL: https://github.com/apache/airflow/pull/7187#issuecomment-574935439
 
 
   # [Codecov](https://codecov.io/gh/apache/airflow/pull/7187?src=pr&el=h1) Report
   > Merging [#7187](https://codecov.io/gh/apache/airflow/pull/7187?src=pr&el=desc) into [master](https://codecov.io/gh/apache/airflow/commit/59c8a826b8d5d365db68e800cea3de59256530c9?src=pr&el=desc) will **decrease** coverage by `52.16%`.
   > The diff coverage is `0%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/airflow/pull/7187/graphs/tree.svg?width=650&token=WdLKlKHOAU&height=150&src=pr)](https://codecov.io/gh/apache/airflow/pull/7187?src=pr&el=tree)
   
   ```diff
   @@             Coverage Diff             @@
   ##           master    #7187       +/-   ##
   ===========================================
   - Coverage   84.91%   32.75%   -52.17%     
   ===========================================
     Files         723      722        -1     
     Lines       39546    39539        -7     
   ===========================================
   - Hits        33581    12951    -20630     
   - Misses       5965    26588    +20623
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/airflow/pull/7187?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [airflow/jobs/scheduler\_job.py](https://codecov.io/gh/apache/airflow/pull/7187/diff?src=pr&el=tree#diff-YWlyZmxvdy9qb2JzL3NjaGVkdWxlcl9qb2IucHk=) | `12.44% <0%> (-76.32%)` | :arrow_down: |
   | [...low/contrib/operators/wasb\_delete\_blob\_operator.py](https://codecov.io/gh/apache/airflow/pull/7187/diff?src=pr&el=tree#diff-YWlyZmxvdy9jb250cmliL29wZXJhdG9ycy93YXNiX2RlbGV0ZV9ibG9iX29wZXJhdG9yLnB5) | `0% <0%> (-100%)` | :arrow_down: |
   | [...flow/contrib/example\_dags/example\_qubole\_sensor.py](https://codecov.io/gh/apache/airflow/pull/7187/diff?src=pr&el=tree#diff-YWlyZmxvdy9jb250cmliL2V4YW1wbGVfZGFncy9leGFtcGxlX3F1Ym9sZV9zZW5zb3IucHk=) | `0% <0%> (-100%)` | :arrow_down: |
   | [...ample\_dags/example\_emr\_job\_flow\_automatic\_steps.py](https://codecov.io/gh/apache/airflow/pull/7187/diff?src=pr&el=tree#diff-YWlyZmxvdy9jb250cmliL2V4YW1wbGVfZGFncy9leGFtcGxlX2Vtcl9qb2JfZmxvd19hdXRvbWF0aWNfc3RlcHMucHk=) | `0% <0%> (-100%)` | :arrow_down: |
   | [...contrib/example\_dags/example\_papermill\_operator.py](https://codecov.io/gh/apache/airflow/pull/7187/diff?src=pr&el=tree#diff-YWlyZmxvdy9jb250cmliL2V4YW1wbGVfZGFncy9leGFtcGxlX3BhcGVybWlsbF9vcGVyYXRvci5weQ==) | `0% <0%> (-100%)` | :arrow_down: |
   | [airflow/hooks/webhdfs\_hook.py](https://codecov.io/gh/apache/airflow/pull/7187/diff?src=pr&el=tree#diff-YWlyZmxvdy9ob29rcy93ZWJoZGZzX2hvb2sucHk=) | `0% <0%> (-100%)` | :arrow_down: |
   | [airflow/contrib/operators/gcs\_list\_operator.py](https://codecov.io/gh/apache/airflow/pull/7187/diff?src=pr&el=tree#diff-YWlyZmxvdy9jb250cmliL29wZXJhdG9ycy9nY3NfbGlzdF9vcGVyYXRvci5weQ==) | `0% <0%> (-100%)` | :arrow_down: |
   | [airflow/operators/pig\_operator.py](https://codecov.io/gh/apache/airflow/pull/7187/diff?src=pr&el=tree#diff-YWlyZmxvdy9vcGVyYXRvcnMvcGlnX29wZXJhdG9yLnB5) | `0% <0%> (-100%)` | :arrow_down: |
   | [airflow/contrib/operators/file\_to\_gcs.py](https://codecov.io/gh/apache/airflow/pull/7187/diff?src=pr&el=tree#diff-YWlyZmxvdy9jb250cmliL29wZXJhdG9ycy9maWxlX3RvX2djcy5weQ==) | `0% <0%> (-100%)` | :arrow_down: |
   | [airflow/contrib/hooks/gcp\_spanner\_hook.py](https://codecov.io/gh/apache/airflow/pull/7187/diff?src=pr&el=tree#diff-YWlyZmxvdy9jb250cmliL2hvb2tzL2djcF9zcGFubmVyX2hvb2sucHk=) | `0% <0%> (-100%)` | :arrow_down: |
   | ... and [583 more](https://codecov.io/gh/apache/airflow/pull/7187/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/airflow/pull/7187?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/airflow/pull/7187?src=pr&el=footer). Last update [59c8a82...a1edb71](https://codecov.io/gh/apache/airflow/pull/7187?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   

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

[GitHub] [airflow] codecov-io edited a comment on issue #7187: [AIRFLOW-6576] fix scheduler crash caused by deleted task with sla misses

Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on issue #7187: [AIRFLOW-6576] fix scheduler crash caused by deleted task with sla misses
URL: https://github.com/apache/airflow/pull/7187#issuecomment-574935439
 
 
   # [Codecov](https://codecov.io/gh/apache/airflow/pull/7187?src=pr&el=h1) Report
   > Merging [#7187](https://codecov.io/gh/apache/airflow/pull/7187?src=pr&el=desc) into [master](https://codecov.io/gh/apache/airflow/commit/59c8a826b8d5d365db68e800cea3de59256530c9?src=pr&el=desc) will **increase** coverage by `0.18%`.
   > The diff coverage is `100%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/airflow/pull/7187/graphs/tree.svg?width=650&token=WdLKlKHOAU&height=150&src=pr)](https://codecov.io/gh/apache/airflow/pull/7187?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master    #7187      +/-   ##
   ==========================================
   + Coverage   84.91%   85.09%   +0.18%     
   ==========================================
     Files         723      723              
     Lines       39546    39555       +9     
   ==========================================
   + Hits        33581    33660      +79     
   + Misses       5965     5895      -70
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/airflow/pull/7187?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [airflow/jobs/scheduler\_job.py](https://codecov.io/gh/apache/airflow/pull/7187/diff?src=pr&el=tree#diff-YWlyZmxvdy9qb2JzL3NjaGVkdWxlcl9qb2IucHk=) | `89.45% <100%> (+0.69%)` | :arrow_up: |
   | [airflow/kubernetes/volume\_mount.py](https://codecov.io/gh/apache/airflow/pull/7187/diff?src=pr&el=tree#diff-YWlyZmxvdy9rdWJlcm5ldGVzL3ZvbHVtZV9tb3VudC5weQ==) | `44.44% <0%> (-55.56%)` | :arrow_down: |
   | [airflow/kubernetes/volume.py](https://codecov.io/gh/apache/airflow/pull/7187/diff?src=pr&el=tree#diff-YWlyZmxvdy9rdWJlcm5ldGVzL3ZvbHVtZS5weQ==) | `52.94% <0%> (-47.06%)` | :arrow_down: |
   | [airflow/kubernetes/pod\_launcher.py](https://codecov.io/gh/apache/airflow/pull/7187/diff?src=pr&el=tree#diff-YWlyZmxvdy9rdWJlcm5ldGVzL3BvZF9sYXVuY2hlci5weQ==) | `45.25% <0%> (-46.72%)` | :arrow_down: |
   | [airflow/kubernetes/refresh\_config.py](https://codecov.io/gh/apache/airflow/pull/7187/diff?src=pr&el=tree#diff-YWlyZmxvdy9rdWJlcm5ldGVzL3JlZnJlc2hfY29uZmlnLnB5) | `50.98% <0%> (-23.53%)` | :arrow_down: |
   | [...rflow/contrib/operators/kubernetes\_pod\_operator.py](https://codecov.io/gh/apache/airflow/pull/7187/diff?src=pr&el=tree#diff-YWlyZmxvdy9jb250cmliL29wZXJhdG9ycy9rdWJlcm5ldGVzX3BvZF9vcGVyYXRvci5weQ==) | `76.47% <0%> (-22.33%)` | :arrow_down: |
   | [airflow/models/connection.py](https://codecov.io/gh/apache/airflow/pull/7187/diff?src=pr&el=tree#diff-YWlyZmxvdy9tb2RlbHMvY29ubmVjdGlvbi5weQ==) | `68.78% <0%> (+0.97%)` | :arrow_up: |
   | [airflow/jobs/backfill\_job.py](https://codecov.io/gh/apache/airflow/pull/7187/diff?src=pr&el=tree#diff-YWlyZmxvdy9qb2JzL2JhY2tmaWxsX2pvYi5weQ==) | `91.88% <0%> (+1.44%)` | :arrow_up: |
   | [airflow/providers/apache/hive/hooks/hive.py](https://codecov.io/gh/apache/airflow/pull/7187/diff?src=pr&el=tree#diff-YWlyZmxvdy9wcm92aWRlcnMvYXBhY2hlL2hpdmUvaG9va3MvaGl2ZS5weQ==) | `77.55% <0%> (+1.53%)` | :arrow_up: |
   | ... and [9 more](https://codecov.io/gh/apache/airflow/pull/7187/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/airflow/pull/7187?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/airflow/pull/7187?src=pr&el=footer). Last update [59c8a82...23dc8c1](https://codecov.io/gh/apache/airflow/pull/7187?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   

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

[GitHub] [airflow] houqp commented on issue #7187: [AIRFLOW-6576] fix scheduler crash caused by deleted task with sla misses

Posted by GitBox <gi...@apache.org>.
houqp commented on issue #7187: [AIRFLOW-6576] fix scheduler crash caused by deleted task with sla misses
URL: https://github.com/apache/airflow/pull/7187#issuecomment-575264382
 
 
   @potiuk added logging, ready for review again.

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

[GitHub] [airflow] codecov-io edited a comment on issue #7187: [AIRFLOW-6576] fix scheduler crash caused by deleted task with sla misses

Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on issue #7187: [AIRFLOW-6576] fix scheduler crash caused by deleted task with sla misses
URL: https://github.com/apache/airflow/pull/7187#issuecomment-574935439
 
 
   # [Codecov](https://codecov.io/gh/apache/airflow/pull/7187?src=pr&el=h1) Report
   > Merging [#7187](https://codecov.io/gh/apache/airflow/pull/7187?src=pr&el=desc) into [master](https://codecov.io/gh/apache/airflow/commit/59c8a826b8d5d365db68e800cea3de59256530c9?src=pr&el=desc) will **increase** coverage by `0.18%`.
   > The diff coverage is `100%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/airflow/pull/7187/graphs/tree.svg?width=650&token=WdLKlKHOAU&height=150&src=pr)](https://codecov.io/gh/apache/airflow/pull/7187?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master    #7187      +/-   ##
   ==========================================
   + Coverage   84.91%   85.09%   +0.18%     
   ==========================================
     Files         723      723              
     Lines       39546    39555       +9     
   ==========================================
   + Hits        33581    33660      +79     
   + Misses       5965     5895      -70
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/airflow/pull/7187?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [airflow/jobs/scheduler\_job.py](https://codecov.io/gh/apache/airflow/pull/7187/diff?src=pr&el=tree#diff-YWlyZmxvdy9qb2JzL3NjaGVkdWxlcl9qb2IucHk=) | `89.45% <100%> (+0.69%)` | :arrow_up: |
   | [airflow/kubernetes/volume\_mount.py](https://codecov.io/gh/apache/airflow/pull/7187/diff?src=pr&el=tree#diff-YWlyZmxvdy9rdWJlcm5ldGVzL3ZvbHVtZV9tb3VudC5weQ==) | `44.44% <0%> (-55.56%)` | :arrow_down: |
   | [airflow/kubernetes/volume.py](https://codecov.io/gh/apache/airflow/pull/7187/diff?src=pr&el=tree#diff-YWlyZmxvdy9rdWJlcm5ldGVzL3ZvbHVtZS5weQ==) | `52.94% <0%> (-47.06%)` | :arrow_down: |
   | [airflow/kubernetes/pod\_launcher.py](https://codecov.io/gh/apache/airflow/pull/7187/diff?src=pr&el=tree#diff-YWlyZmxvdy9rdWJlcm5ldGVzL3BvZF9sYXVuY2hlci5weQ==) | `45.25% <0%> (-46.72%)` | :arrow_down: |
   | [airflow/kubernetes/refresh\_config.py](https://codecov.io/gh/apache/airflow/pull/7187/diff?src=pr&el=tree#diff-YWlyZmxvdy9rdWJlcm5ldGVzL3JlZnJlc2hfY29uZmlnLnB5) | `50.98% <0%> (-23.53%)` | :arrow_down: |
   | [...rflow/contrib/operators/kubernetes\_pod\_operator.py](https://codecov.io/gh/apache/airflow/pull/7187/diff?src=pr&el=tree#diff-YWlyZmxvdy9jb250cmliL29wZXJhdG9ycy9rdWJlcm5ldGVzX3BvZF9vcGVyYXRvci5weQ==) | `76.47% <0%> (-22.33%)` | :arrow_down: |
   | [airflow/models/connection.py](https://codecov.io/gh/apache/airflow/pull/7187/diff?src=pr&el=tree#diff-YWlyZmxvdy9tb2RlbHMvY29ubmVjdGlvbi5weQ==) | `68.78% <0%> (+0.97%)` | :arrow_up: |
   | [airflow/jobs/backfill\_job.py](https://codecov.io/gh/apache/airflow/pull/7187/diff?src=pr&el=tree#diff-YWlyZmxvdy9qb2JzL2JhY2tmaWxsX2pvYi5weQ==) | `91.88% <0%> (+1.44%)` | :arrow_up: |
   | [airflow/providers/apache/hive/hooks/hive.py](https://codecov.io/gh/apache/airflow/pull/7187/diff?src=pr&el=tree#diff-YWlyZmxvdy9wcm92aWRlcnMvYXBhY2hlL2hpdmUvaG9va3MvaGl2ZS5weQ==) | `77.55% <0%> (+1.53%)` | :arrow_up: |
   | ... and [9 more](https://codecov.io/gh/apache/airflow/pull/7187/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/airflow/pull/7187?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/airflow/pull/7187?src=pr&el=footer). Last update [59c8a82...23dc8c1](https://codecov.io/gh/apache/airflow/pull/7187?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   

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

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

Posted by GitBox <gi...@apache.org>.
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

[GitHub] [airflow] kaxil merged pull request #7187: [AIRFLOW-6576] fix scheduler crash caused by deleted task with sla misses

Posted by GitBox <gi...@apache.org>.
kaxil merged pull request #7187: [AIRFLOW-6576] fix scheduler crash caused by deleted task with sla misses
URL: https://github.com/apache/airflow/pull/7187
 
 
   

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

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

Posted by GitBox <gi...@apache.org>.
houqp 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_r368085595
 
 

 ##########
 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:
   Yeah, that's the first thing came to my mind, I expected that method to throw a more specific exception. I think we should have a clean up PR to change that method's behavior.
   
   Ideally, i think it should just return None if the task is not found just like a dictionary. Then the caller can explicitly check for the return and handle the edge-case. This way, we won't run into issues like this going forward.

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