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: fixing mysql error message #14416

Merged
merged 7 commits into from
Apr 30, 2021
Merged

Conversation

AAfghahi
Copy link
Member

@AAfghahi AAfghahi commented Apr 29, 2021

SUMMARY

The previous regex for custom database errors for mySQL had an extra period, this fixes that. The same was true for postgres when you are editing an already existing database.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Before (postgres):
Screen Shot 2021-04-30 at 3 08 11 PM
After (postgres)
Screen Shot 2021-04-30 at 3 11 55 PM

After
Screen Shot 2021-04-29 at 11 31 15 AM

TEST PLAN

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

superset/db_engine_specs/mysql.py Outdated Show resolved Hide resolved
@betodealmeida
Copy link
Member

@AAfghahi I just realized, can you update the unit tests as well? If though they should pass, it would be nice to have the error message there consistent with what MySQL returns.

@AAfghahi
Copy link
Member Author

@AAfghahi I just realized, can you update the unit tests as well? If though they should pass, it would be nice to have the error message there consistent with what MySQL returns.

Oh yes, good point.

@AAfghahi
Copy link
Member Author

@betodealmeida fixed the tests

@codecov
Copy link

codecov bot commented Apr 29, 2021

Codecov Report

Merging #14416 (d9a321d) into master (6541a03) will decrease coverage by 0.10%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #14416      +/-   ##
==========================================
- Coverage   76.67%   76.56%   -0.11%     
==========================================
  Files         955      955              
  Lines       48250    48284      +34     
  Branches     6032     6032              
==========================================
- Hits        36996    36969      -27     
- Misses      11058    11119      +61     
  Partials      196      196              
Flag Coverage Δ
mysql 81.00% <100.00%> (-0.03%) ⬇️
postgres 81.04% <100.00%> (-0.03%) ⬇️
presto ?
python 81.12% <100.00%> (-0.22%) ⬇️
sqlite 80.64% <100.00%> (-0.03%) ⬇️

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

Impacted Files Coverage Δ
superset/db_engine_specs/mysql.py 94.02% <100.00%> (ø)
superset/db_engine_specs/postgres.py 96.93% <100.00%> (+0.03%) ⬆️
superset/db_engine_specs/presto.py 83.36% <0.00%> (-6.53%) ⬇️
superset/dashboards/dao.py 89.76% <0.00%> (-5.70%) ⬇️
superset/utils/cache.py 73.26% <0.00%> (-2.02%) ⬇️
superset/views/database/mixins.py 81.03% <0.00%> (-1.73%) ⬇️
superset/connectors/sqla/models.py 88.37% <0.00%> (-1.46%) ⬇️
superset/db_engine_specs/base.py 87.66% <0.00%> (-0.44%) ⬇️
superset/models/core.py 88.85% <0.00%> (-0.28%) ⬇️
superset/views/utils.py 83.66% <0.00%> (-0.13%) ⬇️
... and 17 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 6541a03...d9a321d. Read the comment docs.

tests/db_engine_specs/mysql_tests.py Outdated Show resolved Hide resolved
tests/db_engine_specs/mysql_tests.py Outdated Show resolved Hide resolved
tests/db_engine_specs/mysql_tests.py Outdated Show resolved Hide resolved
superset/db_engine_specs/mysql.py Outdated Show resolved Hide resolved
AAfghahi and others added 4 commits April 29, 2021 16:52
Co-authored-by: Beto Dealmeida <roberto@dealmeida.net>
Co-authored-by: Beto Dealmeida <roberto@dealmeida.net>
Co-authored-by: Beto Dealmeida <roberto@dealmeida.net>
Co-authored-by: Beto Dealmeida <roberto@dealmeida.net>
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.

Awesome!

@betodealmeida betodealmeida added the need:merge The PR is ready to be merged label Apr 29, 2021
@AAfghahi AAfghahi force-pushed the ch6434_mysql branch 2 times, most recently from bb88a9f to dd0863d Compare April 30, 2021 19:25
@pull-request-size pull-request-size bot added size/M and removed size/S labels Apr 30, 2021
@betodealmeida betodealmeida merged commit 7466595 into apache:master Apr 30, 2021
amitmiran137 pushed a commit to nielsen-oss/superset that referenced this pull request May 3, 2021
* master: (38 commits)
  refactor(native-filters): allow cascading only for filter_select (apache#14441)
  test(maximize-chart): Add tests to maximize chart action (apache#14371)
  fix: fixing mysql error message (apache#14416)
  feat: Logic added to limiting factor column in Query model (apache#13521)
  change relationship (apache#14435)
  fix: bootstrap data permissions (apache#14348)
  fix: parse simple string error message values (apache#14360)
  chore: add stack trace to all calls of logger.error (apache#14382)
  update README with new docs and recordings (apache#14432)
  Renamed impyla from implya in impala.mdx and Renamed PIP package impyla from impala in index.mdx (apache#14425)
  fix(native-filters): fix filter scope error (apache#14426)
  feat: Adding limiting_factor column to Query model (apache#14234)
  feat: Add etag caching to dashboard APIs (apache#14357)
  chore: Moves Card to the components folder (apache#14139)
  feat: Dynamic imports for the Icons component (apache#14318)
  feat: Support env vars configuration for WebSocket server (apache#14398)
  fix: SQLLab role permissions (apache#14372)
  fix(native-filters): always show filters without dataset (apache#14409)
  fix error getting partitionQuery from table.partition (apache#14369)
  refactor: Boostrap to AntD - Tabs (apache#14048)
  ...
hughhhh pushed a commit that referenced this pull request May 4, 2021
* fixing mysql error message

* Update tests/db_engine_specs/mysql_tests.py

Co-authored-by: Beto Dealmeida <roberto@dealmeida.net>

* Update tests/db_engine_specs/mysql_tests.py

Co-authored-by: Beto Dealmeida <roberto@dealmeida.net>

* Update tests/db_engine_specs/mysql_tests.py

Co-authored-by: Beto Dealmeida <roberto@dealmeida.net>

* Update superset/db_engine_specs/mysql.py

Co-authored-by: Beto Dealmeida <roberto@dealmeida.net>

* fixed broken test

* changed error type

Co-authored-by: Beto Dealmeida <roberto@dealmeida.net>
cccs-RyanS pushed a commit to CybercentreCanada/superset that referenced this pull request Dec 17, 2021
* fixing mysql error message

* Update tests/db_engine_specs/mysql_tests.py

Co-authored-by: Beto Dealmeida <roberto@dealmeida.net>

* Update tests/db_engine_specs/mysql_tests.py

Co-authored-by: Beto Dealmeida <roberto@dealmeida.net>

* Update tests/db_engine_specs/mysql_tests.py

Co-authored-by: Beto Dealmeida <roberto@dealmeida.net>

* Update superset/db_engine_specs/mysql.py

Co-authored-by: Beto Dealmeida <roberto@dealmeida.net>

* fixed broken test

* changed error type

Co-authored-by: Beto Dealmeida <roberto@dealmeida.net>
QAlexBall pushed a commit to QAlexBall/superset that referenced this pull request Dec 29, 2021
* fixing mysql error message

* Update tests/db_engine_specs/mysql_tests.py

Co-authored-by: Beto Dealmeida <roberto@dealmeida.net>

* Update tests/db_engine_specs/mysql_tests.py

Co-authored-by: Beto Dealmeida <roberto@dealmeida.net>

* Update tests/db_engine_specs/mysql_tests.py

Co-authored-by: Beto Dealmeida <roberto@dealmeida.net>

* Update superset/db_engine_specs/mysql.py

Co-authored-by: Beto Dealmeida <roberto@dealmeida.net>

* fixed broken test

* changed error type

Co-authored-by: Beto Dealmeida <roberto@dealmeida.net>
cccs-rc pushed a commit to CybercentreCanada/superset that referenced this pull request Mar 6, 2024
* fixing mysql error message

* Update tests/db_engine_specs/mysql_tests.py

Co-authored-by: Beto Dealmeida <roberto@dealmeida.net>

* Update tests/db_engine_specs/mysql_tests.py

Co-authored-by: Beto Dealmeida <roberto@dealmeida.net>

* Update tests/db_engine_specs/mysql_tests.py

Co-authored-by: Beto Dealmeida <roberto@dealmeida.net>

* Update superset/db_engine_specs/mysql.py

Co-authored-by: Beto Dealmeida <roberto@dealmeida.net>

* fixed broken test

* changed error type

Co-authored-by: Beto Dealmeida <roberto@dealmeida.net>
@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 need:merge The PR is ready to be merged preset:2021.17 size/M 🚢 1.3.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants