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: dbmodal test connection error timeout #20068

Merged
merged 4 commits into from
May 17, 2022

Conversation

pkdotson
Copy link
Member

@pkdotson pkdotson commented May 14, 2022

SUMMARY

There was an issue where when testing the dbconnection string would not error out after the 30 second timeout because the checking of the connection would happen before the timeout is initiated. This pr solve that issue by ensuring that if error the timeout will be enforced.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

before

after
Screen Shot 2022-05-16 at 11 31 35 AM

TESTING INSTRUCTIONS

Go to db connection modal and input an expired db uri. Test the connection by pressing the test connection button and it should error out in ~30 seconds.

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 May 14, 2022

Codecov Report

Merging #20068 (51db23a) into master (c6dd7fe) will decrease coverage by 11.81%.
The diff coverage is 7.14%.

@@             Coverage Diff             @@
##           master   #20068       +/-   ##
===========================================
- Coverage   66.36%   54.55%   -11.82%     
===========================================
  Files        1715     1720        +5     
  Lines       64186    64383      +197     
  Branches     6753     6753               
===========================================
- Hits        42597    35123     -7474     
- Misses      19871    27542     +7671     
  Partials     1718     1718               
Flag Coverage Δ
hive 53.69% <7.14%> (+0.01%) ⬆️
mysql ?
postgres ?
presto 53.54% <7.14%> (+0.01%) ⬆️
python 57.98% <7.14%> (-24.52%) ⬇️
sqlite ?
unit 49.39% <7.14%> (+0.25%) ⬆️

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

Impacted Files Coverage Δ
superset/databases/commands/test_connection.py 32.43% <7.14%> (-67.57%) ⬇️
superset/utils/dashboard_import_export.py 0.00% <0.00%> (-100.00%) ⬇️
superset/key_value/commands/upsert.py 0.00% <0.00%> (-89.59%) ⬇️
superset/key_value/commands/update.py 0.00% <0.00%> (-89.37%) ⬇️
superset/key_value/commands/delete.py 0.00% <0.00%> (-85.30%) ⬇️
superset/key_value/commands/delete_expired.py 0.00% <0.00%> (-80.77%) ⬇️
superset/dashboards/commands/importers/v0.py 15.62% <0.00%> (-76.25%) ⬇️
superset/datasets/commands/update.py 25.88% <0.00%> (-68.24%) ⬇️
superset/datasets/commands/create.py 30.18% <0.00%> (-67.93%) ⬇️
superset/datasets/commands/importers/v0.py 24.03% <0.00%> (-67.45%) ⬇️
... and 282 more

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 c6dd7fe...51db23a. Read the comment docs.

@pkdotson pkdotson changed the title Fix: dbmodal test connection error timeout fix: dbmodal test connection error timeout May 14, 2022
Copy link
Member

@betodealmeida betodealmeida left a comment

Choose a reason for hiding this comment

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

Looks great!

@pkdotson pkdotson merged commit 5111011 into apache:master May 17, 2022
philipher29 pushed a commit to ValtechMobility/superset that referenced this pull request Jun 9, 2022
* fix: check for connect on ping

* clean up merge

* fix merge

* precommit
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 2.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 preset-io size/M 🚢 2.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants