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': ['[email protected]'],
       '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': ['[email protected]'],
       '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:
[email protected]


Reply via email to