younsl commented on PR #440:
URL: 
https://github.com/apache/superset-kubernetes-operator/pull/440#issuecomment-6180320361

   Sounds good, thanks! While checking this, I also saw the coordination 
backend fall back to localhost:6379 on 7.0.0rc1, and I see #341 already fixes 
that.
   
   <details>
   <summary>What I found</summary>
   
   Superset builds the coordination client with RedisCacheBackend.from_config, 
which reads only the separate CACHE_REDIS_HOST, CACHE_REDIS_PORT, 
CACHE_REDIS_DB, CACHE_REDIS_PASSWORD, and CACHE_REDIS_SSL keys. It ignores 
CACHE_REDIS_URL and CACHE_OPTIONS:
   
   - 
[superset/utils/cache_manager.py#L261-L270](https://github.com/apache/superset/blob/be7657e91b79f9469607669a84d980d4971e4cf2/superset/utils/cache_manager.py#L261-L270)
 (7.0.0rc1): DISTRIBUTED_COORDINATION_CONFIG is passed to from_config
   - 
[superset/coordination/cache_backend.py#L239-L262](https://github.com/apache/superset/blob/be7657e91b79f9469607669a84d980d4971e4cf2/superset/coordination/cache_backend.py#L239-L262)
 (7.0.0rc1): from_config reads the separate keys and defaults host to localhost
   
   The operator renders DISTRIBUTED_COORDINATION_CONFIG with only 
CACHE_REDIS_URL, so the client falls back to those defaults:
   
   - 
[internal/config/renderer.go#L291-L307](https://github.com/apache/superset-kubernetes-operator/blob/fa5b952d9e37ea016616ae76451020fdfca15d85/internal/config/renderer.go#L291-L307):
 the coordination section shares the Flask-Caching renderer and gets only 
CACHE_REDIS_URL
   
   The same from_config logic is in 6.1.0 and master.
   
   I checked it on Kind with a 7.0.0rc1 deployment from the 0.3.0 operator 
(plain Valkey, no TLS):
   
   ```
   DCC: {'CACHE_TYPE': 'RedisCache', 'CACHE_DEFAULT_TIMEOUT': 300, 
'CACHE_KEY_PREFIX': 'superset-dev_coordination_', 'CACHE_REDIS_URL': 
'redis://:***@valkey:6379/7'}
   backend: RedisCacheBackend
   conn kwargs: {'db': 0, 'host': 'localhost', 'port': 6379}
   ping error: ConnectionError Error 111 connecting to localhost:6379. 
Connection refused.
   ```
   
   The Celery fix in this PR doesn't change this, because from_config also 
ignores the CACHE_OPTIONS that it now adds to the coordination section.
   
   </details>
   


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