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(sqllab): invalid table metadata request #21304

Conversation

justinpark
Copy link
Member

@justinpark justinpark commented Sep 1, 2022

SUMMARY

This is a hotfix for #21298
TableSelector didn't get the database selection from unsaved changes, so the table metadata fetches with old dbId.
This commit updates the addTable action to sync the queryEditor from unsaved changes.
This commit also sync schema data in SqlEditorLeftBar and reset unsaved changes on closing a tab.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

N/A

TESTING INSTRUCTIONS

  • Go to SqlLab
  • Choose a schema and a table
  • verify the table schema fetched accordingly
  • change other database option (to make unsaved changes)
  • Choose a schema and a table
  • verify the table schema fetched accordingly

ADDITIONAL INFORMATION

  • Has associated issue: perf(sqllab): Rendering perf improvement using immutable state #20877
  • 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

cc: @hughhhh @ktmud @EugeneTorap

@codecov
Copy link

codecov bot commented Sep 1, 2022

Codecov Report

Merging #21304 (3371f3d) into master (65a11b6) will increase coverage by 0.00%.
The diff coverage is 75.00%.

❗ Current head 3371f3d differs from pull request most recent head 361a12d. Consider uploading reports for the commit 361a12d to get more accurate results

@@           Coverage Diff           @@
##           master   #21304   +/-   ##
=======================================
  Coverage   66.43%   66.43%           
=======================================
  Files        1788     1788           
  Lines       68268    68276    +8     
  Branches     7269     7271    +2     
=======================================
+ Hits        45352    45358    +6     
- Misses      21043    21045    +2     
  Partials     1873     1873           
Flag Coverage Δ
javascript 52.47% <75.00%> (+<0.01%) ⬆️

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

Impacted Files Coverage Δ
...d/src/SqlLab/components/TabbedSqlEditors/index.jsx 54.23% <0.00%> (-0.94%) ⬇️
...ntend/src/SqlLab/components/TableElement/index.tsx 72.30% <ø> (ø)
superset-frontend/src/SqlLab/reducers/sqlLab.js 35.22% <75.00%> (+0.37%) ⬆️
superset-frontend/src/SqlLab/actions/sqlLab.js 61.15% <100.00%> (+0.10%) ⬆️
...d/src/SqlLab/components/SqlEditorLeftBar/index.tsx 52.85% <100.00%> (+2.85%) ⬆️

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

@john-bodley john-bodley merged commit 222f1e7 into apache:master Sep 1, 2022
justinpark added a commit to airbnb/superset-fork that referenced this pull request Sep 1, 2022
justinpark added a commit to airbnb/superset-fork that referenced this pull request Sep 16, 2022
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 2.1.0 and removed 🚢 2.1.3 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/L 🚢 2.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants