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/11/25 09:58:39 UTC

[GitHub] [airflow] JavierLopezT opened a new issue #12612: Send failure email just if all retries fail

JavierLopezT opened a new issue #12612:
URL: https://github.com/apache/airflow/issues/12612


   Let's say that you have a DAG with 8 retries and email_on_failure=True. 
   
   The first 6 times it fails due to a server conn error, and on the 7th it works. I really don't care why it failed the first six times, and I will care just if it fails the 8th time. 
   
   It would be nice to have a parameter that allows us to only receive an email if all 8 retries fail. 


----------------------------------------------------------------
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] JavierLopezT commented on issue #12612: Send failure email just if all retries fail

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


   Ok, I thought email_on_retry was False by default. Setting that to False, email_on_failure does exactly what I want. Sorry for the inconveniences and thanks for you help @turbaszek . I'll close the issue 


----------------------------------------------------------------
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] turbaszek commented on issue #12612: Send failure email just if all retries fail

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


   Won't that be handled by `on_failure_callback`? 


----------------------------------------------------------------
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] JavierLopezT closed issue #12612: Send failure email just if all retries fail

Posted by GitBox <gi...@apache.org>.
JavierLopezT closed issue #12612:
URL: https://github.com/apache/airflow/issues/12612


   


----------------------------------------------------------------
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] JavierLopezT commented on issue #12612: Send failure email just if all retries fail

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


   > Won't that be handled by `on_failure_callback`?
   
   Since you say so, I guess it will be possible, but after a quick research on Google I can't figure it out. My idea is having a parameter like 'email_on_fail_retries' that you can set to False, which I think is way easier than doing it with on_failure_callback. 
   
   Also, not sure if I understood correctly, but you would have to have the callback function on every dag that you want to use it, right? So it will be a lot of duplicated code (or more complexity added creating a module or something like that)


----------------------------------------------------------------
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] JavierLopezT edited a comment on issue #12612: Send failure email just if all retries fail

Posted by GitBox <gi...@apache.org>.
JavierLopezT edited a comment on issue #12612:
URL: https://github.com/apache/airflow/issues/12612#issuecomment-733637414


   > Won't that be handled by `on_failure_callback`?
   
   Since you say so, I guess it will be possible, but after a quick research on Google I can't figure it out. My idea is having a DAG parameter like 'email_on_fail_retries' that you can set to False, which I think is way easier than doing it with on_failure_callback. 
   
   Also, not sure if I understood correctly, but you would have to have the callback function on every dag that you want to use it, right? So it will be a lot of duplicated code (or more complexity added creating a module or something like that)


----------------------------------------------------------------
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] turbaszek commented on issue #12612: Send failure email just if all retries fail

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


   > you would have to have the callback function on every dag that you want to use it, right? So it will be a lot of duplicated cod
   
   Use cluster policy. As per the emails, I wanted to point to `email_on_failure` not `on_faliure_callaback`.


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