Pegoku opened a new issue, #35991: URL: https://github.com/apache/superset/issues/35991
### Bug description I have a dashboard with multiple filters with an SQL dataset, and it has Jinja templating in it. It uses Roles to know which options to display. It seems when enabling GLOBAL_ASYNC_QUERIES and caching, they get stuck. In the Developer Tools, I can see some requests' status being 422 (UNPROCESSABLE ENTITY). In the Superset LOGS, I get many warning like this: `WARNING:superset.common.utils.query_cache_manager:force_cached (QueryContext): value not found for key cd1790a05631bea74a503cad6e640372` ### Screenshots/recordings <img width="853" height="720" alt="Image" src="https://github.com/user-attachments/assets/0ed58635-3e5b-4857-a7ea-876ef91ef5aa" /> ### Superset version master / latest-dev ### Python version 3.11 ### Node version 18 or greater ### Browser Firefox ### Additional context Part of the SQL where Jinja templating is used: ``` WHERE {% if 'AllEmpresas' in current_user_roles() %} 1 = 1 {% elif current_user_empresas() and current_user_empresas()|length > 0 %} VGJ.CodigoEmpresa IN {{ current_user_empresas() | where_in }} {% else %} 1 = 0 {% endif %} ``` ### Checklist - [x] I have searched Superset docs and Slack and didn't find a solution to my problem. - [x] I have searched the GitHub issue tracker and didn't find a similar bug report. - [x] I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section. -- 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]
