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

chore(sqllab): Relocate get bootstrap data logic #24936

Merged

Conversation

justinpark
Copy link
Member

SUMMARY

Part 1 of SQLLab SPA migration: detail link

This commit relocates the existing _get_sqllab_tabs to the utils in sqllab in order to share the same logic in the sqllab api v1 endpoint.
This commit also refactors the defaultDBId by common config parameters which is less relevant to sqlLab root state.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

N/A

TESTING INSTRUCTIONS

Go to SQLLab and no errors shown

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

@justinpark
Copy link
Member Author

cc: @EugeneTorap

@codecov
Copy link

codecov bot commented Aug 9, 2023

Codecov Report

Merging #24936 (cd71be1) into master (3458664) will increase coverage by 0.00%.
Report is 2 commits behind head on master.
The diff coverage is 100.00%.

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

@@           Coverage Diff           @@
##           master   #24936   +/-   ##
=======================================
  Coverage   68.99%   69.00%           
=======================================
  Files        1906     1906           
  Lines       74139    74133    -6     
  Branches     8208     8211    +3     
=======================================
- Hits        51155    51153    -2     
+ Misses      20861    20856    -5     
- Partials     2123     2124    +1     
Flag Coverage Δ
javascript 55.84% <100.00%> (+0.01%) ⬆️

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

Files Changed Coverage Δ
...d/src/SqlLab/components/TabbedSqlEditors/index.jsx 50.00% <ø> (ø)
...et-frontend/src/SqlLab/reducers/getInitialState.js 91.66% <ø> (ø)
superset-frontend/src/dashboard/actions/hydrate.js 2.04% <ø> (ø)
...et-frontend/src/dashboard/components/SaveModal.tsx 39.28% <ø> (ø)
superset/databases/api.py 89.95% <ø> (ø)
superset/sqllab/utils.py 100.00% <ø> (ø)
superset/views/base.py 73.24% <ø> (ø)
superset/views/core.py 68.32% <ø> (-1.08%) ⬇️
superset-frontend/src/SqlLab/actions/sqlLab.js 69.70% <100.00%> (+0.08%) ⬆️
...set-frontend/src/dashboard/util/permissionUtils.ts 88.23% <100.00%> (+1.56%) ⬆️
... and 6 more

... and 1 file with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@justinpark justinpark force-pushed the chore--refactor-sqllab-bootstrap-data branch from 0a40017 to f5b4d48 Compare August 9, 2023 20:20
@justinpark justinpark requested a review from john-bodley August 9, 2023 22:26
@EugeneTorap
Copy link
Contributor

Hi @michael-s-molina @john-bodley @villebro! Can you help with this PR?

superset/sqllab/utils.py Outdated Show resolved Hide resolved
superset/sqllab/utils.py Outdated Show resolved Hide resolved
@michael-s-molina
Copy link
Member

michael-s-molina commented Aug 10, 2023

To fix the Python Misc CI error, you need to fix the order of the imports in these files:

  • superset/views/core.py
  • superset/tests/integration_tests/core_tests.py

To fix the import order, just run the pre-commit hook.

Copy link
Member

@michael-s-molina michael-s-molina left a comment

Choose a reason for hiding this comment

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

LGTM. Thank you @justinpark!

@EugeneTorap
Copy link
Contributor

Can we merge it?

@justinpark justinpark merged commit a44c998 into apache:master Aug 11, 2023
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 3.1.0 labels Mar 8, 2024
vinothkumar66 pushed a commit to vinothkumar66/superset that referenced this pull request Nov 11, 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/L 🚢 3.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants