-
Notifications
You must be signed in to change notification settings - Fork 14k
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
feat: add new cache_query_by_user key #23415
feat: add new cache_query_by_user key #23415
Conversation
36b2baa
to
fb317f4
Compare
fb317f4
to
e83961f
Compare
Codecov Report
@@ Coverage Diff @@
## master #23415 +/- ##
==========================================
+ Coverage 65.96% 67.61% +1.65%
==========================================
Files 1907 1907
Lines 73590 73594 +4
Branches 7982 7982
==========================================
+ Hits 48546 49763 +1217
+ Misses 22996 21783 -1213
Partials 2048 2048
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 89 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! I left a few small nits, but this is good to go.
Co-authored-by: Beto Dealmeida <roberto@dealmeida.net>
Co-authored-by: Beto Dealmeida <roberto@dealmeida.net>
Co-authored-by: Beto Dealmeida <roberto@dealmeida.net> (cherry picked from commit b021f6e)
SUMMARY
We'd like to use this feature from #20114 for the use case where someone doesn't have user impersonation on for the database, but still wants to create different cache keys in Superset for each user. I believe that some users prefer to use their database for RLS, but this will enable them to use the Superset RLS instead.
I thought about adapting with the existing key, but I didn't want to change any functionality, so instead I created a new key
CACHE_QUERY_BY_USER
TESTING INSTRUCTIONS
With the
CACHE_QUERY_BY_USER
flag on, run a query with two different users, with different superset rls permissions and you should get different cached results.ADDITIONAL INFORMATION