-
Notifications
You must be signed in to change notification settings - Fork 14.5k
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
Suppress JException when get_autocommit and set_autocommit methods aren't supported on JDBC driver #43786
Merged
potiuk
merged 17 commits into
apache:main
from
dabla:fix/also-suppress-jexception-in-jdbc-hook-when-unsupported
Nov 28, 2024
Merged
Suppress JException when get_autocommit and set_autocommit methods aren't supported on JDBC driver #43786
potiuk
merged 17 commits into
apache:main
from
dabla:fix/also-suppress-jexception-in-jdbc-hook-when-unsupported
Nov 28, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…eptions if those operations aren't supported by the JDBC driver
…n in sqlalchemy_url and get_conn methods
potiuk
reviewed
Nov 11, 2024
potiuk
approved these changes
Nov 11, 2024
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.
Approved with small nit about version update
potiuk
reviewed
Nov 12, 2024
eladkal
changed the title
Also suppress JException when get_autocommit and set_autocommit methods aren't supported on Jdbc driver
Suppress JException when get_autocommit and set_autocommit methods aren't supported on JDBC driver
Nov 12, 2024
prabhusneha
pushed a commit
to astronomer/airflow
that referenced
this pull request
Nov 28, 2024
…en't supported on JDBC driver (apache#43786) * refactor: get_autocommit and set_autocommit should also suppress JExceptions if those operations aren't supported by the JDBC driver * refactor: Use the cached connection property instead of get_connection in sqlalchemy_url and get_conn methods * refactor: Bumped version of jdbc provider to 4.5.3 * Update providers/src/airflow/providers/jdbc/provider.yaml --------- Co-authored-by: David Blain <david.blain@infrabel.be> Co-authored-by: Jarek Potiuk <jarek@potiuk.com>
LefterisXefteris
pushed a commit
to LefterisXefteris/airflow
that referenced
this pull request
Jan 5, 2025
…en't supported on JDBC driver (apache#43786) * refactor: get_autocommit and set_autocommit should also suppress JExceptions if those operations aren't supported by the JDBC driver * refactor: Use the cached connection property instead of get_connection in sqlalchemy_url and get_conn methods * refactor: Bumped version of jdbc provider to 4.5.3 * Update providers/src/airflow/providers/jdbc/provider.yaml --------- Co-authored-by: David Blain <david.blain@infrabel.be> Co-authored-by: Jarek Potiuk <jarek@potiuk.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Today we experienced that when the get_autocommit or the set_autocommit methods aren't supported on the SAS Jdbc driver,
we get an jpype.JException instead of an jaydebeapi.Error, so I added it to the suppressed exceptions. Unfortunately, I wasn't able to add a specific test case for that exception, as I was unable to mock the JException without the need of a JVM running, which we don't want.
^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named
{pr_number}.significant.rst
or{issue_number}.significant.rst
, in newsfragments.