RehanAhmad25 commented on code in PR #72499:
URL: https://github.com/apache/airflow/pull/72499#discussion_r4499341991


##########
airflow-core/src/airflow/api_fastapi/core_api/routes/public/dag_run.py:
##########
@@ -251,7 +261,8 @@ def patch_dag_run(
     if not final_dag_run:
         raise HTTPException(status.HTTP_404_NOT_FOUND, "Dag run not found 
after update")
 
-    return final_dag_run
+    response = DAGRunResponse.from_dag_run(final_dag_run, dag)
+    return response

Review Comment:
   Done, and applied everywhere. Routes now set dag_run.dag and return the run 
like before, and the list endpoints go through one small helper that attaches 
each run's own Dag version. The response model reads the Dag off the run and 
raises if there isn't one, so a route that forgets still fails instead of 
leaking. The deadline callback and the CLI use from_dag_run_unmasked since they 
need the real value.



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