dosubot[bot] commented on issue #35991:
URL: https://github.com/apache/superset/issues/35991#issuecomment-3487557906
<!-- Answer -->
This is a known bug in Superset when GLOBAL_ASYNC_QUERIES is enabled and
Jinja SQL queries reference dashboard-level filters. The root cause is
inconsistent cache key serialization between the Celery worker and the web UI,
which leads to HTTP 422 errors and cache missesāresulting in native filters
getting stuck and not loading. Superset logs with warnings like `force_cached
(QueryContext): value not found for key ...` are a symptom of this issue.
There are currently two workarounds: you can disable async queries by
setting `GLOBAL_ASYNC_QUERIES = False` (which impacts scalability), or use
`url_param('param', add_to_cache_keys=False)` in your Jinja (but this breaks
filtering functionality). There is no official fix yet. For dynamic SQL logic,
it's recommended to use CASE WHEN statements or virtual datasets instead of
Jinja templating in chart filters to avoid this problem. More details are
available in [this issue](https://github.com/apache/superset/issues/35226).
<!-- Dosu Comment Footer -->
*To reply, just mention [@dosu](https://go.dosu.dev/dosubot).*
---
<sup>How did I do?
[Good](https://app.dosu.dev/response-feedback/6b9681ff-7d5a-440a-808f-90b3ab42ff13?feedback_type=great_response)
|
[Irrelevant](https://app.dosu.dev/response-feedback/6b9681ff-7d5a-440a-808f-90b3ab42ff13?feedback_type=irrelevant_answer)
|
[Incorrect](https://app.dosu.dev/response-feedback/6b9681ff-7d5a-440a-808f-90b3ab42ff13?feedback_type=incorrect_sources)
|
[Verbose](https://app.dosu.dev/response-feedback/6b9681ff-7d5a-440a-808f-90b3ab42ff13?feedback_type=too_verbose)
|
[Hallucination](https://app.dosu.dev/response-feedback/6b9681ff-7d5a-440a-808f-90b3ab42ff13?feedback_type=hallucination)
| [Report
š](https://app.dosu.dev/response-feedback/6b9681ff-7d5a-440a-808f-90b3ab42ff13?feedback_type=bug_report)
|
[Other](https://app.dosu.dev/response-feedback/6b9681ff-7d5a-440a-808f-90b3ab42ff13?feedback_type=other)</sup> [](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=githu
b) [](https://go.dosu.dev/discord-bot) [](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/issues/35991)
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]