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

   ### Under which category would you file this issue?
   
   Providers
   
   ### Apache Airflow version
   
   3.3.2
   
   ### What happened and how to reproduce it?
   
   Sending an SmtpNotifier of HttpNotifier notification in a deadline callback 
results in a scheduler error:
   `Failed to send notification (sync): Access denied for connection 
'smtp_default' by Execution API; refusing to fall back to a less-restrictive 
secrets backend. [airflow.providers.smtp.notifications.smtp.SmtpNotifier] 
loc=notifier.py:140`
   
   Or 
   `Failed to send notification (sync): Access denied for connection 
'http_default' by Execution API; refusing to fall back to a less-restrictive 
secrets backend. [airflow.providers.http.notifications.http.HttpNotifier] 
loc=notifier.py:140`
   
   Using configured connections from the API is not documented but I assume 
they are expected to be used as otherwise these notifications cannot be send.
   
   The code to reproduce:
   ```python
   deadline = DeadlineAlert(
       reference=DeadlineReference.DAGRUN_QUEUED_AT,
       interval=timedelta(minutes=1),
       callback=SyncCallback(
           SmtpNotifier,
           kwargs={
               "from_email": "[email protected]",
               "to": "[email protected]",
               "subject": "Deadline exceeded",
               "html_content": "Test",
           },
       ),
   )
   ```
   
   ### What you think should happen instead?
   
   Email or HTTP notification be send.
   
   ### Operating System
   
   Ubuntu 22.04.5 LTS
   
   ### Deployment
   
   None
   
   ### Apache Airflow Provider(s)
   
   _No response_
   
   ### Versions of Apache Airflow Providers
   
   _No response_
   
   ### Official Helm Chart version
   
   Not Applicable
   
   ### Kubernetes Version
   
   _No response_
   
   ### Helm Chart configuration
   
   _No response_
   
   ### Docker Image customizations
   
   _No response_
   
   ### Anything else?
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [ ] 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