Vamsi-klu commented on code in PR #66296:
URL: https://github.com/apache/airflow/pull/66296#discussion_r3393070557
##########
airflow-core/src/airflow/utils/db_cleanup.py:
##########
@@ -284,12 +284,12 @@ def _do_delete(
session.execute(delete)
session.commit()
- except BaseException as e:
- raise e
+ except BaseException:
+ session.rollback()
Review Comment:
Done — rollback is now wrapped in `with suppress(Exception):` and
`test_do_delete_propagates_original_error_when_rollback_fails` pins that the
original delete error (not the rollback error) propagates. One residual: if the
connection is genuinely dead, the `finally` drop/commit can still raise and
mask the original error; left as-is to keep the diff scoped, happy to guard the
drop too if you prefer.
---
Drafted-by: Claude Code (Fable 5) (no human review before posting)
--
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]