This is an automated email from the ASF dual-hosted git repository.

michaelsmolina pushed a commit to branch 5.0
in repository https://gitbox.apache.org/repos/asf/superset.git

commit 56f6e1196c0d9c8caa5cf8a6e1c8b775b2bf0c8d
Author: Đỗ Trọng Hải <[email protected]>
AuthorDate: Fri Mar 28 09:39:05 2025 +0700

    fix(backend/async_events): allow user to configure username for Redis 
authentication in GLOBAL_ASYNC_QUERIES_CACHE_BACKEND (#32372)
    
    Signed-off-by: hainenber <[email protected]>
    Co-authored-by: Ville Brofeldt <[email protected]>
    (cherry picked from commit e0ed652ed8ddae84a8c306014b40acf605226741)
---
 superset/async_events/cache_backend.py | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/superset/async_events/cache_backend.py 
b/superset/async_events/cache_backend.py
index 15887e47ab..9158e2d119 100644
--- a/superset/async_events/cache_backend.py
+++ b/superset/async_events/cache_backend.py
@@ -95,6 +95,11 @@ class RedisCacheBackend(RedisCache):
             "ssl_cert_reqs": config.get("CACHE_REDIS_SSL_CERT_REQS", 
"required"),
             "ssl_ca_certs": config.get("CACHE_REDIS_SSL_CA_CERTS", None),
         }
+
+        # Handle username separately as it's optional for Redis authentication.
+        if configured_username := config.get("CACHE_REDIS_USER"):
+            kwargs["username"] = configured_username
+
         return cls(**kwargs)
 
 

Reply via email to