Yaro1 opened a new issue, #31876:
URL: https://github.com/apache/airflow/issues/31876

   ### Description
   
   For now it's complicated to use SLA mechanism for tasks as is.
   
   My suggestions is to rewrite SLA for tasks.
   
   I guess we should check three different cases in general.
   
   1. It doesn't matter for us how long we are spending time to some specific 
task. It's important to have an understanding of lag between execution_date of 
dag and success state for the task. We can call it dag_sla. It's similar on 
current implementation of manage_slas.
   2. It's important to have an understanding and managing how long some 
specific task is working. In my opinion working is state between task last 
start_date and task first (after last start_date) SUCCESS state. So for example 
for the task which placed in FAILED state we still have to check an SLA in that 
strategy.  We can call it task_sla.
   3. Sometimes we need in managing time for the task in RUNNING state. We can 
call it time_limit_sla.
   
   
   So we have three different strategies for SLA. 
   I think we should implement manage_dag_slas, manage_task_slas, 
manage_tl_slas functions instead of manage_slas and call them in 
execute_callbacks method of the DagFileProcessor.
   
   
   
   ### Use case/motivation
   
   Users of the airflow will have a good opportunity to use default airflow sla 
without creating each time their own bikes.
   
   ### Related issues
   
   _No response_
   
   ### Are you willing to submit a PR?
   
   - [X] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
   


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