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): View result button is not showing consistently #20164

Conversation

diegomedina248
Copy link
Contributor

SUMMARY

In order to display the 'View' button in the history tab of the SQL Lab, the query must have a resultsKey.
When the query is executed in sync mode, that key was not properly propagated from the API to the FE, thus, the button did not appeared after execution.

The button did appeared once the running polling watching for queries updated, since that fetches fresh results from the api.

This PR forwards that key to make the button show for every successfully executed query.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Before:

160002524-d03da706-ab0a-4d6f-b404-639fc12d5a73.mov

After:

Screen.Recording.2022-05-23.at.18.52.14.mov

TESTING INSTRUCTIONS

  1. Configure a database for sync mode
  2. Run queries in SQL Lab in that database
  3. Check query history

Ensure that, if the queries are successful, the 'View' button always displays.
Ensure it works for both sync/async query execution flows.

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

@codecov
Copy link

codecov bot commented May 23, 2022

Codecov Report

Merging #20164 (3301cab) into master (22b7496) will decrease coverage by 0.00%.
The diff coverage is 0.00%.

❗ Current head 3301cab differs from pull request most recent head dfde3df. Consider uploading reports for the commit dfde3df to get more accurate results

@@            Coverage Diff             @@
##           master   #20164      +/-   ##
==========================================
- Coverage   66.44%   66.44%   -0.01%     
==========================================
  Files        1721     1721              
  Lines       64537    64538       +1     
  Branches     6811     6811              
==========================================
- Hits        42882    42881       -1     
- Misses      19922    19924       +2     
  Partials     1733     1733              
Flag Coverage Δ
hive 53.72% <0.00%> (-0.01%) ⬇️
mysql 82.14% <0.00%> (-0.01%) ⬇️
postgres 82.20% <0.00%> (-0.01%) ⬇️
presto 53.58% <0.00%> (-0.01%) ⬇️
python 82.62% <0.00%> (-0.01%) ⬇️
sqlite 81.94% <0.00%> (-0.01%) ⬇️
unit ?

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

Impacted Files Coverage Δ
...c/SqlLab/components/ExploreResultsButton/index.tsx 100.00% <ø> (ø)
superset-frontend/src/SqlLab/reducers/sqlLab.js 33.15% <0.00%> (ø)
superset/sql_lab.py 81.53% <0.00%> (-0.32%) ⬇️
superset/initialization/__init__.py 91.13% <0.00%> (-0.36%) ⬇️

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 22b7496...dfde3df. Read the comment docs.

@jinghua-qa
Copy link
Member

/testenv up

@github-actions
Copy link
Contributor

@jinghua-qa Ephemeral environment spinning up at http://34.221.127.135:8080. Credentials are admin/admin. Please allow several minutes for bootstrapping and startup.

Copy link
Member

@rusackas rusackas left a comment

Choose a reason for hiding this comment

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

Code LGTM. @jinghua-qa did you give this a test? If not, @yousoph and I can.

@jinghua-qa
Copy link
Member

Code LGTM. @jinghua-qa did you give this a test? If not, @yousoph and I can.

Andrey tested, good to merge

@rusackas rusackas merged commit 9205785 into apache:master Jun 3, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Jun 3, 2022

Ephemeral environment shutdown and build artifacts deleted.

philipher29 pushed a commit to ValtechMobility/superset that referenced this pull request Jun 9, 2022
@mistercrunch mistercrunch added 🏷️ 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 Preset-Patch size/XS 🚢 2.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants