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): dedupe table_schemas in active_tab #23514

Merged
merged 3 commits into from
Mar 31, 2023

Conversation

justinpark
Copy link
Member

@justinpark justinpark commented Mar 28, 2023

SUMMARY

Addition to #23265 fix
When SQLLAB_BACKEND_PERSISTENCE has been deactivated after activated, active_tab will be provided during localstorage persistence mode.
This causes the appending duplicated table_schemas value every time page is loaded. (This causes the increasing localStorage size)
This commit adds the dedupe logic to clean up the duplicated values.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

After:
Superset

Before:
Screenshot_2023-03-27_at_4_31_59_PM

TESTING INSTRUCTIONS

set SQLLAB_BACKEND_PERSISTENCE on and open SqlLab
select one table to fetch the table schema info
disable SQLLAB_BACKEND_PERSISTENCE and open SqlLab
keep refresh the page and then check the redux value in the local storage

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

@michael-s-molina @ktmud

@codecov
Copy link

codecov bot commented Mar 28, 2023

Codecov Report

Merging #23514 (bbbbef1) into master (21578f7) will increase coverage by 0.03%.
The diff coverage is 50.00%.

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

@@            Coverage Diff             @@
##           master   #23514      +/-   ##
==========================================
+ Coverage   67.63%   67.67%   +0.03%     
==========================================
  Files        1910     1910              
  Lines       73746    73745       -1     
  Branches     7987     7987              
==========================================
+ Hits        49876    49904      +28     
+ Misses      21829    21800      -29     
  Partials     2041     2041              
Flag Coverage Δ
javascript 53.88% <50.00%> (+0.03%) ⬆️

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

Impacted Files Coverage Δ
...t-ui-chart-controls/src/shared-controls/mixins.tsx 16.66% <ø> (ø)
...s/superset-ui-core/src/components/SafeMarkdown.tsx 66.66% <ø> (ø)
...plugins/legacy-plugin-chart-heatmap/src/Heatmap.js 0.00% <0.00%> (ø)
.../src/explore/components/ControlPanelsContainer.tsx 69.76% <0.00%> (ø)
...et-frontend/src/SqlLab/reducers/getInitialState.js 90.62% <100.00%> (+40.62%) ⬆️

... and 5 files with indirect coverage changes

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

@tang350476527
Copy link

tang350476527 commented Mar 28, 2023 via email

Copy link
Member

@Antonio-RiveroMartnez Antonio-RiveroMartnez left a comment

Choose a reason for hiding this comment

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

LGTM!

@justinpark justinpark merged commit b52efe0 into apache:master Mar 31, 2023
@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 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/M 🚢 3.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants