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: Disable lazy loading for the Database selector #16908

Merged

Conversation

michael-s-molina
Copy link
Member

SUMMARY

Disables the lazy loading for the Database selector. Currently, the SQL Editor depends on some information that is only present when querying the databases like allows_virtual_table_explore. Since this information is not present anywhere, we need to force the query of the database selector when first loading the page.

@jinghua-qa

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Screen.Recording.2021-09-29.at.4.32.08.PM.mov
Screen.Recording.2021-09-29.at.4.29.34.PM.mov

TESTING INSTRUCTIONS

Check the videos for instructions.

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

@geido geido left a comment

Choose a reason for hiding this comment

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

LGTM. The tests need some love

@codecov
Copy link

codecov bot commented Sep 30, 2021

Codecov Report

Merging #16908 (fd08cf2) into master (4da4fe4) will increase coverage by 0.01%.
The diff coverage is 33.33%.

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

@@            Coverage Diff             @@
##           master   #16908      +/-   ##
==========================================
+ Coverage   77.02%   77.04%   +0.01%     
==========================================
  Files        1022     1021       -1     
  Lines       54857    54846      -11     
  Branches     7482     7481       -1     
==========================================
- Hits        42256    42255       -1     
+ Misses      12354    12345       -9     
+ Partials      247      246       -1     
Flag Coverage Δ
javascript 71.16% <20.00%> (+0.02%) ⬆️

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

Impacted Files Coverage Δ
...frontend/src/components/DatabaseSelector/index.tsx 95.00% <ø> (+2.50%) ⬆️
superset-frontend/src/views/CRUD/hooks.ts 47.23% <ø> (ø)
superset/datasets/commands/update.py 94.11% <ø> (ø)
superset/datasets/dao.py 96.50% <ø> (-0.12%) ⬇️
...erset-frontend/src/SqlLab/components/ResultSet.tsx 61.94% <20.00%> (-1.42%) ⬇️
superset/databases/api.py 93.00% <100.00%> (+0.04%) ⬆️
superset-frontend/src/SqlLab/actions/sqlLab.js 58.69% <0.00%> (+0.40%) ⬆️
...rontend/src/SqlLab/components/SqlEditorLeftBar.jsx 58.20% <0.00%> (+2.98%) ⬆️

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 4da4fe4...5ac3781. Read the comment docs.

@michael-s-molina michael-s-molina merged commit ae26967 into apache:master Sep 30, 2021
opus-42 pushed a commit to opus-42/incubator-superset that referenced this pull request Nov 14, 2021
* fix: Disable lazy loading for the Database selector

* Fixes the tests
QAlexBall pushed a commit to QAlexBall/superset that referenced this pull request Dec 28, 2021
* fix: Disable lazy loading for the Database selector

* Fixes the tests
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 1.4.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 size/XS 🚢 1.4.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants