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


##########
airflow-core/src/airflow/api_fastapi/core_api/routes/public/dag_run.py:
##########
@@ -247,6 +238,7 @@ def patch_dag_run(
     if not final_dag_run:
         raise HTTPException(status.HTTP_404_NOT_FOUND, "Dag run not found 
after update")
 
+    attach_dag_versions_to_runs([final_dag_run], session=session)

Review Comment:
   Moved the DISTINCT lookup into the `dag_versions` fallback 
(`DagRun.fetch_dag_versions_for_runs`, with `include_all_attempts=True` so 
archived attempts are included), and removed the per-route calls from GET and 
PATCH; `attach_dag_versions_to_runs` is now just the batch wrapper for 
list/grid. `clear_dag_run`, `clear_dag_runs` and `trigger_dag_run` each have a 
test asserting serialization leaves `task_instances` and 
`historical_task_instances` unloaded on a bundle-versioned run with archived 
attempts. Rebased onto main to resolve the conflicts from the 
TaskInstanceHistory removal.



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