lohitkolluri commented on code in PR #67900:
URL: https://github.com/apache/airflow/pull/67900#discussion_r3353065903


##########
airflow-core/src/airflow/models/backfill.py:
##########
@@ -653,7 +653,7 @@ def _create_backfill(
             triggering_user_name=triggering_user_name,
         )
         session.add(br)
-        session.commit()
+        session.flush()

Review Comment:
   Both CI issues are now fixed and verified locally:
   
   **1. test_with_row_locks[sqlite-False-True-True]** — Updated the 
parametrized test to reflect that SQLite skips `with_for_update` (our 
`with_row_locks()` function returns early for the sqlite dialect). The test now 
expects 0 calls for the sqlite dialect case. All 7 `with_row_locks` variants 
pass.
   
   **2. mypy missing return in backfills.py:325** — Added an unreachable 
fallback `raise HTTPException(503)` after the retry loop to satisfy mypy's 
static analysis. All retry paths already return or raise, but mypy can't prove 
the for-loop always exhausts. Mypy passes clean now.
   
   Verified: 7/7 with_row_locks tests pass, mypy on backfills.py passes.
   Pushed as 250fc2e (squashed into existing commit).



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