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: use cache for csv download #17194

Merged
merged 2 commits into from Oct 25, 2021

Conversation

eschutho
Copy link
Member

@eschutho eschutho commented Oct 22, 2021

SUMMARY

Fixes the issue where csv download on explore is not returning the same result as the chart. The results and the full responses are keyed in cache differently. Since we want the csv to match the full results, I'm passing in the result type as full so that it pulls from the correct cache. There are more improvements that we can do later @villebro has a lot of ideas on how we can cache this better, but for now, this is a quick fix for this bug.

Screen.Recording.2021-10-22.at.5.34.51.PM.mov

TESTING INSTRUCTIONS

create a chart with some data, update the data, return to the chart and click to refresh the data. You'll likely see that the results and the chart data are different. Click to download a csv, and it should match the chart data.

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

@eschutho eschutho marked this pull request as draft October 22, 2021 01:05
@codecov
Copy link

codecov bot commented Oct 22, 2021

Codecov Report

Merging #17194 (45e6d48) into master (ef3afbd) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #17194   +/-   ##
=======================================
  Coverage   76.73%   76.73%           
=======================================
  Files        1039     1039           
  Lines       55587    55587           
  Branches     7580     7580           
=======================================
  Hits        42654    42654           
  Misses      12683    12683           
  Partials      250      250           
Flag Coverage Δ
javascript 70.99% <ø> (ø)

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

Impacted Files Coverage Δ
...nd/src/explore/components/ExploreActionButtons.tsx 71.73% <ø> (ø)

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 ef3afbd...45e6d48. Read the comment docs.

@eschutho eschutho changed the title [WIP] use cache for csv download fix: use cache for csv download Oct 23, 2021
@eschutho eschutho marked this pull request as ready for review October 23, 2021 00:28
@rosemarie-chiu
Copy link
Contributor

🏷 2021.42

Copy link
Member

@villebro villebro left a comment

Choose a reason for hiding this comment

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

Awesome one-liner @eschutho ! 🎉

@eschutho
Copy link
Member Author

Ha, thanks. I'll put up a follow up that will take care of the result set not matching and also the json. And will write some tests for them, too.

@eschutho eschutho merged commit 08aab3b into apache:master Oct 25, 2021
@sadpandajoe
Copy link
Contributor

🏷️ 2021.42

sadpandajoe pushed a commit to preset-io/superset that referenced this pull request Oct 25, 2021
@eschutho eschutho deleted the elizabeth/cache-for-csv branch December 2, 2021 18:06
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 1.5.0 labels Mar 13, 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 preset:2021.42 preset-io size/XS 🚢 1.5.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants