alexbegg commented on issue #18031:
URL: https://github.com/apache/airflow/issues/18031#issuecomment-964690136


   Maybe I am not understanding the ticket, but I don't find this to be true:
   
   > 1. sla_miss_callback only fires after the task finishes. That means if the 
task is never finished in the first place due to it being blocked, or is still 
running, sla_miss_callback is not fired.
   
   if I have a DAG that should be hourly and for example I set a 1-hour SLA, I 
will get an SLA miss email if a single DAG run is still running past 1 hour. If 
a DAG finished and it failed it will use `on_failure_callback`, and if a DAG 
finished and it succeeded it will use `on_success_callback`. So that covers 
both cases of a DAG being complete (which is only possible if no tasks are 
running or blocked) so obviously the `sla_miss_callback` is if the DAG is 
missing its SLA, even if it is running.
   
   I do agree that there should be better control for task-specific deadlines, 
but also this can be accomplished partially today by putting the part of the 
DAG that needs a deadline should be by itself in a separate DAG with an SLA in 
place, and then the remainder of a DAG will be in a 2nd task and use 
`ExternalTaskSensor`.


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


Reply via email to