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

feat: don't ask for password when DB exists #17776

Merged
merged 1 commit into from Dec 16, 2021

Conversation

betodealmeida
Copy link
Member

SUMMARY

When importing a dataset/chart/dashboard/saved query referencing databases that already exist, we shouldn't prompt for the password again.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Before, every time we import something that depends on a database with a password we would prompt the user for it.

After, we no longer prompt for the password.

TESTING INSTRUCTIONS

  1. Create a DB connection that has a password.
  2. Create a dataset and then a chart; export chart.
  3. Delete the chart and import it. It will import without prompting for the password.
  4. Delete everything and import the chart. It will prompt for the password before importing.

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 Dec 16, 2021

Codecov Report

Merging #17776 (09bd6ca) into master (82b47ca) will increase coverage by 0.06%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #17776      +/-   ##
==========================================
+ Coverage   67.71%   67.78%   +0.06%     
==========================================
  Files        1605     1605              
  Lines       64198    64205       +7     
  Branches     6790     6790              
==========================================
+ Hits        43474    43522      +48     
+ Misses      18868    18827      -41     
  Partials     1856     1856              
Flag Coverage Δ
hive 81.79% <100.00%> (-0.01%) ⬇️
mysql 82.17% <100.00%> (+<0.01%) ⬆️
postgres 82.22% <100.00%> (+<0.01%) ⬆️
presto 82.08% <100.00%> (?)
python 82.70% <100.00%> (+0.14%) ⬆️
sqlite 81.90% <100.00%> (+<0.01%) ⬆️

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

Impacted Files Coverage Δ
superset/charts/commands/importers/v1/__init__.py 100.00% <100.00%> (ø)
superset/databases/schemas.py 98.47% <100.00%> (+0.02%) ⬆️
superset/migrations/env.py 0.00% <0.00%> (ø)
superset/config.py 91.63% <0.00%> (+0.02%) ⬆️
superset/models/core.py 90.00% <0.00%> (+0.73%) ⬆️
superset/connectors/sqla/models.py 88.42% <0.00%> (+1.34%) ⬆️
superset/db_engine_specs/presto.py 89.97% <0.00%> (+5.63%) ⬆️

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 82b47ca...09bd6ca. Read the comment docs.

@@ -97,7 +97,7 @@ def _import(
)
config["params"].update({"datasource": dataset.uid})

if config["query_context"]:
if "query_context" in config:
Copy link
Member

Choose a reason for hiding this comment

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

thank you for this!

@betodealmeida betodealmeida merged commit 73ae892 into apache:master Dec 16, 2021
shcoderAlex pushed a commit to casual-precision/superset that referenced this pull request Feb 7, 2022
bwang221 pushed a commit to casual-precision/superset that referenced this pull request Feb 10, 2022
@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 size/S 🚢 1.5.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants