Skip to content

4.1.1 migration troubleshooting with url_param() current_username() keywords in sql dataset #31975

Open
@ERGO1995

Description

@ERGO1995

Bug description

Hello, for the past three days we have been trying to migrate our Superset version from 4.0.2 to 4.1.1, but we are encountering an issue seemingly related to cache key retrieval. We have a source dataset behind our charts that uses keywords such as current_username(), cache_key_wrapper(), or url_param(). This issue only occurs when the GLOBAL_ASYNC_QUERIES flag is set to True.

Everything was working fine in 4.0.2, but now we are facing errors like this:

superset_app          | 2025-01-22 10:19:45,263:WARNING:superset.common.utils.query_cache_manager:force_cached (QueryContext): value not found for key 2791d577d99b83535ae58bcf40585cd1
superset_app          | 2025-01-22 10:19:45,349:WARNING:superset.common.utils.query_cache_manager:force_cached (QueryContext): value not found for key 2cdbfbda9ad8397e212070804634df6b
superset_worker       | [2025-01-22 10:19:45,390: INFO/MainProcess] Task load_chart_data_into_cache[2db1838d-7f84-44a2-8a8f-d3dc9db1d720] received
superset_worker       | [2025-01-22 10:19:45,429: INFO/MainProcess] Task load_chart_data_into_cache[d38c133e-a049-4599-98ff-a42147cfe624] received

As soon as I remove the above-mentioned keywords, the charts start working again. Has anyone faced a similar situation and could provide guidance on how to continue using these essential keywords in our context?

Screenshots/recordings

Image

Image

Image

Superset version

4.1.1

Python version

3.11

Node version

18 or greater

Browser

Chrome

Additional context

Works perfectly on 4.0.2 but crash on 4.1.1.rc2 (works on rc1 )
Seems to be a cache retreiving issue.
Works okay for all basic query but crash when using url_params jinja function.
Anyone have face this issues so far ? Maybe something related to #29840 as it touch cache key

Checklist

  • I have searched Superset docs and Slack and didn't find a solution to my problem.
  • I have searched the GitHub issue tracker and didn't find a similar bug report.
  • 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.

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions