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: change database database selector #18609

Merged
merged 3 commits into from
Feb 8, 2022

Conversation

pkdotson
Copy link
Member

@pkdotson pkdotson commented Feb 8, 2022

SUMMARY

This pr fixes and issue where the database selector show an error toast when changing database. The issue come about when the params are undefined causing a method to error out.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

before

CleanShot.2022-02-07.at.14.11.58.mp4

after

Screen.Recording.2022-02-07.at.6.28.22.PM.mov

TESTING INSTRUCTIONS

Go to sqlab and click on database selector. It should not give you an error toast when changing database.

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 Feb 8, 2022

Codecov Report

Merging #18609 (146bfe5) into master (4e2bdd4) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #18609   +/-   ##
=======================================
  Coverage   66.30%   66.30%           
=======================================
  Files        1595     1595           
  Lines       62632    62632           
  Branches     6309     6309           
=======================================
  Hits        41529    41529           
  Misses      19453    19453           
  Partials     1650     1650           
Flag Coverage Δ
javascript 51.37% <100.00%> (ø)

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

Impacted Files Coverage Δ
superset-frontend/src/SqlLab/actions/sqlLab.js 60.39% <100.00%> (ø)

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 4e2bdd4...146bfe5. Read the comment docs.

@geido
Copy link
Member

geido commented Feb 8, 2022

/testenv up

@github-actions
Copy link
Contributor

github-actions bot commented Feb 8, 2022

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

@AAfghahi AAfghahi merged commit 9c08bc0 into apache:master Feb 8, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Feb 8, 2022

Ephemeral environment shutdown and build artifacts deleted.

@rosemarie-chiu
Copy link
Contributor

🏷 preset:2022.5

sadpandajoe pushed a commit to preset-io/superset that referenced this pull request Feb 8, 2022
* fix: change database selector

* fix lint

(cherry picked from commit 9c08bc0)
ofekisr pushed a commit to nielsen-oss/superset that referenced this pull request Feb 8, 2022
* fix: change database selector

* fix lint
dispatch({
type: QUERY_EDITOR_SET_SCHEMA,
queryEditor: queryEditor || {},
schema: schema || {},
Copy link
Member

Choose a reason for hiding this comment

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

@pkdotson or @hughhhh this seems wrong, i.e., schema is a nullable string and not an object. We're seeing SQL Lab errors when you switch databases and run a query without selecting a schema.

Should this be schema: schema || null or schema: schema || undefined?

Copy link
Member

Choose a reason for hiding this comment

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

@john-bodley you're right - here's the fix: #19664 (caught during testing of 1.5)

@villebro villebro deleted the fix-change-database branch April 12, 2022 11:36
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 1.5.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:2022.5 preset-io size/XS 🚢 1.5.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants