Skip to content

UI: Keep task try history consistent when switching tasks - #70711

Merged
bbovenzi merged 1 commit into
apache:mainfrom
shivaam:fix-70696-previous-tries
Aug 4, 2026
Merged

UI: Keep task try history consistent when switching tasks#70711
bbovenzi merged 1 commit into
apache:mainfrom
shivaam:fix-70696-previous-tries

Conversation

@shivaam

@shivaam shivaam commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Task try history responses can contain duplicate try numbers, non-attempt try 0 records, 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:

  • Focused Vitest: 2 tests passed
  • UI ESLint: passed
  • UI TypeScript check: passed
  • Airflow pre-commit hooks: passed
  • Real UI verification with the issue's Dag and repeated-run workflow

closes: #70696

after-start-tries
Was generative AI tooling used to co-author this PR?
  • Yes — Codex (GPT-5)

Generated-by: Codex (GPT-5) following the guidelines

@boring-cyborg boring-cyborg Bot added the area:UI Related to UI/UX. For Frontend Developers. label Jul 30, 2026
@shivaam
shivaam marked this pull request as ready for review July 30, 2026 05:44
@Andrushika

Copy link
Copy Markdown
Contributor

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?

@shivaam

shivaam commented Jul 30, 2026

Copy link
Copy Markdown
Contributor Author

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.

@bbovenzi bbovenzi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's rebase now that #70789 is merged

Comment thread airflow-core/src/airflow/ui/src/components/TaskTrySelect.tsx Outdated
Comment thread airflow-core/src/airflow/ui/src/components/TaskTrySelect.tsx Outdated
Task try history responses can include duplicate or non-attempt records, which caused the UI to display mixed or invalid attempts after task navigation.
@shivaam
shivaam force-pushed the fix-70696-previous-tries branch from fdc3448 to 50e2451 Compare August 4, 2026 05:06
@bbovenzi bbovenzi added this to the Airflow 3.3.2 milestone Aug 4, 2026
@bbovenzi bbovenzi added the backport-to-v3-3-test Backport to v3-3-test label Aug 4, 2026
@bbovenzi
bbovenzi merged commit 75d57f4 into apache:main Aug 4, 2026
89 checks passed
@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Backport successfully created: v3-3-test

Note: As of Merging PRs targeted for Airflow 3.X
the committer who merges the PR is responsible for backporting the PRs that are bug fixes (generally speaking) to the maintenance branches.

In matter of doubt please ask in #release-management Slack channel.

Status Branch Result
v3-3-test PR Link

vatsrahul1001 added a commit that referenced this pull request Aug 5, 2026
…#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>
vatsrahul1001 added a commit that referenced this pull request Aug 5, 2026
…#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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:UI Related to UI/UX. For Frontend Developers. backport-to-v3-3-test Backport to v3-3-test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

inconsistencies on showing previous tries in the airflow ui

4 participants