Skip to content

Show errors when the task clear confirmation check fails - #75269

Merged
bbovenzi merged 1 commit into
apache:mainfrom
anzinmhd:fix-clear-preview-error
Oct 21, 2026
Merged

bbovenzi merged 1 commit into
apache:mainfrom
anzinmhd:fix-clear-preview-error

Conversation

@anzinmhd

Copy link
Copy Markdown
Contributor

When clearing a subset of the affected tasks, Confirm requests a fresh preview for the selected task instance IDs. If this request fails, the loading indicator disappears and leaves the page dimmed with no error message or action buttons.

This change displays the request error and a Cancel button. It also prevents clearing from proceeding with cached preview data when the confirmation refetch fails.

Steps to reproduce

  1. Complete a Dag run containing A → B → C.
  2. Open Clear for A with Downstream enabled.
  3. Uncheck B, leaving A and C selected.
  4. Keep “Prevent rerun if task is running” checked.
  5. After the affected-tasks preview loads, block the clearTaskInstances endpoint using browser DevTools.
  6. Click Confirm and wait for the request retries to finish.

Request blocking simulates a network failure during the confirmation check.

Before

After loading finishes, the page remains dimmed with no error message or action buttons.

before.mov

After

“Cannot Clear Task Instance” displays the request error and a Cancel button, allowing the user to dismiss the dialog.

after.mov

Validation

  • Reproduced the failure in Chrome on main and manually verified that the fix displays Network Error and Cancel.
  • Added regression tests for network and HTTP 500 failures after excluding a task, including cancellation and verifying that no clear mutation is sent.
  • Added coverage for a failed confirmation refetch with cached preview data.
  • All three new tests fail without the fix.
  • Both targeted test files pass: 26 tests.
  • Targeted ESLint and Prettier checks, TypeScript checking, and the UI production build pass.

Testing on 3.4.0b1 was blocked by the separate confirmation-dialog problem addressed in #74725. This failure has not been independently confirmed on the beta.


Was generative AI tooling used to co-author this PR?
  • Yes — Codex (GPT-6)

@boring-cyborg boring-cyborg Bot added the area:UI Related to UI/UX. For Frontend Developers. label Oct 21, 2026
@bbovenzi bbovenzi added the backport-to-v3-4-test Backport to v3-4-test label Oct 21, 2026
@bbovenzi bbovenzi added this to the Airflow 3.4.0 milestone Oct 21, 2026
@bbovenzi
bbovenzi merged commit dcfaae0 into apache:main Oct 21, 2026
78 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

Backport successfully created: v3-4-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-4-test PR Link

@anzinmhd
anzinmhd deleted the fix-clear-preview-error branch October 21, 2026 17:47
bbovenzi pushed a commit that referenced this pull request Oct 22, 2026
…75269) (#75331)

(cherry picked from commit dcfaae0)

Co-authored-by: Anzin Mohammed <anzinmhd765@gmail.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-4-test Backport to v3-4-test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants