UI: Keep task try history consistent when switching tasks - #70711
Conversation
|
Thanks! The current fix focuses on frontend filtering, and the description mentions that "task try history responses can contain duplicate try numbers". Is that intended behavior from the backend endpoint? If not, would it make more sense to fix it at the backend instead of the frontend? |
The endpoint intentionally returns both the current task instance and its history. We have unit tests that validate this behavior so believe it is expected.. Changing that would alter the public API and could affect other consumers. The UI only needs unique, selectable try numbers, so normalizing them in the frontend seems safer for this UI-specific issue. |
Task try history responses can include duplicate or non-attempt records, which caused the UI to display mixed or invalid attempts after task navigation.
fdc3448 to
50e2451
Compare
Backport successfully created: v3-3-testNote: As of Merging PRs targeted for Airflow 3.X In matter of doubt please ask in #release-management Slack channel.
|
…#70711) (#71126) Task try history responses can include duplicate or non-attempt records, which caused the UI to display mixed or invalid attempts after task navigation. (cherry picked from commit 75d57f4) Co-authored-by: Shivam Rastogi <6463385+shivaam@users.noreply.github.com> Co-authored-by: Shivam <shivam@Shivams-Mac-mini.local> Co-authored-by: Rahul Vats <43964496+vatsrahul1001@users.noreply.github.com>
…#70711) (#71126) Task try history responses can include duplicate or non-attempt records, which caused the UI to display mixed or invalid attempts after task navigation. (cherry picked from commit 75d57f4) Co-authored-by: Shivam Rastogi <6463385+shivaam@users.noreply.github.com> Co-authored-by: Shivam <shivam@Shivams-Mac-mini.local> Co-authored-by: Rahul Vats <43964496+vatsrahul1001@users.noreply.github.com>
Task try history responses can contain duplicate try numbers, non-attempt try
0records, or records that do not match the task currently displayed. The UI previously rendered the response directly, allowing attempts to appear duplicated or mixed after navigating between tasks.This change scopes history to the active Dag run, task, and map index; removes nonpositive attempts; deduplicates by try number; and treats the current task instance as authoritative. Query keys and caching behavior remain unchanged.
A focused component regression test covers repeated task switching, duplicate and zero tries, mapped task indices, current-attempt precedence, and attempt selection.
Validation:
closes: #70696
Was generative AI tooling used to co-author this PR?
Generated-by: Codex (GPT-5) following the guidelines