-
Notifications
You must be signed in to change notification settings - Fork 14.3k
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
feature: Adding extra_filters to warm_up_cache #10675
feature: Adding extra_filters to warm_up_cache #10675
Conversation
@@ -1437,6 +1437,7 @@ def warm_up_cache( # pylint: disable=too-many-locals,no-self-use | |||
dashboard_id = request.args.get("dashboard_id") | |||
table_name = request.args.get("table_name") | |||
db_name = request.args.get("db_name") | |||
extra_filters = request.args.get("extra_filters") |
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.
it would be great if you could add comment section on how would it be possible to fetch extra_filters for the dashboards / charts
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.
nice feature !
tests/core_tests.py
Outdated
[{"slice_id": slc.id, "viz_error": None, "viz_status": "success"}], | ||
) | ||
|
||
self.assertEqual( |
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.
use assert == as per pytest convention
5df3435
to
f5a2fac
Compare
f5a2fac
to
24bbafa
Compare
Co-authored-by: John Bodley <[email protected]>
Co-authored-by: John Bodley <[email protected]>
Roadmap: apache-superset/superset-roadmap#74 |
SUMMARY
At Airbnb on a nightly basis we warm up recently consumed dashboard slices, which adheres to the default dashboard filters (if applicable). We carried out an analysis which modeled how various factored contributed to the cache hit rate and cache efficiency rate, i.e., what proportion of pre-warmed payloads were actually consumed.
A clear mechanism for increasing the cache hit rate seems to be to warm up dashboard slices with specified filters (and not simply rely on the default) based on event logs (which were fixed in #10197). This PR provides a mechanism for providing the dashboard filters (which materialize as
extra_filters
in the form-data). If not specified it falls back to using the default dashboard filters which is the current logic.BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
TEST PLAN
CI and added unit tests.
ADDITIONAL INFORMATION