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
Collaborator

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 a team as a code owner November 24, 2020 19:10
@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Nov 24, 2020
@product-auto-label product-auto-label bot added the api: spanner Issues related to the googleapis/java-spanner API. label Nov 24, 2020
@olavloite olavloite added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Nov 24, 2020
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Nov 24, 2020
@codecov
Copy link

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
@thiagotnunes thiagotnunes deleted the allow-lenient-mode branch November 30, 2020 23:06
thiagotnunes pushed a commit that referenced this pull request 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
rajatbhatta pushed a commit to rajatbhatta/java-spanner that referenced this pull request Nov 17, 2022
…jdbc to v2.5.3 (googleapis#671)

[![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [com.google.cloud:google-cloud-spanner-jdbc](https://togithub.com/googleapis/java-spanner-jdbc) | `2.5.2` -> `2.5.3` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-spanner-jdbc/2.5.3/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-spanner-jdbc/2.5.3/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-spanner-jdbc/2.5.3/compatibility-slim/2.5.2)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-spanner-jdbc/2.5.3/confidence-slim/2.5.2)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>googleapis/java-spanner-jdbc</summary>

### [`v2.5.3`](https://togithub.com/googleapis/java-spanner-jdbc/blob/master/CHANGELOG.md#&#8203;253-httpswwwgithubcomgoogleapisjava-spanner-jdbccomparev252v253-2021-11-15)

[Compare Source](https://togithub.com/googleapis/java-spanner-jdbc/compare/v2.5.2...v2.5.3)

</details>

---

### Configuration

📅 **Schedule**: At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, click this checkbox.

---

This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-spanner-jdbc).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: spanner Issues related to the googleapis/java-spanner API. cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants