-
Notifications
You must be signed in to change notification settings - Fork 13.9k
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
Fix 1325: Slice Cache Timeout Setting Ignored in 0.11.0 #1372
Fix 1325: Slice Cache Timeout Setting Ignored in 0.11.0 #1372
Conversation
@@ -1171,6 +1171,9 @@ def get_viz( | |||
args=None, | |||
datasource_type=None, | |||
datasource_id=None): | |||
|
|||
slice_id = slice_id or request.args.get('slice_id') |
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.
we should keep request
out of models.py
and only in views.py
, this logic belongs in methods that call this method.
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's confusing but there's both a get_viz
method in views.py
and on everything that inherits from BaseViz
in viz.py
. This method is in the former, otherwise the request
object wouldn't even be in scope. I did originally have this just using the args
object that's passed in, but it seemed to break a number of the callers in odd ways I wasn't super keen to debug at the time. Will dig out that branch tonight…
Waiting for Travis to confirm but it looks like my testing without a direct line into the |
Should be fixed in master |
Fixes #1325
RE: 308f6da, I think that save test passed because
request.args
contained "Slice Name", but there was no persistence of the Slice to the database; I'm not sure whether this was intended or not. As far as I could tell there was no code inviews.py
to handle theaction=save
query param.This also caused the Cache Warm Up test to fail, since it's tied to DB state affected by the Slice Save test.