bbovenzi commented on code in PR #70305:
URL: https://github.com/apache/airflow/pull/70305#discussion_r3639319886
##########
airflow-core/src/airflow/ui/src/pages/Dag/Overview/Overview.tsx:
##########
@@ -66,6 +68,22 @@ export const Overview = () => {
const failedTaskCount = failedTasks?.total_entries ?? 0;
+ // Recent completed instances feed the per-task median; the endpoint caps the
+ // page at the configured n_page_limit, so this is the recent window, not
all runs.
+ const { data: slowestTasksData, isLoading: isLoadingSlowestTasks } =
useTaskInstanceServiceGetTaskInstances(
+ {
+ dagId: dagId ?? "",
+ dagRunId: "~",
+ limit: 100,
+ orderBy: ["-run_after"],
+ runAfterGte: startDate,
+ runAfterLte: endDate,
+ state: ["success", "failed"],
+ },
+ );
+
+ const slowestTasks = aggregateSlowestTasks(slowestTasksData?.task_instances
?? [], 10);
Review Comment:
Until we have a custom /ui endpoint to aggregate median task duration. Then
this chart should just say "Slowest task instances" and we shouldn't try to
aggregate them by task_id
--
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]