Skip to content
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

[cache] Ensuring that the datasource UID is defined #4573

Merged

Conversation

john-bodley
Copy link
Member

@mistercrunch whist testing in production we noticed that we were getting cache key misses as it turned out the form data from the warm_up_cache API endpoint lacked the datasource value which is defined as the UID.

superset/viz.py Outdated
cache_dict[k] = self.form_data.get(k)

cache_dict['datasource'] = self.form_data.get(
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mistercrunch I don't know if this should simply be cache_dict['datasource'] = self.datasource.uid instead.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

either should work, but cache_dict['datasource'] = self.datasource.uid is simpler

@codecov-io
Copy link

codecov-io commented Mar 8, 2018

Codecov Report

Merging #4573 into master will increase coverage by <.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #4573      +/-   ##
==========================================
+ Coverage   71.18%   71.18%   +<.01%     
==========================================
  Files         189      189              
  Lines       14845    14846       +1     
  Branches     1086     1086              
==========================================
+ Hits        10567    10568       +1     
  Misses       4275     4275              
  Partials        3        3
Impacted Files Coverage Δ
superset/viz.py 78.46% <ø> (+0.01%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2bc089e...26257d9. Read the comment docs.

@john-bodley john-bodley force-pushed the john-bodley-cache-fix-datasource-uid branch from 621db52 to 26257d9 Compare March 12, 2018 16:49
@michellethomas
Copy link
Contributor

lgtm

@john-bodley john-bodley merged commit de44098 into apache:master Mar 13, 2018
john-bodley added a commit to john-bodley/superset that referenced this pull request Mar 13, 2018
…-datasource-uid

[cache] Ensuring that the datasource UID is defined
(cherry picked from commit de44098)
wenchma pushed a commit to wenchma/incubator-superset that referenced this pull request Nov 16, 2018
…-datasource-uid

[cache] Ensuring that the datasource UID is defined
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants