josh-fell commented on a change in pull request #20470:
URL: https://github.com/apache/airflow/pull/20470#discussion_r774114755
##########
File path: airflow/dag_processing/processor.py
##########
@@ -574,7 +574,7 @@ def execute_callbacks(
if isinstance(request, TaskCallbackRequest):
self._execute_task_callbacks(dagbag, request)
elif isinstance(request, SlaCallbackRequest):
- self.manage_slas(dagbag.dags.get(request.dag_id))
+ self.manage_slas(dagbag.dags[request.dag_id])
Review comment:
Error here:
```
airflow/dag_processing/processor.py:577: error: Argument 1 to "manage_slas"
of "DagFileProcessor" has incompatible type "Optional[DAG]"; expected "DAG"
self.manage_slas(dagbag.dags.get(request.dag_id))
```
Not entirely sure if there is a case when an SLA callback would be executed
but not have the corresponding DAG in the DagBag. If it's possible, I can
certainly modify `manage_slas()` typing and raise an exception for a missing
DAG if this is a possible scenario.
--
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]