Skip to content

Comments

fix: fix error with dashboard filters when global async queries is enabled and user navigates quickly#36639

Merged
geido merged 3 commits intoapache:masterfrom
LevisNgigi:fix-abort-error
Dec 23, 2025
Merged

fix: fix error with dashboard filters when global async queries is enabled and user navigates quickly#36639
geido merged 3 commits intoapache:masterfrom
LevisNgigi:fix-abort-error

Conversation

@LevisNgigi
Copy link
Contributor

@LevisNgigi LevisNgigi commented Dec 15, 2025

User description

SUMMARY

Related to Pr. Prevents aborted chart requests from surfacing as hard errors in the UI.
Treats AbortError / "Request aborted" responses as expected behavior (e.g. when filters change quickly or charts unmount) and dispatches chartUpdateStopped(key) instead of chartUpdateFailed.
Keeps real failures unchanged: for non-abort errors, especially when GlobalAsyncQueries is enabled, the raw error still flows through chartUpdateFailed, preserving existing error handling.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

BEFORE:

2025-12-15.14-43-10.mp4

AFTER:

2025-12-15.14-40-30.mp4

TESTING INSTRUCTIONS

Make sure global async queries is enabled first:
On a dashboard, add cross filters
Quickly change them to other filters
OR
On a dashboard, apply filters, then quickly use the browser forward button then back
Currently:
Signal aborted error does not appear. User does not see an error and the dashboards with filters should load properly

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

CodeAnt-AI Description

Ignore aborted chart requests so quick filter changes don't surface as hard errors

What Changed

  • Aborted chart requests (e.g., from quickly changing filters or unmounting charts) no longer surface as errors; the UI treats them as stopped updates instead of failures
  • When global async queries is enabled, real server/client errors continue to surface as failures exactly as before
  • Non-abort errors are still logged and reported so actual failures remain visible to users

Impact

✅ Fewer spurious dashboard error messages when changing filters quickly
✅ Less confusing behavior when navigating away or unmounting charts rapidly
✅ Real chart failures still reported and logged

💡 Usage Guide

Checking Your Pull Request

Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.

Talking to CodeAnt AI

Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:

@codeant-ai ask: Your question here

This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.

Example

@codeant-ai ask: Can you suggest a safer alternative to storing this secret?

Preserve Org Learnings with CodeAnt

You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:

@codeant-ai: Your feedback here

This helps CodeAnt AI learn and adapt to your team's coding style and standards.

Example

@codeant-ai: Do not flag unused imports.

Retrigger review

Ask CodeAnt AI to review the PR again, by typing:

@codeant-ai: review

Check Your Repository Health

To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.

@codeant-ai-for-open-source
Copy link
Contributor

CodeAnt AI is reviewing your PR.

@bito-code-review
Copy link
Contributor

bito-code-review bot commented Dec 15, 2025

Code Review Agent Run #c66b96

Actionable Suggestions - 0
Review Details
  • Files reviewed - 1 · Commit Range: 4d7e0e2..4d7e0e2
    • superset-frontend/src/components/Chart/chartAction.js
  • Files skipped - 0
  • Tools
    • Eslint (Linter) - ✔︎ Successful
    • Whispers (Secret Scanner) - ✔︎ Successful
    • Detect-secrets (Secret Scanner) - ✔︎ Successful

Bito Usage Guide

Commands

Type the following command in the pull request comment and save the comment.

  • /review - Manually triggers a full AI review.

  • /pause - Pauses automatic reviews on this pull request.

  • /resume - Resumes automatic reviews.

  • /resolve - Marks all Bito-posted review comments as resolved.

  • /abort - Cancels all in-progress reviews.

Refer to the documentation for additional commands.

Configuration

This repository uses Default Agent You can customize the agent settings here or contact your Bito workspace admin at evan@preset.io.

Documentation & Help

AI Code Review powered by Bito Logo

@dosubot dosubot bot added dashboard:performance Related to Dashboard performance global:async-query Related to Async Queries feature labels Dec 15, 2025
@codeant-ai-for-open-source codeant-ai-for-open-source bot added the size:S This PR changes 10-29 lines, ignoring generated files label Dec 15, 2025
@codeant-ai-for-open-source
Copy link
Contributor

Nitpicks 🔍

🔒 No security issues identified
⚡ Recommended areas for review

  • Async error shape
    When GlobalAsyncQueries is enabled the raw response is forwarded into chartUpdateFailed([response], key). Ensure the consumers/reducers expect this raw shape and that it contains the needed fields (message/error/is_cached). Consider normalizing the error shape before dispatch to avoid downstream surprises.

  • Abort detection
    The new abort handling checks response?.name === 'AbortError' and response?.message === 'Request aborted'. Different runtimes and the Superset client may surface aborts using statusText === 'abort', a DOMException, or other shapes. Verify all abort cases are caught and not treated as real errors.

  • Error logging behavior change
    Previously aborts appended an 'abort' error log. The new code ignores aborts completely (no log). Confirm this is intentional (aborts shouldn't be logged), and if some telemetry is still desired, add a non-error log path instead of dropping it entirely.

@codeant-ai-for-open-source
Copy link
Contributor

CodeAnt AI finished reviewing your PR.

@rusackas rusackas self-requested a review December 15, 2025 18:34
@rusackas
Copy link
Member

Oops... I didn't mean to click approve quite yet on this. This needs more review and bot feedback :P

@rusackas rusackas added the hold! On hold label Dec 15, 2025
@rusackas
Copy link
Member

Slapping a HOLD label on it due to my mistake... any other reviewer can remove that once they've actually approved it.

@sadpandajoe
Copy link
Member

@LevisNgigi any way to add tests to this change? Would be good to catch these in the future in case if anyone touches dashboard filters.

@pull-request-size pull-request-size bot added size/M and removed size/S labels Dec 17, 2025
@codeant-ai-for-open-source
Copy link
Contributor

CodeAnt AI is running Incremental review


Thanks for using CodeAnt! 🎉

We're free for open-source projects. if you're enjoying it, help us grow by sharing.

Share on X ·
Reddit ·
LinkedIn

@LevisNgigi LevisNgigi closed this Dec 17, 2025
@LevisNgigi LevisNgigi reopened this Dec 17, 2025
@LevisNgigi LevisNgigi closed this Dec 17, 2025
@LevisNgigi LevisNgigi reopened this Dec 17, 2025
@LevisNgigi LevisNgigi closed this Dec 17, 2025
@LevisNgigi LevisNgigi reopened this Dec 17, 2025
@codeant-ai-for-open-source
Copy link
Contributor

CodeAnt AI is running Incremental review


Thanks for using CodeAnt! 🎉

We're free for open-source projects. if you're enjoying it, help us grow by sharing.

Share on X ·
Reddit ·
LinkedIn

@LevisNgigi
Copy link
Contributor Author

LevisNgigi commented Dec 18, 2025

@LevisNgigi any way to add tests to this change? Would be good to catch these in the future in case if anyone touches dashboard filters.

@sadpandajoe I have added the tests. I am wondering why CI is having some inconsistent behaviours.

@codeant-ai-for-open-source
Copy link
Contributor

CodeAnt AI is running Incremental review


Thanks for using CodeAnt! 🎉

We're free for open-source projects. if you're enjoying it, help us grow by sharing.

Share on X ·
Reddit ·
LinkedIn

Copy link
Member

@geido geido left a comment

Choose a reason for hiding this comment

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

Based on the fix in the original PR that introduced this issue #35998, this fix makes sense. However, I agree with Kamil that a longer-term solution would be to avoid storing the abort controllers in Redux. I'll track this as tech debt.

@geido geido removed the hold! On hold label Dec 23, 2025
@geido geido merged commit ff24e2f into apache:master Dec 23, 2025
72 of 73 checks passed
@sadpandajoe sadpandajoe added the v6.0 Label added by the release manager to track PRs to be included in the 6.0 branch label Jan 5, 2026
sadpandajoe pushed a commit that referenced this pull request Jan 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dashboard:performance Related to Dashboard performance global:async-query Related to Async Queries feature size/M size:S This PR changes 10-29 lines, ignoring generated files v6.0 Label added by the release manager to track PRs to be included in the 6.0 branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants