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: error messages when connecting to MSSQL #14093

Merged
merged 2 commits into from
Apr 14, 2021

Conversation

betodealmeida
Copy link
Member

SUMMARY

Add better error messages when connecting to MSSQL.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Screen Shot 2021-04-12 at 6 49 48 PM

Screen Shot 2021-04-12 at 6 49 40 PM

Screen Shot 2021-04-12 at 6 49 05 PM

Screen Shot 2021-04-12 at 6 40 59 PM

TEST PLAN

Added unit tests and tested locally (see screenshots).

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

@codecov
Copy link

codecov bot commented Apr 13, 2021

Codecov Report

Merging #14093 (eb5c7e1) into master (3c88d25) will increase coverage by 0.01%.
The diff coverage is 100.00%.

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

@@            Coverage Diff             @@
##           master   #14093      +/-   ##
==========================================
+ Coverage   79.72%   79.73%   +0.01%     
==========================================
  Files         942      942              
  Lines       47709    47729      +20     
  Branches     6009     6009              
==========================================
+ Hits        38035    38057      +22     
+ Misses       9553     9551       -2     
  Partials      121      121              
Flag Coverage Δ
cypress 56.37% <ø> (+0.01%) ⬆️
hive 80.48% <100.00%> (+0.01%) ⬆️
mysql 80.75% <96.55%> (+0.01%) ⬆️
postgres 80.78% <96.55%> (+0.03%) ⬆️
python 81.19% <100.00%> (+0.01%) ⬆️
sqlite 80.38% <96.55%> (+0.01%) ⬆️

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

Impacted Files Coverage Δ
...rset-frontend/src/components/ErrorMessage/types.ts 100.00% <ø> (ø)
superset/databases/commands/test_connection.py 98.11% <100.00%> (+0.11%) ⬆️
superset/db_engine_specs/base.py 87.50% <100.00%> (+0.05%) ⬆️
superset/db_engine_specs/mssql.py 95.45% <100.00%> (+1.01%) ⬆️
superset/db_engine_specs/mysql.py 93.93% <100.00%> (+0.60%) ⬆️
superset/db_engine_specs/postgres.py 96.80% <100.00%> (ø)
superset/db_engine_specs/presto.py 84.10% <100.00%> (ø)
superset/errors.py 100.00% <100.00%> (ø)
superset-frontend/src/filters/utils.ts 100.00% <0.00%> (+4.76%) ⬆️

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 b77477a...f8bb103. Read the comment docs.

@junlincc junlincc added the data:connect:mysql Related to MySQL label Apr 13, 2021
TEST_CONNECTION_PORT_CLOSED_REGEX = re.compile(
r"Net-Lib error during Connection refused \(61\)"
)
TEST_CONNECTION_HOST_DOWN_REGEX = re.compile(
Copy link
Member

Choose a reason for hiding this comment

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

are we only going to use these errors for test connection, or will we be using them for database creation as well?

Copy link
Member Author

Choose a reason for hiding this comment

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

We can use them for both. Anytime we have a DBAPI exception we can call extract_errors to get these errors.

@betodealmeida betodealmeida merged commit 21f973f into apache:master Apr 14, 2021
QAlexBall pushed a commit to QAlexBall/superset that referenced this pull request Dec 29, 2021
* feat: error messages when connecting to MSSQL

* Address comments
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 1.2.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 data:connect:mysql Related to MySQL size/L 🚢 1.2.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants