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): Remove table metadata from state #24371

Conversation

justinpark
Copy link
Member

SUMMARY

Similar to #23488, #23257 and #24082, this commit migrates the table metadata(and extra metadata) state from redux to rdk-query to reduce the complexity of the sqlLab state.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

After:

Screenshot 2023-06-12 at 4 18 37 PM

Before:

Screenshot 2023-06-12 at 5 37 10 PM

TESTING INSTRUCTIONS

Go to sqllab and select/remove table options from the left menu
check the table metadata including columns and indices

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 Jun 13, 2023

Codecov Report

Merging #24371 (dfac290) into master (62b4564) will increase coverage by 0.01%.
The diff coverage is 73.43%.

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

@@            Coverage Diff             @@
##           master   #24371      +/-   ##
==========================================
+ Coverage   68.98%   69.00%   +0.01%     
==========================================
  Files        1903     1903              
  Lines       74126    74154      +28     
  Branches     8110     8114       +4     
==========================================
+ Hits        51138    51168      +30     
- Misses      20876    20877       +1     
+ Partials     2112     2109       -3     
Flag Coverage Δ
javascript 55.66% <73.43%> (+0.03%) ⬆️

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

Impacted Files Coverage Δ
superset-frontend/src/SqlLab/App.jsx 0.00% <0.00%> (ø)
...d/src/SqlLab/components/AceEditorWrapper/index.tsx 67.07% <0.00%> (ø)
...frontend/src/SqlLab/components/SqlEditor/index.jsx 59.88% <ø> (ø)
...src/SqlLab/utils/reduxStateToLocalStorageHelper.js 80.00% <0.00%> (-20.00%) ⬇️
...perset-frontend/src/hooks/apiResources/queryApi.ts 100.00% <ø> (ø)
...d/src/SqlLab/components/SqlEditorLeftBar/index.tsx 62.12% <50.00%> (ø)
...ntend/src/SqlLab/components/TableElement/index.tsx 81.92% <73.07%> (+8.01%) ⬆️
superset-frontend/src/SqlLab/actions/sqlLab.js 69.89% <93.75%> (+0.45%) ⬆️
...et-frontend/src/SqlLab/reducers/getInitialState.js 91.66% <100.00%> (+1.04%) ⬆️
superset-frontend/src/hooks/apiResources/tables.ts 73.80% <100.00%> (+2.75%) ⬆️

... 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--sqllab-remove-table-metadata-from-state branch from cdde50b to 60fb700 Compare June 13, 2023 20:57
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 but it would be nice to have a second pair of eyes @eschutho @betodealmeida

@justinpark justinpark merged commit 51a34d7 into apache:master Jun 22, 2023
sadpandajoe added a commit to preset-io/superset that referenced this pull request Jul 6, 2023
sadpandajoe added a commit to preset-io/superset that referenced this pull request Jul 6, 2023
@sadpandajoe
Copy link
Member

Looks like this PR has a regression that affects auto-complete in sql lab if someone is using this feature.

@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 3.0.0 labels Mar 8, 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/XL 🚢 3.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants