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

    
   
   Closes #70056
   
   This PR fixes a scheduler bug where a queued DagRun can remain stuck forever 
when its pinned dag version becomes unresolvable.
   
   Problem
   - Some queued DagRuns are created with version pinning metadata.
   - If the pinned dag version row is later removed, the run may no longer 
resolve to a serialized DAG.
   - The scheduler previously logged and skipped these runs on every loop, 
leaving them permanently queued with no terminal outcome.
   
   Fix
   - In the queued DagRun start path, when a run has pinned version metadata 
but the pinned version is unresolvable, the scheduler now marks the DagRun as 
failed.
   - The scheduler also emits a specific state-change notification reason for 
this condition.
   - Existing behavior for other missing-DAG cases is unchanged.
   
   Tests
   - Added a regression test covering the unresolvable pinned-version scenario 
and asserting the DagRun transitions to failed.
   - Kept an existing related max_active_runs scheduler test alongside this 
change for local targeted verification.
   
   Validation run notes
   - Ruff format/check passed on changed files.
   - Local targeted pytest invocation was attempted multiple ways in this 
environment.
   - One explicit failure captured: ModuleNotFoundError for tests_common during 
local conftest import.
   - No changes were made to unrelated workspace files.
   
    


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