bbovenzi commented on code in PR #65722:
URL: https://github.com/apache/airflow/pull/65722#discussion_r3168785194


##########
airflow-core/src/airflow/api_fastapi/core_api/routes/public/dag_run.py:
##########
@@ -130,10 +131,36 @@ def get_dag_run(dag_id: str, dag_run_id: str, session: 
SessionDep) -> DAGRunResp
             status.HTTP_404_NOT_FOUND,
             f"The DagRun with dag_id: `{dag_id}` and run_id: `{dag_run_id}` 
was not found",
         )
-
     return dag_run
 
 
+@dag_run_router.get(
+    "/{dag_run_id}/stats",
+    responses=create_openapi_http_exception_doc([status.HTTP_404_NOT_FOUND]),
+    dependencies=[Depends(requires_access_dag(method="GET", 
access_entity=DagAccessEntity.RUN))],
+)
+def get_dag_run_stats(dag_id: str, dag_run_id: str, session: SessionDep) -> 
DagRunStatsResponse:

Review Comment:
   I think this would be best as a ui endpoint instead of a public endpoint for 
now. Then we can modify it as we need.



##########
airflow-core/src/airflow/ui/public/i18n/locales/hi/common.json:
##########
@@ -60,6 +60,15 @@
     "dagVersions": "डैग संस्करण",
     "dataIntervalEnd": "डेटा अंतराल अंत",
     "dataIntervalStart": "डेटा अंतराल प्रारंभ",
+    "durationStats": {
+      "mean": "माध्य",
+      "mode": "बहुलक",
+      "p50": "P50",
+      "p90": "P90",
+      "p95": "P95",
+      "p99": "P99"

Review Comment:
   Maybe we shouldn't ever translate the P values?



##########
airflow-core/src/airflow/ui/src/pages/Run/Details.tsx:
##########
@@ -44,6 +44,8 @@ export const Details = () => {
     { refetchInterval: (query) => (isStatePending(query.state.data?.state) ? 
refetchInterval : false) },
   );
 
+  const { data: dagDugRunStats } = useDagRunServiceGetDagRunStats({ dagId, 
dagRunId: runId });

Review Comment:
   ```suggestion
     const { data: dagRunStats } = useDagRunServiceGetDagRunStats({ dagId, 
dagRunId: runId });
   ```



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