fix(bq jdbc): allow & ignore unknown parameters#12352
Open
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request modifies BigQueryJdbcUrlUtility to log a message instead of throwing an exception when unknown properties are encountered in the JDBC URL, enhancing compatibility with various tools. It also introduces BigQueryJdbcLoggingBaseTest to enable log verification in tests. Review feedback highlights that the logger implementation in BigQueryJdbcUrlUtility incorrectly uses printf-style formatting and suggests using a less aggressive log level. Furthermore, a suggestion was provided to safely access captured logs in tests to avoid potential IndexOutOfBoundsException.
...cloud-bigquery-jdbc/src/main/java/com/google/cloud/bigquery/jdbc/BigQueryJdbcUrlUtility.java
Show resolved
Hide resolved
...d-bigquery-jdbc/src/test/java/com/google/cloud/bigquery/jdbc/BigQueryJdbcUrlUtilityTest.java
Show resolved
Hide resolved
cf5bb99 to
b2fbafb
Compare
b2fbafb to
b93e50b
Compare
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.
Looks like some existing apps provide keys that are not editable by user. At some point we will have an ability to collect such properties & build more permissive map, but for now we will ignore it & log it.
This PR also introduces helper methods for unittests to validate certain log messages were actually logged.