Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GLOBAL_ASYNC_QUERIES_CACHE_BACKEND ignores username #32353

Open
3 tasks done
Mistuke opened this issue Feb 23, 2025 · 1 comment
Open
3 tasks done

GLOBAL_ASYNC_QUERIES_CACHE_BACKEND ignores username #32353

Mistuke opened this issue Feb 23, 2025 · 1 comment
Labels
global:async-query Related to Async Queries feature

Comments

@Mistuke
Copy link

Mistuke commented Feb 23, 2025

Bug description

#30284 removed GLOBAL_ASYNC_QUERIES_REDIS_CONFIG for GLOBAL_ASYNC_QUERIES_CACHE_BACKEND,
however GLOBAL_ASYNC_QUERIES_CACHE_BACKEND even though it declares CACHE_REDIS_USER as a parameter

GLOBAL_ASYNC_QUERIES_CACHE_BACKEND = {
never passes the username down to the redis client
https://github.com/apache/superset/blob/master/superset/async_events/cache_backend.py#L27 which means the user/password pair is never correct.

With GLOBAL_ASYNC_QUERIES_REDIS_CONFIG this was possible to do as it had the ability to pass kwargs directly to the redis client. Which means before this change it was possible to use secure username/password redis, but after this change it's not.

It would also be good to restore the CACHE_OPTIONS value that GLOBAL_ASYNC_QUERIES_REDIS_CONFIG and others have. This options expands the kwargs passed to the constructor of the underlying redis library.

Since superset it not the one handling the connection, this allowed us to use connections that redis supported but superset does not. e.g. the underlying redis and kombus library supports clustered redis, but superset does not have a cache type for it.

Using the CACHE_OPTIONS this worked fine before.

Screenshots/recordings

No response

Superset version

master / latest-dev

Python version

3.9

Node version

16

Browser

Chrome

Additional context

No response

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.
Copy link

dosubot bot commented Feb 23, 2025

Hey @Mistuke! I'm here to help you with any bugs, questions, or contributions you have for Superset. Let's tackle this together!

The issue you're encountering is due to the GLOBAL_ASYNC_QUERIES_CACHE_BACKEND configuration not passing the CACHE_REDIS_USER parameter to the Redis client, which is necessary for secure username/password authentication. This change occurred when GLOBAL_ASYNC_QUERIES_REDIS_CONFIG was removed in favor of the new configuration, which does not support passing the username directly to the Redis client [1][2].

To address this, you might consider modifying the cache_backend.py file to include the CACHE_REDIS_USER parameter when instantiating the Redis client. This would involve updating the instantiation logic to pass the username along with other connection parameters. Alternatively, you could explore using a custom configuration or patch to reintroduce the ability to pass additional keyword arguments, including the username, to the Redis client.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other

@dosubot dosubot bot added the global:async-query Related to Async Queries feature label Feb 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
global:async-query Related to Async Queries feature
Projects
None yet
Development

No branches or pull requests

1 participant