villebro opened a new issue, #45491:
URL: https://github.com/apache/superset/issues/45491

   ### Bug description
   
   With `DISTRIBUTED_COORDINATION_CONFIG` on Sentinel (`CACHE_TYPE: 
RedisSentinelCache`), the coordination backend ignores `CACHE_REDIS_DB` and 
`CACHE_REDIS_USER`:
   
   - coordination keys (GTF state, locks) land in DB 0 instead of the 
configured DB;
   - an ACL username can't be used, so the connection authenticates as the 
default user.
   
   Realtime pub/sub is unaffected, because pub/sub isn't scoped by DB.
   
   `RedisSentinelCacheBackend` (`superset/coordination/cache_backend.py`) runs 
every coordination command through a client created with 
`self._sentinel.master_for(master, **master_kwargs)`. `master_kwargs` carries 
`password`, SSL options, timeouts and `protocol`, but not `db` or `username`. 
`db` is only passed to the flask-caching parent constructor, whose clients the 
coordination mixin doesn't use. `from_config` never reads `CACHE_REDIS_USER`, 
unlike `RedisCacheBackend.from_config`.
   
   **How to reproduce**
   
   1. Configure `DISTRIBUTED_COORDINATION_CONFIG` with `CACHE_TYPE: 
RedisSentinelCache`, `CACHE_REDIS_DB: 7` and an ACL user in `CACHE_REDIS_USER` 
that only has access to DB 7's keys.
   2. Run a GTF task or anything that takes a coordination lock.
   3. Coordination keys appear in DB 0, and the ACL user is not used.
   
   **Expected behavior**
   
   Coordination keys land in the configured DB and the configured ACL user is 
used for the connection to the master.
   
   ### Superset version
   
   master / latest-dev
   
   ### Python version
   
   3.11
   
   ### Node version
   
   Not applicable
   


-- 
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]

Reply via email to