-
Notifications
You must be signed in to change notification settings - Fork 16.3k
[AIRFLOW-2590] Fix commit in DbApiHook.run() for no-autocommit DB #3485
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
Conversation
|
@imroc @Fokko @bolkedebruin @aoen PTAL, wanna get rid of those failed CI tests in my other PRs. I'm only fixing the behavior change for db that does not support autocommit. But the PR I referred in the description had another change of behavior which is to change the default value of autocommit in the parameter. Would someone elaborate why do we want to change that please? I'm a bit worried about the performance implication from that change. |
Codecov Report
@@ Coverage Diff @@
## master #3485 +/- ##
==========================================
+ Coverage 17.95% 77.16% +59.2%
==========================================
Files 203 203
Lines 15124 15124
==========================================
+ Hits 2716 11670 +8954
+ Misses 12408 3454 -8954
Continue to review full report at Codecov.
|
|
@yrqls21 you're all right, the default value of autocommit should be False, my bad, I changed it back to False in this PR |
|
@saguziel PTAL, wanna unblock the CI ASAP |
kaxil
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
Thanks for fixing the CI |
Closes apache#3485 from yrqls21/kevin_yang_fix_dbapi
JIRA
Description
After this commit, DbApiHook.run() will only commit when the autocommit field is set for the connection. For those don't support autocommit (e.g. sqlite_hook), the connection won't commit the query, which is a change of behavior.
This is currently breaking CI (tests/core.py:CoreTest.test_check_operators).
Tests
fixes tests/core.py:CoreTest.test_check_operators
Commits
Documentation
Code Quality
git diff upstream/master -u -- "*.py" | flake8 --diff