anzinmhd opened a new pull request, #75269:
URL: https://github.com/apache/airflow/pull/75269

   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.
   
   
https://github.com/user-attachments/assets/69329e95-11a8-4540-995c-8a63a8ec8e2a
   
   ### After
   
   “Cannot Clear Task Instance” displays the request error and a Cancel button, 
allowing the user to dismiss the dialog.
   
   
https://github.com/user-attachments/assets/e327db0a-002d-4179-8e5e-c17e5904634c
   
   ### 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?
   
   - [X] Yes — Codex (GPT-6)


-- 
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]

Reply via email to