dgvj-work commented on code in PR #71459:
URL: https://github.com/apache/airflow/pull/71459#discussion_r4001926391


##########
airflow-core/src/airflow/models/dagrun.py:
##########
@@ -532,10 +532,7 @@ def dag_run_data(self) -> DRDataModel:
     @property
     def dag_versions(self) -> list[DagVersion]:
         """Return the DAG versions associated with the TIs of this DagRun."""
-        # when the dag is in a versioned bundle, we keep the dag version fixed
-        if self.bundle_version:
-            return [self.created_dag_version] if self.created_dag_version is 
not None else []
-
+        # Always derive from actual TI/TIH versions.

Review Comment:
   `get_dag_run()` now uses the same path as list/grid: 
`eager_load_dag_run_for_list()` plus `attach_dag_versions_to_runs`. Opening a 
single run no longer walks the TI/TIH collections just to return versions. 
Added a query-count test that stays flat from 3 to 20 task instances.



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