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/05/03 07:43:18 UTC

[GitHub] [airflow] jeffolsi opened a new issue #8686: A more generic on_failure, on_retry methods

jeffolsi opened a new issue #8686:
URL: https://github.com/apache/airflow/issues/8686


   
   **Description**
   
   Airflow offers to setup:
   
   ```
   default_args = {
       'owner': 'airflow',
       'depends_on_past': False,
       'start_date': datetime(2015, 6, 1),
       'email': ['airflow@example.com'],
       'email_on_failure': True,
       'email_on_retry': True,
   }
   ```
   
   In this case email_on_failure, email_on_retry will use the list email to notify on failure/retry.
   It's 3 lines that solve the issue of getting notified when there is a problem. 
   
   **Use case / motivation**
   
   issue starts when one doesn't wish to be notified by email. One can and should be able to be notified by Slack, Telegram or any other integration that Airflow has with chat apps.
   Airflow should provide the infrastructure for this and any chat integration can choose if they add it or not when PR is submitted for that integration.
   
   So possible solution can be:
   
   for email:
   ```
   default_args = {
       'owner': 'airflow',
       'depends_on_past': False,
       'start_date': datetime(2015, 6, 1),
       'method_notify':'email',
       'list_notify': ['airflow@example.com'],
       'notify_on_failure': True,
       'notify_on_retry': True,
   }
   ```
   
   for Slack:
   
   ```
   default_args = {
       'owner': 'airflow',
       'depends_on_past': False,
       'start_date': datetime(2015, 6, 1),
       'method_notify':'slack',
       'list_notify': ['chanle_name'],
       'notify_on_failure': True,
       'notify_on_retry': True,
   }
   ```
   
   
   **More info**
   
   I'm aware that I can write `on_failure_callback` and `on_retry_callback`. This is what I do now but I think this can be improved. Also I feel that those methods are more for "Do something about the failure" rather than notify that it happened. 


----------------------------------------------------------------
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] ashb commented on issue #8686: A more generic on_failure, on_retry methods

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


   Closing in favour of #12611 which is more general purpose.


-- 
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] ashb closed issue #8686: A more generic on_failure, on_retry methods

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


   


-- 
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] RosterIn commented on issue #8686: A more generic on_failure, on_retry methods

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


   This is really good suggestion!
   This can really solve many issues for organizations that work with more than one communication application.


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