ying-w opened a new issue, #31112:
URL: https://github.com/apache/airflow/issues/31112

   ### Apache Airflow version
   
   Other Airflow 2 version (please specify below)
   
   ### What happened
   
   The function I call for `on_success_callback` has an error (parameterized 
incorrectly). This error does not show up in airflow logs.
   
   ### What you think should happen instead
   
   Errors in callbacks should propagate to airflow logs or there should be an 
alternative path for debugging [in 
documentation](https://airflow.apache.org/docs/apache-airflow/stable/administration-and-deployment/logging-monitoring/callbacks.html)
   
   ### How to reproduce
   
   A dag that looks something like this
   
   ```py
   
   def send_email(context, job_status):
       # send email here parameterized by context  
   
   def dag_success(context):
       send_email(context, success=True)  # this should fail
   
   def dag_fail(context):
       send_email(context, success=False)  # this should fail
   
   @dag(
       schedule=None,
       start_date=pendulum.datetime(2023, 1, 1),
       on_success_callback=dag_success,
       on_failure_callback=dag_fail,
       tags=["example"],
   )
   def foo():
       BigQueryCheckOperator(
         ...
       )
   
   foo_run = foo()
   ```
   
   I expect the following function to throw an error because of mismatch of 
arguments: `send_email()` expects `job_status=` while i'm passing in `success=`.
   
   ### Operating System
   
   OS X 13.2.1
   
   ### Versions of Apache Airflow Providers
   
   apache-airflow-providers-google==8.11.0
   
   ### Deployment
   
   Astronomer
   
   ### Deployment details
   
   Airflow 2.5.2
   
   ### Anything else
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [X] 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