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(explore): Don't run data panel query when control panel has errors #14687

Merged
merged 1 commit into from
May 27, 2021

Conversation

kgabryje
Copy link
Member

@kgabryje kgabryje commented May 18, 2021

SUMMARY

When a dataset doesn't have any saved metrics, the initial value of Metrics control is empty. There is a warning displayed in chart container, however data table(south) runs a query anyway. This PR fixes that behaviour - when control panel generates errors, they are passed down to data table(south) and displayed and no request to backend is sent.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Before:
image

After:
image

TEST PLAN

  1. Create a chart using a dataset with no saved metrics.
  2. Verify that data table(south) displays a warning message and doesn't send a request to the backend

ADDITIONAL INFORMATION

  • Has associated issue:
  • 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

CC: @junlincc @villebro

@junlincc
Copy link
Member

/testenv up

@codecov
Copy link

codecov bot commented May 18, 2021

Codecov Report

Merging #14687 (74613e8) into master (32f5f36) will decrease coverage by 0.00%.
The diff coverage is 16.66%.

❗ Current head 74613e8 differs from pull request most recent head aa8b18e. Consider uploading reports for the commit aa8b18e to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master   #14687      +/-   ##
==========================================
- Coverage   77.51%   77.50%   -0.01%     
==========================================
  Files         958      958              
  Lines       48560    48566       +6     
  Branches     5703     5705       +2     
==========================================
+ Hits        37642    37643       +1     
- Misses      10718    10723       +5     
  Partials      200      200              
Flag Coverage Δ
javascript 72.51% <16.66%> (-0.02%) ⬇️

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

Impacted Files Coverage Δ
...ntend/src/explore/components/ExploreChartPanel.jsx 17.14% <ø> (ø)
...nd/src/explore/components/DataTablesPane/index.tsx 83.90% <16.66%> (-4.99%) ⬇️

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 32f5f36...aa8b18e. Read the comment docs.

@github-actions
Copy link
Contributor

@junlincc Ephemeral environment spinning up at http://54.187.164.101:8080. Credentials are admin/admin. Please allow several minutes for bootstrapping and startup.

@kgabryje kgabryje closed this May 19, 2021
@kgabryje kgabryje reopened this May 19, 2021
@github-actions
Copy link
Contributor

Ephemeral environment shutdown and build artifacts deleted.

@suddjian
Copy link
Member

/testenv up

@github-actions
Copy link
Contributor

@suddjian Ephemeral environment spinning up at http://34.212.75.202:8080. Credentials are admin/admin. Please allow several minutes for bootstrapping and startup.

@@ -262,6 +282,9 @@ export const DataTablesPane = ({
/>
);
}
if (errorMessage) {
return <pre>{errorMessage}</pre>;
Copy link
Member

Choose a reason for hiding this comment

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

@kgabryje Can you replace, in this PR or in a follow up, both instances of <pre> with the Alert component just like the chart container?

Copy link
Member

@pkdotson pkdotson left a comment

Choose a reason for hiding this comment

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

LGTM!

@pkdotson pkdotson merged commit 281d637 into apache:master May 27, 2021
@github-actions
Copy link
Contributor

Ephemeral environment shutdown and build artifacts deleted.

cccs-RyanS pushed a commit to CybercentreCanada/superset that referenced this pull request Dec 17, 2021
QAlexBall pushed a commit to QAlexBall/superset that referenced this pull request Dec 29, 2021
cccs-rc pushed a commit to CybercentreCanada/superset that referenced this pull request Mar 6, 2024
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 1.3.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/S test:case 🚢 1.3.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants