Suppress JException when get_autocommit and set_autocommit methods aren't supported on JDBC driver - #43786
Merged
potiuk merged 17 commits intoNov 28, 2024
Conversation
…eptions if those operations aren't supported by the JDBC driver
dabla
marked this pull request as draft
November 8, 2024 11:44
…n in sqlalchemy_url and get_conn methods
dabla
marked this pull request as ready for review
November 8, 2024 11:59
potiuk
reviewed
Nov 11, 2024
potiuk
approved these changes
Nov 11, 2024
potiuk
left a comment
Member
There was a problem hiding this comment.
Approved with small nit about version update
potiuk
reviewed
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>
got686-yandex
pushed a commit
to got686-yandex/airflow
that referenced
this pull request
Jan 30, 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>
This file contains hidden or 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
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.rstor{issue_number}.significant.rst, in newsfragments.