apache / apache/airflow

Show task retry timing details in task instance UI including the Jitter calculated

Open
#72,404 2 comments 0 reactions 1 assignee Claimed by @manoj121999 View on GitHub
area:UI kind:feature
Dominant language
Python
Stars
46.9k
Forks
17.8k
Avg merge
2d 9h
Merged PRs (30d)
472

Description

### Description

Retry waits can otherwise look like scheduler or executor delays, making expected backoff and jitter difficult to distinguish from operational latency.

This PR makes the retry calculation visible in Task Instance details while the current attempt is in up_for_retry.

### Use case/motivation

What changes

- Display the next eligible retry time and final calculated delay.
- Show the configured delay, exponential-backoff delay, deterministic jitter, effective maximum delay, and whether the delay was capped.
- Show retry-policy context when a retry policy overrides the task configuration.
- Add read-only REST API endpoints for retrieving retry details for mapped and unmapped task instances.
- Return retry details only while a task instance is waiting for retry; otherwise, return 409 Conflict.
- Regenerate the OpenAPI specification, UI client, AirflowCTL models, and API permission reference.
- Add backend, API, and UI tests covering task-configured retries, retry-policy overrides, capped delays, mapped task instances, permissions, and error responses.

How it works

- TaskInstance.get_retry_timing() exposes the components of the retry calculation already used by Airflow. next_retry_datetime() continues to return the eligible retry time from that same calculation.

- The API loads the task definition from the Dag version associated with the run and calculates the details on demand. The UI requests them only for the current attempt while its state is up_for_retry.

PR for this is already raised with proper test evidences https://github.com/apache/airflow/pull/72184

### Related issues

_No response_

### Are you willing to submit a PR?

- [x] Yes I am willing to submit a PR! https://github.com/apache/airflow/pull/72184

### Code of Conduct

- [x] I agree to follow this project's [Code of Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.