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: SQL Lab UI Error: Objects are not valid as a React child #19783

Conversation

diegomedina248
Copy link
Contributor

SUMMARY

When the query result doesn't have any information nor is it stored in the api, the resultsKey returns null (as expected) and the query table in the SQL Lab crashes.

This PR renders a placeholder in that case to prevent it, since if the query failed, there's nothing to display in the "results" column.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Before:

164038206-370664ac-96b6-4329-a76e-8c2fcb0e2b06.mov

After:

Screen.Recording.2022-04-19.at.17.25.37.mov

TESTING INSTRUCTIONS

Follow the instructions from #19746

ADDITIONAL INFORMATION

Fixes #19746

  • 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

@codecov
Copy link

codecov bot commented Apr 19, 2022

Codecov Report

Merging #19783 (8d73dc6) into master (6f4480a) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master   #19783   +/-   ##
=======================================
  Coverage   66.51%   66.51%           
=======================================
  Files        1690     1690           
  Lines       64616    64615    -1     
  Branches     6656     6655    -1     
=======================================
+ Hits        42978    42979    +1     
+ Misses      19937    19936    -1     
+ Partials     1701     1700    -1     
Flag Coverage Δ
javascript 51.19% <100.00%> (+<0.01%) ⬆️

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

Impacted Files Coverage Δ
...rontend/src/SqlLab/components/QueryTable/index.tsx 70.17% <100.00%> (+0.53%) ⬆️
superset-frontend/src/utils/urlUtils.ts 46.93% <0.00%> (ø)
...dashboard/components/SliceHeaderControls/index.tsx 66.66% <0.00%> (ø)
.../components/ExploreAdditionalActionsMenu/index.jsx 57.14% <0.00%> (ø)
...dashboard/components/menu/ShareMenuItems/index.tsx 90.00% <0.00%> (+8.18%) ⬆️

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 6f4480a...8d73dc6. 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.

LGTM!

@villebro villebro merged commit dfba9ea into apache:master Apr 20, 2022
villebro pushed a commit that referenced this pull request Apr 25, 2022
hughhhh pushed a commit to hve-labs/superset that referenced this pull request May 11, 2022
philipher29 pushed a commit to ValtechMobility/superset that referenced this pull request Jun 9, 2022
@mistercrunch mistercrunch added 🍒 1.5.0 🍒 1.5.1 🍒 1.5.2 🍒 1.5.3 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 2.0.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 lts-v1 Preset-Patch size/XS 🍒 1.5.0 🍒 1.5.1 🍒 1.5.2 🍒 1.5.3 🚢 2.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SQL Lab UI Error: Objects are not valid as a React child
4 participants