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

   Resolves #71455.
   
   ### Problem
   When a user clears a DagRun with `run_on_latest_version=True`, the 
`created_dag_version_id` column is updated to the latest version. Later, if the 
user performs a clear with `only_new=True`, the `_get_new_task_ids` function 
diffs the latest DAG's task IDs against the task IDs from the version 
referenced by `created_dag_version_id`. Because this pointer has mutated, it 
incorrectly detects an empty diff and silently skips creating actual new tasks.
   
   ### Solution
   Instead of relying on the mutable `created_dag_version_id`, we now directly 
query the database for the actual `TaskInstance` rows associated with the 
`DagRun`. We diff these existing task IDs against the latest DAG's task IDs to 
accurately inject genuinely new tasks.
   
   Also includes an automated test asserting correct behavior when 
`created_dag_version_id` has been updated.


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