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

fix: revert eTag cache feature for dashboard #11203

Merged

Conversation

graceguo-supercat
Copy link

@graceguo-supercat graceguo-supercat commented Oct 8, 2020

SUMMARY

After enable eTag header for dashboard request (in airbnb), we found the cached content has user_id and dashboard edit permission, etc, user-specific data, is shared by all the users.

Need to revert this feature (with 2 PRs) by now. Possible fix could be separate dashboard bootstrap data in the future.

TEST PLAN

CI

ADDITIONAL INFORMATION

cc @ktmud @etr2460 @john-bodley

@codecov-io
Copy link

codecov-io commented Oct 8, 2020

Codecov Report

Merging #11203 into master will increase coverage by 0.02%.
The diff coverage is 73.07%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #11203      +/-   ##
==========================================
+ Coverage   65.60%   65.62%   +0.02%     
==========================================
  Files         828      828              
  Lines       39167    39148      -19     
  Branches     3589     3589              
==========================================
- Hits        25694    25690       -4     
+ Misses      13361    13347      -14     
+ Partials      112      111       -1     
Flag Coverage Δ
#cypress 55.87% <ø> (+0.42%) ⬆️
#javascript 62.30% <ø> (ø)
#python 61.01% <73.07%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
superset/config.py 90.07% <ø> (ø)
superset/utils/decorators.py 55.00% <60.00%> (+4.23%) ⬆️
superset/views/core.py 74.20% <72.22%> (-0.06%) ⬇️
superset/views/utils.py 82.68% <100.00%> (+<0.01%) ⬆️
...rontend/src/visualizations/FilterBox/FilterBox.jsx 56.17% <0.00%> (-9.88%) ⬇️
.../src/dashboard/components/gridComponents/Chart.jsx 83.67% <0.00%> (-2.05%) ⬇️
...t-frontend/src/dashboard/actions/dashboardState.js 50.32% <0.00%> (-1.31%) ⬇️
superset/models/dashboard.py 88.03% <0.00%> (-0.43%) ⬇️
...set/superset-frontend/src/SqlLab/actions/sqlLab.js 60.68% <0.00%> (+0.42%) ⬆️
...erset-frontend/src/components/DatabaseSelector.tsx 91.30% <0.00%> (+1.08%) ⬆️
... and 8 more

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 b6728d8...f98e4f9. Read the comment docs.

Copy link
Member

@etr2460 etr2460 left a comment

Choose a reason for hiding this comment

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

thanks for the revert! there's probably a way to surgically pull out some of @ktmud's change and leave it in, but it might be safer to just do the full revert here.

Copy link
Member

@ktmud ktmud left a comment

Choose a reason for hiding this comment

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

The changes should be safe to most Superset deployments because one needs to manually turn on the ENABLE_DASHBOARD_ETAG_HEADER feature for the code change to apply. But reverting is probably warranted since it's kind of expensive to have different ETag caches per user so maybe we can explore other paths to make the caching better for the dashboard page.

@graceguo-supercat
Copy link
Author

if you feel partial code is useful for something else, i suggest you create a new PR for the specific purpose.

@graceguo-supercat graceguo-supercat merged commit a10e86a into apache:master Oct 8, 2020
@ktmud ktmud mentioned this pull request Oct 12, 2020
6 tasks
auxten pushed a commit to auxten/incubator-superset that referenced this pull request Nov 20, 2020
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 1.0.0 labels Mar 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels size/L 🚢 1.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants