SIGN IN SIGN UP
apache / airflow UNCLAIMED

Apache Airflow - A platform to programmatically author, schedule, and monitor workflows

44796 0 0 Python

[v3-1-test] Fix task group lookup using wrong DAG version for historical runs (#63360) (#63433)

* Fix task group lookup using wrong DAG version for historical runs

When a task group is renamed between DAG versions, the API's
get_task_instances endpoint was resolving task groups against the
latest DAG version instead of the version the run was created with.
This caused 404 errors when clicking on task groups in the grid view
for historical runs.

The fix changes get_dag_for_run_or_latest_version to prefer the
run's created_dag_version_id, falling back to the existing behavior
only when unavailable.

* Move inline comment to docstring in get_dag_for_run_or_latest_version
(cherry picked from commit 48cc031600372d1695efd3847ec56270e3c3e7cd)

Co-authored-by: Pierre Jeambrun <pierrejbrun@gmail.com>
G
github-actions[bot] committed
47169b60019d2be27e06eb5bef6046ab672052bc
Parent: bfe8450
Committed by vatsrahul1001 <rah.sharma11@gmail.com> on 3/25/2026, 1:25:45 PM