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

   This fixes an issue with `CommitProhibitorGuard` when a nested transaction 
is used.
   
   When `session.begin_nested()` is released, SQLAlchemy can trigger the 
`before_commit` event. The guard was treating this as an unexpected commit and 
raising an error.
   
   This change skips the commit check for nested transactions while keeping the 
existing protection against unexpected outer transaction commits.
   
   related: #59120
   
   ### Tests
   
   Added a regression test for nested transactions.
   
   Tested locally:
   - `test_sqlalchemy.py` — 29 passed
   - scheduler regression test — passed
   - `prohibit_commit` tests — 3 passed
   - `git diff --check` — passed
   
   The tests were run with SQLite locally, so they do not reproduce 
PostgreSQL's aborted-transaction behavior.
   


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