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

Generalize error check for pymysql error type #239

Merged
merged 1 commit into from
Aug 4, 2020

Conversation

srprash
Copy link
Contributor

@srprash srprash commented Aug 4, 2020

Description of changes:
In the pymysql v0.10.0, the error type is changed from InternalError to OperationalError. The test should be testing on the lates version of pymysql, therefore having a general check instead of checking specific error type would avoid test failure due to such breaking changes in the future.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@codecov-commenter
Copy link

codecov-commenter commented Aug 4, 2020

Codecov Report

Merging #239 into master will increase coverage by 33.49%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff             @@
##           master     #239       +/-   ##
===========================================
+ Coverage   45.80%   79.29%   +33.49%     
===========================================
  Files          80       80               
  Lines        3159     3159               
===========================================
+ Hits         1447     2505     +1058     
+ Misses       1712      654     -1058     
Impacted Files Coverage Δ
aws_xray_sdk/ext/django/__init__.py 0.00% <0.00%> (-100.00%) ⬇️
aws_xray_sdk/ext/django/templates.py 0.00% <0.00%> (-91.31%) ⬇️
aws_xray_sdk/ext/django/conf.py 0.00% <0.00%> (-87.50%) ⬇️
aws_xray_sdk/ext/django/middleware.py 0.00% <0.00%> (-87.28%) ⬇️
aws_xray_sdk/ext/django/db.py 0.00% <0.00%> (-72.31%) ⬇️
aws_xray_sdk/ext/django/apps.py 0.00% <0.00%> (-67.86%) ⬇️
aws_xray_sdk/ext/dbapi2.py 80.85% <0.00%> (-8.52%) ⬇️
aws_xray_sdk/core/models/throwable.py 80.00% <0.00%> (+4.44%) ⬆️
aws_xray_sdk/core/context.py 87.87% <0.00%> (+4.54%) ⬆️
aws_xray_sdk/core/lambda_launcher.py 77.63% <0.00%> (+7.89%) ⬆️
... and 51 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 969283c...666e607. Read the comment docs.

@michael-k
Copy link
Contributor

You've beaten me by a couple of minutes. ;)

If anyone's interested, here's the PR that made the change in PyMySQL: PyMySQL/PyMySQL#823. The errno is 1054 in this case, see https://dev.mysql.com/doc/mysql-errors/5.7/en/server-error-reference.html#error_er_bad_field_error

@srprash
Copy link
Contributor Author

srprash commented Aug 4, 2020

If anyone's interested, here's the PR that made the change in PyMySQL: PyMySQL/PyMySQL#823. The errno is 1054 in this case, see https://dev.mysql.com/doc/mysql-errors/5.7/en/server-error-reference.html#error_er_bad_field_error

Thanks for the deep dive and posting the actual errorno. :)

@srprash srprash merged commit a2e4bc6 into aws:master Aug 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants