You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Old DAG version used even when selecting Run with latest bundle version on task instance "clear" #67657
User noted that a certain DAG picks up the outdated DAG Bundle even when "run_on_latest_version": true when retrying a Task after shipping a new version of the DAG in question. At the moment the user does not have clarity on how to reproduce the initial state for it (3 out of 30 failed dags exhibited this behavior in a 24 hour period).
How it manifests:
Task fails run on V5 version of the DAG
Deploy DAG version V6, new code is visible in the Airflow UI
Clear task instance in Airflow UI with Run with latest bundle version option (confirmed by DAG audit log)
Airflow starts Task on V5
Repeat [3]
Task still starts V5 code
The user then went to the DAG-level clear, picked the checkbox but did not clear the dag run, and the bug went away.
What you think should happen instead?
Task fails run on V5 version of the DAG
Deploy DAG version V6, new code is visible in the Airflow UI
Clear task instance in Airflow UI with Run with latest bundle version option (confirmed by DAG audit log)
I checked this against the existing fix in #65835. The fix is already present on newer branches, but it was missing from the v3-1-test line, which matches this report being on Airflow 3.1.6.
I opened a backport PR against v3-1-test to bring over the backend DagVersion alignment fix for run_on_latest_version=True.
The backport keeps the change focused to clear_task_instances, so cleared task instances use the latest dag_version_id, and queued/running DagRuns are aligned to the latest DAG/bundle version before the next task execution.
Activity
Codingaditya17 commentedon May 29, 2026
I checked this against the existing fix in #65835. The fix is already present on newer branches, but it was missing from the
v3-1-testline, which matches this report being on Airflow 3.1.6.I opened a backport PR against
v3-1-testto bring over the backend DagVersion alignment fix forrun_on_latest_version=True.The backport keeps the change focused to
clear_task_instances, so cleared task instances use the latestdag_version_id, and queued/running DagRuns are aligned to the latest DAG/bundle version before the next task execution.PR: #67673
Refresh bundle version in place when DAG serialization is unchanged
Refresh bundle version in place when DAG serialization is unchanged
Refresh bundle version in place when DAG serialization is unchanged
Refresh bundle version in place when DAG serialization is unchanged (#…
Refresh bundle version in place when DAG serialization is unchanged (a…
Refresh bundle version in place when DAG serialization is unchanged (a…
Refresh bundle version in place when DAG serialization is unchanged (a…
Refresh bundle version in place when DAG serialization is unchanged (a…