dsuhinin opened a new pull request, #65722: URL: https://github.com/apache/airflow/pull/65722
Adds an `expected_duration` field to the DAG Run API response and displays
it in the DAG Run Details tab, directly below the current run duration.
## Changes
**API (`GET /dags/{dag_id}/dagRuns/{dag_run_id}`)**
- Added `expected_duration: float | null` to `DAGRunResponse`.
- Computed as the SQL `AVG(duration)` over all `success` and `failed` runs
for the same DAG, using the existing `DagRun.duration` hybrid property
expression.
- Returns `null` when no completed runs exist yet (new DAG, first run, or
all runs still in progress).
**UI (`/dags/{dag_id}/runs/{run_id}/details`)**
- Added "Expected Duration" row in the Details tab, immediately below
"Duration".
- Formatted with the existing `renderDuration` utility (same `HH:mm:ss` /
`D[d]HH:mm:ss` display as actual duration).
- Renders empty when the value is `null` — no noise for DAGs with no
history.
- Added `"expectedDuration"` translation key to all 21 supported locales.
--
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]
