phanikumv commented on code in PR #68389:
URL: https://github.com/apache/airflow/pull/68389#discussion_r3401761281
##########
airflow-core/src/airflow/models/serialized_dag.py:
##########
@@ -544,15 +544,18 @@ def _prefetch_dag_write_metadata(
if not dag_id_list:
return {}
- # Fetch latest serialized_dag (last_updated, dag_hash) per dag_id
- # using a window function to pick the most recent row.
+ # Fetch the serialized_dag (last_updated, dag_hash) of the latest
DagVersion per dag_id,
+ # ordering by version_number so it stays consistent with the
DagVersion picked by dv_subq.
sd_subq = (
select(
cls.dag_id.label("dag_id"),
Review Comment:
`SerializedDagModel.latest_item_select_object` (line 780) and
`get_latest_serialized_dags` (line ~796) still use `created_at` ordering , it
is an inconsistency worth fixing
--
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]