devnp2007 opened a new pull request, #77537:
URL: https://github.com/apache/airflow/pull/77537

   Closes #77049.
   
   When `trigger.cleanup()` raised an exception inside 
`TriggerRunner.run_trigger()`, it was previously suppressed via `with 
suppress(Exception):` without logging, making cleanup failures hard to diagnose.
   
   ### Summary of changes
   - Log a warning with traceback (`self.log.awarning("cleanup() raised an 
exception", name=name, exc_info=True)`) when `trigger.cleanup()` raises an 
exception, matching `on_kill()` handling.
   - Update `BaseTrigger.cleanup()` docstring to reflect that exceptions are 
logged as warnings rather than silently ignored.
   - Add unit test `test_run_trigger_logs_warning_when_cleanup_raises` in 
`airflow-core/tests/unit/jobs/test_triggerer_job.py`.Closes #77049.
   
   When `trigger.cleanup()` raised an exception inside 
`TriggerRunner.run_trigger()`, it was previously suppressed via `with 
suppress(Exception):` without logging, making cleanup failures hard to diagnose.
   
   ### Summary of changes
   - Log a warning with traceback (`self.log.awarning("cleanup() raised an 
exception", name=name, exc_info=True)`) when `trigger.cleanup()` raises an 
exception, matching `on_kill()` handling.
   - Update `BaseTrigger.cleanup()` docstring to reflect that exceptions are 
logged as warnings rather than silently ignored.
   - Add unit test `test_run_trigger_logs_warning_when_cleanup_raises` in 
`airflow-core/tests/unit/jobs/test_triggerer_job.py`.


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