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: duplicate DB names #15614

Merged
merged 1 commit into from
Jul 12, 2021
Merged

Conversation

betodealmeida
Copy link
Member

SUMMARY

Fix the DB name selector by using name as the key, since it's unique. The key we're using, engine, is not unique, since multiple DBs can use the same engine — Apache Spark SQL and Apache Hive both use hive as their engine, eg.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Before:

Screen Shot 2021-07-08 at 9 57 36 PM

After:

Screen Shot 2021-07-08 at 9 56 24 PM

TESTING INSTRUCTIONS

ADDITIONAL INFORMATION

  • Has associated issue:
  • 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

@@ -25,6 +25,7 @@ export type DatabaseObject = {
// Connection + general
id?: number;
database_name: string;
name: string; // synonym to database_name
Copy link
Member Author

@betodealmeida betodealmeida Jul 9, 2021

Choose a reason for hiding this comment

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

We're setting name instead of database_name somewhere, so I had to add the property here. This is just a quick fix, ideally we should fix the code that sets name and make it set database_name instead.

@codecov
Copy link

codecov bot commented Jul 9, 2021

Codecov Report

Merging #15614 (b48de28) into master (1d572ca) will decrease coverage by 0.08%.
The diff coverage is 50.00%.

❗ Current head b48de28 differs from pull request most recent head 5c7bbcb. Consider uploading reports for the commit 5c7bbcb to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master   #15614      +/-   ##
==========================================
- Coverage   76.95%   76.87%   -0.09%     
==========================================
  Files         976      976              
  Lines       51324    51324              
  Branches     6910     6910              
==========================================
- Hits        39497    39455      -42     
- Misses      11608    11650      +42     
  Partials      219      219              
Flag Coverage Δ
javascript 71.40% <50.00%> (-0.02%) ⬇️
presto ?

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

Impacted Files Coverage Δ
...ntend/src/views/CRUD/annotation/AnnotationList.tsx 76.92% <ø> (ø)
...set-frontend/src/views/CRUD/data/database/types.ts 100.00% <ø> (ø)
...tend/src/views/CRUD/annotation/AnnotationModal.tsx 60.74% <14.28%> (-2.23%) ⬇️
...c/views/CRUD/data/database/DatabaseModal/index.tsx 47.86% <100.00%> (ø)
superset/db_engine_specs/presto.py 84.42% <0.00%> (-5.48%) ⬇️
superset/connectors/sqla/models.py 88.49% <0.00%> (-1.41%) ⬇️
superset/models/core.py 89.76% <0.00%> (-0.27%) ⬇️

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 1d572ca...5c7bbcb. Read the comment docs.

@betodealmeida
Copy link
Member Author

/testenv up

@github-actions
Copy link
Contributor

github-actions bot commented Jul 9, 2021

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

@hughhhh hughhhh merged commit 5d86ffe into apache:master Jul 12, 2021
@github-actions
Copy link
Contributor

Ephemeral environment shutdown and build artifacts deleted.

@rosemarie-chiu
Copy link
Contributor

🏷 2021.27

henryyeh pushed a commit to preset-io/superset that referenced this pull request Jul 13, 2021
cccs-RyanS pushed a commit to CybercentreCanada/superset that referenced this pull request Dec 17, 2021
QAlexBall pushed a commit to QAlexBall/superset that referenced this pull request Dec 29, 2021
cccs-rc pushed a commit to CybercentreCanada/superset that referenced this pull request Mar 6, 2024
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 1.3.0 labels Mar 12, 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.27 size/S 🚢 1.3.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants