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

feat: allow lenient mode for connection properties #671

Merged
merged 2 commits into from Nov 30, 2020

Conversation

olavloite
Copy link
Contributor

@olavloite olavloite commented Nov 24, 2020

Some applications automatically add additional properties to connection strings that are unknown to the Spanner Connection API (and thereby also the Spanner JDBC driver). This causes the connection attempt to fail. This change allows a user to specify 'lenient' mode where unknown properties only generate a warning instead of an error.

Needed for dropwizard/dropwizard#3461
Needed for googleapis/google-cloud-java#6671
Needed for googleapis/java-spanner-jdbc#283

Some applications automatically add additional properties to connection strings
that are unknown to the Spanner Connection API (and thereby also the Spanner
JDBC driver). This causes the connection attempt to fail. This change allows a
user to specify 'lenient' mode where unknown properties only generate a warning
instead of an error.

Fixes dropwizard/dropwizard#3461
Fixes googleapis/google-cloud-java#6671
Fixes googleapis/java-spanner-jdbc#283
@olavloite olavloite requested a review from thiagotnunes Nov 24, 2020
@olavloite olavloite requested a review from as a code owner Nov 24, 2020
@google-cla google-cla bot added the cla: yes label Nov 24, 2020
@product-auto-label product-auto-label bot added the api: spanner label Nov 24, 2020
@olavloite olavloite added the kokoro:force-run label Nov 24, 2020
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run label Nov 24, 2020
@codecov
Copy link

@codecov codecov bot commented Nov 25, 2020

Codecov Report

Merging #671 (5fb0ab4) into master (77ed87c) will increase coverage by 0.03%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #671      +/-   ##
============================================
+ Coverage     84.06%   84.10%   +0.03%     
- Complexity     2497     2502       +5     
============================================
  Files           141      141              
  Lines         13812    13821       +9     
  Branches       1317     1319       +2     
============================================
+ Hits          11611    11624      +13     
+ Misses         1655     1652       -3     
+ Partials        546      545       -1     
Impacted Files Coverage Δ Complexity Δ
...le/cloud/spanner/connection/ConnectionOptions.java 87.25% <100.00%> (+0.58%) 65.00 <3.00> (+4.00)
.../com/google/cloud/spanner/AbstractReadContext.java 86.76% <0.00%> (+0.61%) 47.00% <0.00%> (ø%)
.../google/cloud/spanner/SpannerExceptionFactory.java 82.92% <0.00%> (+2.43%) 40.00% <0.00%> (+1.00%)

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 77ed87c...5fb0ab4. Read the comment docs.

@thiagotnunes thiagotnunes merged commit f6a8ba6 into master Nov 30, 2020
23 checks passed
@thiagotnunes thiagotnunes deleted the allow-lenient-mode branch Nov 30, 2020
thiagotnunes pushed a commit that referenced this issue May 6, 2021
* feat: allow lenient mode for connection properties

Some applications automatically add additional properties to connection strings
that are unknown to the Spanner Connection API (and thereby also the Spanner
JDBC driver). This causes the connection attempt to fail. This change allows a
user to specify 'lenient' mode where unknown properties only generate a warning
instead of an error.

Fixes dropwizard/dropwizard#3461
Fixes googleapis/google-cloud-java#6671
Fixes googleapis/java-spanner-jdbc#283

* fix: add credentials to prevent tests from trying to use env credentials
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: spanner cla: yes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants