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

   ### Bug description
   
   The hability to specify a function as a key_prefix for RedisCache doesn't 
work anymore in Superset.
   `Expected type 'str', got '() -> str' instead` error is thrown.
   
   This was fundamental for my usecase where I use the subdomain of the 
Superset URL as an ingredient of my PostgreSQL RLS.
   Each subdomain correspond to a subset of the data that users may query 
through Superset (only one instance).
   
   Introducing the notion of subdomain in the Redis cache key prefix avoids a 
cache mismatch between subdomains and data subsets.
   It's implemented with a function parametrized in RedisCache key_prefix.
   
   I submitted a PR in the concerned lib project : pallets-eco/cachelib#332.
   
   ### How to reproduce the bug
   
   1. Create a simple function returning a string.
   2. Parameter this function in the RedisCache key_prefix.
   3. Display in Superset anything related to your data that will be cached to 
throw the error.
   
   ### Screenshots/recordings
   
   _No response_
   
   ### Superset version
   
   3.0.3
   
   ### Python version
   
   3.11
   
   ### Node version
   
   Not applicable
   
   ### Browser
   
   Not applicable
   
   ### Additional context
   
   `Expected type 'str', got '() -> str'
   
   ### Checklist
   
   - [X] I have searched Superset docs and Slack and didn't find a solution to 
my problem.
   - [X] I have searched the GitHub issue tracker and didn't find a similar bug 
report.
   - [X] 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.


-- 
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: notifications-unsubscr...@superset.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org

Reply via email to