You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "mikebridge (via GitHub)" <gi...@apache.org> on 2026/10/07 16:13:15 UTC
[PR] fix(async): show the real error for a failed async chart query [superset]
mikebridge opened a new pull request, #45054:
URL: https://github.com/apache/superset/pull/45054
### SUMMARY
When an async chart query fails, the chart currently shows only a generic failure message, even though the task already holds the real error. This change surfaces that error to the user.
- `GET /api/v1/task/<uuid>/status` gains an optional `error_message`, returned only for terminal chart-query tasks (failed, aborted, or timed out). The existing `status` field is unchanged, so the contract is additive.
- The message is sanitized with the same request-scoped policy that synchronous chart responses use, so embedded guests get the generic message and authenticated users get the stored text.
- It is visible only to callers who can already see the task, since the lookup goes through the existing task access filter. The stack trace is never returned.
- The frontend fetches this detail once per failed task and uses it for both the websocket and polling transports. If the lookup fails or the field is absent, the previous generic error is shown. Stale generations and duplicate terminal events do not settle another request.
- The admin docs for async queries describe the new behavior.
### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
N/A (the change replaces the text of an existing error state).
### TESTING INSTRUCTIONS
Run the focused backend API module `tests/integration_tests/tasks/api_tests.py` (32 tests pass) and the focused frontend middleware module `superset-frontend/src/middleware/asyncEvent.test.ts` (39 tests pass). They cover the terminal statuses, exclusion of non-chart tasks, the fallback when the detail is missing, and both transports. The six new frontend polling and websocket cases for failure, abort, and timeout were run before the implementation and failed on the original generic error. Changed-file pre-commit hooks pass.
The broader `tests/unit_tests` run was interrupted locally under memory pressure before it finished, so no whole-suite result is claimed here. CI is the authority for the full suite. No live Celery worker or browser was exercised.
### ADDITIONAL INFORMATION
- [ ] Has associated issue
- [x] Required feature flags (`GLOBAL_ASYNC_QUERIES`)
- [ ] Changes UI
- [ ] Includes DB Migration
- [x] Introduces new feature or API (additive optional `error_message` on the task status response)
- [ ] Removes existing feature or API
Known follow-ups:
- Add a real guest-token integration test for the redaction behavior.
- Add tests for duplicate terminal events, re-initialization in the middle of a detail fetch, and a non-string `error_message`.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(async): show the real error for a failed async chart query [superset]
Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #45054:
URL: https://github.com/apache/superset/pull/45054#issuecomment-6042364793
## [Codecov](https://app.codecov.io/gh/apache/superset/pull/45054?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
:x: Patch coverage is `97.61905%` with `1 line` in your changes missing coverage. Please review.
:white_check_mark: Project coverage is 66.23%. Comparing base ([`5a2f4c8`](https://app.codecov.io/gh/apache/superset/commit/5a2f4c8e80c213fc79e72a9b8d9390c3ce1567a3?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`547bb91`](https://app.codecov.io/gh/apache/superset/commit/547bb911bb9b3e9bbbfd003cc265ed6ca2832ac0?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
:warning: Report is 16 commits behind head on master.
| [Files with missing lines](https://app.codecov.io/gh/apache/superset/pull/45054?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines |
|---|---|---|
| [superset/tasks/api.py](https://app.codecov.io/gh/apache/superset/pull/45054?src=pr&el=tree&filepath=superset%2Ftasks%2Fapi.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VwZXJzZXQvdGFza3MvYXBpLnB5) | 90.00% | [0 Missing and 1 partial :warning: ](https://app.codecov.io/gh/apache/superset/pull/45054?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
> :exclamation: There is a different number of reports uploaded between BASE (5a2f4c8) and HEAD (547bb91). Click for more details.
>
> <details><summary>HEAD has 5 uploads less than BASE</summary>
>
>| Flag | BASE (5a2f4c8) | HEAD (547bb91) |
>|------|------|------|
>|python|7|3|
>|postgres|2|1|
></details>
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## master #45054 +/- ##
===========================================
- Coverage 82.52% 66.23% -16.29%
===========================================
Files 3005 3005
Lines 186595 186963 +368
Branches 43234 43310 +76
===========================================
- Hits 153979 123833 -30146
- Misses 29854 60430 +30576
+ Partials 2762 2700 -62
```
| [Flag](https://app.codecov.io/gh/apache/superset/pull/45054/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
|---|---|---|
| [hive](https://app.codecov.io/gh/apache/superset/pull/45054/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `36.20% <36.36%> (-0.06%)` | :arrow_down: |
| [javascript](https://app.codecov.io/gh/apache/superset/pull/45054/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `78.25% <100.00%> (+<0.01%)` | :arrow_up: |
| [mysql](https://app.codecov.io/gh/apache/superset/pull/45054/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
| [postgres](https://app.codecov.io/gh/apache/superset/pull/45054/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `55.09% <90.90%> (-0.08%)` | :arrow_down: |
| [presto](https://app.codecov.io/gh/apache/superset/pull/45054/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `38.05% <36.36%> (-0.06%)` | :arrow_down: |
| [python](https://app.codecov.io/gh/apache/superset/pull/45054/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `55.18% <90.90%> (-31.18%)` | :arrow_down: |
| [sqlite](https://app.codecov.io/gh/apache/superset/pull/45054/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
| [unit](https://app.codecov.io/gh/apache/superset/pull/45054/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
</details>
[:umbrella: View full report in Codecov by Harness](https://app.codecov.io/gh/apache/superset/pull/45054?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
<details><summary> :rocket: New features to boost your workflow: </summary>
- :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
- :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
</details>
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(async): show the real error for a failed async chart query [superset]
Posted by "netlify[bot] (via GitHub)" <gi...@apache.org>.
netlify[bot] commented on PR #45054:
URL: https://github.com/apache/superset/pull/45054#issuecomment-6041975396
### <span aria-hidden="true">✅</span> Deploy Preview for *superset-docs-preview* ready!
| Name | Link |
|:-:|------------------------|
|<span aria-hidden="true">🔨</span> Latest commit | 547bb911bb9b3e9bbbfd003cc265ed6ca2832ac0 |
|<span aria-hidden="true">🔍</span> Latest deploy log | https://app.netlify.com/projects/superset-docs-preview/deploys/6ac66f9be6a11f0008bdf23b |
|<span aria-hidden="true">😎</span> Deploy Preview | [https://deploy-preview-45054--superset-docs-preview.netlify.app](https://deploy-preview-45054--superset-docs-preview.netlify.app) |
|<span aria-hidden="true">📱</span> Preview on mobile | <details><summary> Toggle QR Code... </summary><br /><br /><br /><br />_Use your smartphone camera to open QR code link._</details> |
|<span aria-hidden="true">🤖</span> Make changes | [Run an agent on this branch](https://app.netlify.com/projects/superset-docs-preview/agent-runs#DcpLCoAgEADQu8y6AbWwzw06xqgjBaaitZDo7rl7i_dCLunKN2wAA5hC0R7d1aJUk1QzUm3RoqczPIXR8d3Vp-McUttdv5qs1n41rElKL4RYjPNqNPD9) |
---
<!-- [superset-docs-preview Preview](https://deploy-preview-45054--superset-docs-preview.netlify.app) -->
_To edit notification comments on pull requests, go to your [Netlify project configuration](https://app.netlify.com/projects/superset-docs-preview/configuration/notifications#deploy-notifications)._
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(async): show the real error for a failed async chart query [superset]
Posted by "aminghadersohi (via GitHub)" <gi...@apache.org>.
aminghadersohi merged PR #45054:
URL: https://github.com/apache/superset/pull/45054
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(async): show the real error for a failed async chart query [superset]
Posted by "codeant-ai-for-open-source[bot] (via GitHub)" <gi...@apache.org>.
codeant-ai-for-open-source[bot] commented on PR #45054:
URL: https://github.com/apache/superset/pull/45054#issuecomment-6044163057
## CodeAnt PR Risk: Low Risk
- The PR appears safe to merge; terminal chart-query failures can show sanitized task details with a generic fallback.
- Tests cover polling and websocket failure states, unavailable details, and omission of failure details for non-chart tasks.
**Assessed commit:** `547bb911bb9b`
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org