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: only fetch db function when db exists in sql lab #16754

Merged

Conversation

eschutho
Copy link
Member

SUMMARY

When closing multiple tabs, there would sometimes be errors because we were fetching function names with a null db. This checks that the db is present before updating. If the db is not present, the function names will fetch on the left toolbar db change method.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

before:

CleanShot.2021-06-24.at.11.14.59.mov

TESTING INSTRUCTIONS

save a query, copy it and open it in a window. Open a bunch of saved queries so that you have about 4 tabs loading all at once on a page load, then close them one by one. There should be no errors, and your database should update.

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 Sep 21, 2021

Codecov Report

Merging #16754 (2837596) into master (b92358b) will decrease coverage by 0.00%.
The diff coverage is 75.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #16754      +/-   ##
==========================================
- Coverage   76.98%   76.98%   -0.01%     
==========================================
  Files        1007     1007              
  Lines       54174    54175       +1     
  Branches     7463     7464       +1     
==========================================
- Hits        41708    41704       -4     
- Misses      12226    12231       +5     
  Partials      240      240              
Flag Coverage Δ
javascript 71.28% <75.00%> (-0.02%) ⬇️

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

Impacted Files Coverage Δ
...rontend/src/SqlLab/components/ShareSqlLabQuery.tsx 88.37% <ø> (ø)
...rontend/src/SqlLab/components/AceEditorWrapper.tsx 58.75% <75.00%> (-0.75%) ⬇️
superset-frontend/src/SqlLab/actions/sqlLab.js 58.19% <0.00%> (-0.82%) ⬇️

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 b92358b...2837596. Read the comment docs.

@yousoph
Copy link
Member

yousoph commented Sep 21, 2021

/testenv up

@github-actions
Copy link
Contributor

@yousoph Ephemeral environment spinning up at http://54.213.51.202:8080. Credentials are admin/admin. Please allow several minutes for bootstrapping and startup.

@eschutho eschutho merged commit d375538 into apache:master Sep 21, 2021
@github-actions
Copy link
Contributor

Ephemeral environment shutdown and build artifacts deleted.

@eschutho eschutho deleted the elizabeth/fix-error-on-sql-lab-tab-close branch September 21, 2021 18:16
@rosemarie-chiu
Copy link
Contributor

🏷 2021.38

stevenuray pushed a commit to preset-io/superset that referenced this pull request Sep 22, 2021
opus-42 pushed a commit to opus-42/incubator-superset that referenced this pull request Nov 14, 2021
QAlexBall pushed a commit to QAlexBall/superset that referenced this pull request Dec 28, 2021
@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 preset:2021.38 preset-io size/M 🚢 1.4.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants