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 2021/05/19 17:51:59 UTC

[GitHub] [airflow] mporracindie opened a new issue #15951: Mark tasks as critical

mporracindie opened a new issue #15951:
URL: https://github.com/apache/airflow/issues/15951


   **Description**
   The idea is to be able to mark specific tasks as critical making them define the output of the entire dag.
   
   **Use case / motivation**
   I'll use a specific example but this can be extended to many use cases. Let's say you use an operator to create an EMR cluster one for summiting code to the cluster and finally a cleanup one for killing the cluster when all the previous have finished.
   The task submitting code to EMR is critical and I would want the whole DAG run to be marked as failed if any of them fails. However, this doesn't happen cause the cleanup always runs successfully. (which is expected since we want the cluster finished regardless of the output of the previous tasks)
   
   With this example, I think I'm being clear. The end idea is to have more control over the dag run state when you have things like this:
   <img width="43" alt="Captura de Pantalla 2021-05-19 a la(s) 14 50 48" src="https://user-images.githubusercontent.com/42622776/118860389-b5938c00-b8b1-11eb-8152-9b5b93adbfdf.png">
   
   **Are you willing to submit a PR?**
   Yes


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



[GitHub] [airflow] boring-cyborg[bot] commented on issue #15951: Mark tasks as critical

Posted by GitBox <gi...@apache.org>.
boring-cyborg[bot] commented on issue #15951:
URL: https://github.com/apache/airflow/issues/15951#issuecomment-844333169


   Thanks for opening your first issue here! Be sure to follow the issue template!
   


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



[GitHub] [airflow] eladkal commented on issue #15951: Mark tasks as critical

Posted by GitBox <gi...@apache.org>.
eladkal commented on issue #15951:
URL: https://github.com/apache/airflow/issues/15951#issuecomment-919478949


   Not ideal but you can solve it by placing PythonOperator after the terminate task.
   The operator can look for the main task status and set to fail/success accordingly. 


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] mporracindie commented on issue #15951: Mark tasks as critical

Posted by GitBox <gi...@apache.org>.
mporracindie commented on issue #15951:
URL: https://github.com/apache/airflow/issues/15951#issuecomment-920902551


   > Not ideal but you can solve it by placing PythonOperator after the terminate task.
   > The operator can look for the main task status and set to fail/success accordingly.
   
   And that's how I'm solving it right now but personally, it seems like something that is adding tasks to my DAG in order to solve a problem that should be there in the first place. Being able to fully control the behavior of the DAG final status based on the task's executions. 
    


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org