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 full resultType with csv download on chart in dashboard #17431

Merged
merged 1 commit into from
Nov 15, 2021

Conversation

eschutho
Copy link
Member

SUMMARY

Use the full resultType when downloading a csv so that it takes the same cache key as the chart itself. See #17194

This fixes a bug where if you refreshed cache and then downloaded a csv from a dashboard, the csv results would be different than the chart.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

After:

Screen.Recording.2021-11-12.at.5.34.31.PM.mov

TESTING INSTRUCTIONS

We should also test to see that the full csv report download has a row limit.

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

Copy link
Member

@betodealmeida betodealmeida left a comment

Choose a reason for hiding this comment

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

LGTM

@codecov
Copy link

codecov bot commented Nov 13, 2021

Codecov Report

Merging #17431 (f54f893) into master (aa8040e) will decrease coverage by 0.00%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #17431      +/-   ##
==========================================
- Coverage   77.04%   77.03%   -0.01%     
==========================================
  Files        1041     1041              
  Lines       56079    56079              
  Branches     7742     7742              
==========================================
- Hits        43204    43203       -1     
- Misses      12617    12618       +1     
  Partials      258      258              
Flag Coverage Δ
javascript 71.22% <ø> (-0.01%) ⬇️

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

Impacted Files Coverage Δ
.../src/dashboard/components/gridComponents/Chart.jsx 78.37% <ø> (ø)
...eFilters/FiltersConfigModal/FiltersConfigModal.tsx 87.13% <0.00%> (-0.59%) ⬇️

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 aa8040e...f54f893. Read the comment docs.

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.

As a follow-up, we should probably reconsider if resultType should be part of the cache key at all. Potentially we should always cache the full payload, and then only return subsets of if depending on what data the request is expecting.

@eschutho eschutho merged commit 71e3fa1 into apache:master Nov 15, 2021
@eschutho eschutho deleted the elizabeth/fix-cache-chart-list branch November 15, 2021 17:57
@eschutho eschutho added the v1.4 label Nov 22, 2021
eschutho added a commit that referenced this pull request Dec 6, 2021
@mistercrunch mistercrunch added 🍒 1.4.0 🍒 1.4.1 🍒 1.4.2 🏷️ 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-io size/XS v1.4 🍒 1.4.0 🍒 1.4.1 🍒 1.4.2 🚢 1.5.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants