From ae35d0e68864fcb344bb6aa3db84b74f94d23932 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 10 Mar 2020 22:02:04 +0000 Subject: [PATCH 1/8] chore: release 1.93.3-SNAPSHOT (#177) :robot: I have created a release \*beep\* \*boop\* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). --- google-cloud-core-bom/pom.xml | 8 ++++---- google-cloud-core-grpc/pom.xml | 4 ++-- google-cloud-core-http/pom.xml | 4 ++-- google-cloud-core/pom.xml | 4 ++-- pom.xml | 2 +- versions.txt | 2 +- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/google-cloud-core-bom/pom.xml b/google-cloud-core-bom/pom.xml index e31862e0b9..67060a4858 100644 --- a/google-cloud-core-bom/pom.xml +++ b/google-cloud-core-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-core-bom - 1.93.2 + 1.93.3-SNAPSHOT pom com.google.cloud @@ -63,17 +63,17 @@ com.google.cloud google-cloud-core - 1.93.2 + 1.93.3-SNAPSHOT com.google.cloud google-cloud-core-grpc - 1.93.2 + 1.93.3-SNAPSHOT com.google.cloud google-cloud-core-http - 1.93.2 + 1.93.3-SNAPSHOT diff --git a/google-cloud-core-grpc/pom.xml b/google-cloud-core-grpc/pom.xml index b6d2e6707a..a8a7adf6c1 100644 --- a/google-cloud-core-grpc/pom.xml +++ b/google-cloud-core-grpc/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-core-grpc - 1.93.2 + 1.93.3-SNAPSHOT jar Google Cloud Core gRPC https://github.com/googleapis/java-core @@ -13,7 +13,7 @@ com.google.cloud google-cloud-core-parent - 1.93.2 + 1.93.3-SNAPSHOT google-cloud-core-grpc diff --git a/google-cloud-core-http/pom.xml b/google-cloud-core-http/pom.xml index c933ff67e6..de64435987 100644 --- a/google-cloud-core-http/pom.xml +++ b/google-cloud-core-http/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-core-http - 1.93.2 + 1.93.3-SNAPSHOT jar Google Cloud Core HTTP https://github.com/googleapis/java-core @@ -13,7 +13,7 @@ com.google.cloud google-cloud-core-parent - 1.93.2 + 1.93.3-SNAPSHOT google-cloud-core-http diff --git a/google-cloud-core/pom.xml b/google-cloud-core/pom.xml index ef98cf5d64..7dd08e495c 100644 --- a/google-cloud-core/pom.xml +++ b/google-cloud-core/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-core - 1.93.2 + 1.93.3-SNAPSHOT jar Google Cloud Core https://github.com/googleapis/java-core @@ -13,7 +13,7 @@ com.google.cloud google-cloud-core-parent - 1.93.2 + 1.93.3-SNAPSHOT google-cloud-core diff --git a/pom.xml b/pom.xml index 5d1525e917..13d907cb0b 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-core-parent pom - 1.93.2 + 1.93.3-SNAPSHOT Google Cloud Core Parent https://github.com/googleapis/java-core diff --git a/versions.txt b/versions.txt index acbf6e6ef4..7fcd8163fc 100644 --- a/versions.txt +++ b/versions.txt @@ -1,4 +1,4 @@ # Format: # module:released-version:current-version -google-cloud-core:1.93.2:1.93.2 \ No newline at end of file +google-cloud-core:1.93.2:1.93.3-SNAPSHOT \ No newline at end of file From 6d5632c22507d1d3d36a90778291a6fa25b4788b Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 12 Mar 2020 11:05:02 +0100 Subject: [PATCH 2/8] deps: update dependency io.grpc:grpc-bom to v1.28.0 (#178) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 13d907cb0b..9aa2b8418b 100644 --- a/pom.xml +++ b/pom.xml @@ -160,7 +160,7 @@ 0.20.0 1.30.9 1.34.2 - 1.27.2 + 1.28.0 3.11.4 0.24.0 1.3.2 From 9bfb54c5a88c906bebcf90f81ed19aeece09befd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Knut=20Olav=20L=C3=B8ite?= Date: Thu, 12 Mar 2020 19:07:10 +0100 Subject: [PATCH 3/8] fix: fix Timestamp.of(java.sql.Timestamp) pre-epoch on exact second (#179) * fix: Timestamp.of(java.sql.Timestamp) pre-epoch on exact second * fix: review comments * fix: review comments * fix: make all testOf method consistent --- .../main/java/com/google/cloud/Timestamp.java | 10 +++---- .../java/com/google/cloud/TimestampTest.java | 29 +++++++++++++++---- 2 files changed, 28 insertions(+), 11 deletions(-) diff --git a/google-cloud-core/src/main/java/com/google/cloud/Timestamp.java b/google-cloud-core/src/main/java/com/google/cloud/Timestamp.java index df111d3503..c2cf20a3e2 100644 --- a/google-cloud-core/src/main/java/com/google/cloud/Timestamp.java +++ b/google-cloud-core/src/main/java/com/google/cloud/Timestamp.java @@ -121,13 +121,13 @@ public static Timestamp now() { public static Timestamp of(java.sql.Timestamp timestamp) { int nanos = timestamp.getNanos(); - // A pre-epoch timestamp will be off by one second because of the way that integer division - // works. For example, -1001 / 1000 == -1. In this case of timestamps, we want this result to be - // -2. This causes any pre-epoch timestamp to be off by 1 second - fix this by adjusting the - // seconds value by 1 if the timestamp < 0. + // A pre-epoch timestamp can be off by one second because of the way that integer division + // works. For example, -1001 / 1000 == -1. In this case, we want this result to be -2. This + // causes any pre-epoch timestamp to be off by 1 second - fix this by subtracting 1 from the + // seconds value if the seconds value is less than zero and is not divisible by 1000. // TODO: replace with Math.floorDiv when we drop Java 7 support long seconds = timestamp.getTime() / 1000; - if (seconds < 0) { + if (seconds < 0 && timestamp.getTime() % 1000 != 0) { --seconds; } diff --git a/google-cloud-core/src/test/java/com/google/cloud/TimestampTest.java b/google-cloud-core/src/test/java/com/google/cloud/TimestampTest.java index 12e13ef5b9..26bf9f2f8d 100644 --- a/google-cloud-core/src/test/java/com/google/cloud/TimestampTest.java +++ b/google-cloud-core/src/test/java/com/google/cloud/TimestampTest.java @@ -18,6 +18,7 @@ import static com.google.common.testing.SerializableTester.reserializeAndAssert; import static com.google.common.truth.Truth.assertThat; +import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import com.google.common.testing.EqualsTester; @@ -81,27 +82,43 @@ public void ofDate() { } @Test - public void ofSqlTimestamp() { + public void testOf() { String expectedTimestampString = "1970-01-01T00:00:12.345000000Z"; java.sql.Timestamp input = new java.sql.Timestamp(12345); Timestamp timestamp = Timestamp.of(input); - assertThat(timestamp.toString()).isEqualTo(expectedTimestampString); + assertEquals(timestamp.toString(), expectedTimestampString); } @Test - public void ofSqlTimestampPreEpoch() { + public void testOf_exactSecond() { + String expectedTimestampString = "1970-01-01T00:00:12Z"; + java.sql.Timestamp input = new java.sql.Timestamp(12000); + Timestamp timestamp = Timestamp.of(input); + assertEquals(timestamp.toString(), expectedTimestampString); + } + + @Test + public void testOf_preEpoch() { String expectedTimestampString = "1969-12-31T23:59:47.655000000Z"; java.sql.Timestamp input = new java.sql.Timestamp(-12345); Timestamp timestamp = Timestamp.of(input); - assertThat(timestamp.toString()).isEqualTo(expectedTimestampString); + assertEquals(timestamp.toString(), expectedTimestampString); } @Test - public void ofSqlTimestampOnEpoch() { + public void testOf_onEpoch() { String expectedTimestampString = "1970-01-01T00:00:00Z"; java.sql.Timestamp input = new java.sql.Timestamp(0); Timestamp timestamp = Timestamp.of(input); - assertThat(timestamp.toString()).isEqualTo(expectedTimestampString); + assertEquals(timestamp.toString(), expectedTimestampString); + } + + @Test + public void testOf_preEpochExactSecond() { + String expectedTimestampString = "1969-12-31T23:59:59Z"; + java.sql.Timestamp input = new java.sql.Timestamp(-1000); + Timestamp timestamp = Timestamp.of(input); + assertEquals(timestamp.toString(), expectedTimestampString); } @Test From f5ba782fe7078bd2e02d27d8770ad20a459c73f3 Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Fri, 13 Mar 2020 11:22:04 -0400 Subject: [PATCH 4/8] deps: revert gRPC updates (#181) To avoid linkage errors --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 9aa2b8418b..13d907cb0b 100644 --- a/pom.xml +++ b/pom.xml @@ -160,7 +160,7 @@ 0.20.0 1.30.9 1.34.2 - 1.28.0 + 1.27.2 3.11.4 0.24.0 1.3.2 From e59dd60f55b76f903f69c6f4337b88db06e644be Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 16 Mar 2020 16:12:13 +0100 Subject: [PATCH 5/8] build(deps): update dependency org.apache.maven.plugins:maven-javadoc-plugin to v3.2.0 (#185) This PR contains the following updates: | Package | Update | Change | |---|---|---| | org.apache.maven.plugins:maven-javadoc-plugin | minor | `3.1.1` -> `3.2.0` | --- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#googleapis/java-core). --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 13d907cb0b..68f34c5390 100644 --- a/pom.xml +++ b/pom.xml @@ -385,7 +385,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.1.1 + 3.2.0 html From 4b916929a7a4d05a8cbfb1119c68951ea4fa6ffc Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Mon, 16 Mar 2020 08:28:51 -0700 Subject: [PATCH 6/8] chore: update PR template (#184) This PR was generated using Autosynth. :rainbow:
Log from Synthtool ``` 2020-03-14 02:16:30,909 synthtool > Executing /tmpfs/src/git/autosynth/working_repo/synth.py. .github/ISSUE_TEMPLATE/bug_report.md .github/ISSUE_TEMPLATE/feature_request.md .github/ISSUE_TEMPLATE/support_request.md .github/PULL_REQUEST_TEMPLATE.md .github/release-please.yml .github/trusted-contribution.yml .kokoro/build.bat .kokoro/build.sh .kokoro/coerce_logs.sh .kokoro/common.cfg .kokoro/continuous/common.cfg .kokoro/continuous/dependencies.cfg .kokoro/continuous/integration.cfg .kokoro/continuous/java11.cfg .kokoro/continuous/java7.cfg .kokoro/continuous/java8-osx.cfg .kokoro/continuous/java8-win.cfg .kokoro/continuous/java8.cfg .kokoro/continuous/lint.cfg .kokoro/continuous/propose_release.cfg .kokoro/continuous/samples.cfg .kokoro/dependencies.sh .kokoro/linkage-monitor.sh .kokoro/nightly/common.cfg .kokoro/nightly/dependencies.cfg .kokoro/nightly/integration.cfg .kokoro/nightly/java11.cfg .kokoro/nightly/java7.cfg .kokoro/nightly/java8-osx.cfg .kokoro/nightly/java8-win.cfg .kokoro/nightly/java8.cfg .kokoro/nightly/lint.cfg .kokoro/nightly/samples.cfg .kokoro/presubmit/clirr.cfg .kokoro/presubmit/common.cfg .kokoro/presubmit/dependencies.cfg .kokoro/presubmit/integration.cfg .kokoro/presubmit/java11.cfg .kokoro/presubmit/java7.cfg .kokoro/presubmit/java8-osx.cfg .kokoro/presubmit/java8-win.cfg .kokoro/presubmit/java8.cfg .kokoro/presubmit/linkage-monitor.cfg .kokoro/presubmit/lint.cfg .kokoro/presubmit/samples.cfg .kokoro/release/bump_snapshot.cfg .kokoro/release/common.cfg .kokoro/release/common.sh .kokoro/release/drop.cfg .kokoro/release/drop.sh .kokoro/release/promote.cfg .kokoro/release/promote.sh .kokoro/release/publish_javadoc.cfg .kokoro/release/publish_javadoc.sh .kokoro/release/snapshot.cfg .kokoro/release/snapshot.sh .kokoro/release/stage.cfg .kokoro/release/stage.sh .kokoro/trampoline.sh CODE_OF_CONDUCT.md CONTRIBUTING.md LICENSE README.md codecov.yaml java.header license-checks.xml renovate.json 2020-03-14 02:16:31,108 synthtool > Wrote metadata to synth.metadata. ```
--- .github/PULL_REQUEST_TEMPLATE.md | 8 +++++++- synth.metadata | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 0bd0ee0620..940d477efc 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1 +1,7 @@ -Fixes # (it's a good idea to open an issue first for context and/or discussion) \ No newline at end of file +Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly: +- [ ] Make sure to open an issue as a [bug/issue](https://github.com/googleapis/java-core/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea +- [ ] Ensure the tests and linter pass +- [ ] Code coverage does not decrease (if any source code was changed) +- [ ] Appropriate docs were updated (if necessary) + +Fixes # ☕️ diff --git a/synth.metadata b/synth.metadata index 99a64e1760..06bf95877b 100644 --- a/synth.metadata +++ b/synth.metadata @@ -1,5 +1,5 @@ { - "updateTime": "2020-02-24T23:14:57.546329Z", + "updateTime": "2020-03-14T09:16:31.108382Z", "sources": [ { "template": { From 775a84877ef69d22ca7a4392edd0d3680df2256e Mon Sep 17 00:00:00 2001 From: Frank Natividad Date: Mon, 16 Mar 2020 09:01:52 -0700 Subject: [PATCH 7/8] fix: retry SSLException (#183) --- .../src/main/java/com/google/cloud/BaseServiceException.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/google-cloud-core/src/main/java/com/google/cloud/BaseServiceException.java b/google-cloud-core/src/main/java/com/google/cloud/BaseServiceException.java index e9e9e2aa63..29396d6d58 100644 --- a/google-cloud-core/src/main/java/com/google/cloud/BaseServiceException.java +++ b/google-cloud-core/src/main/java/com/google/cloud/BaseServiceException.java @@ -26,6 +26,7 @@ import java.util.Objects; import java.util.Set; import java.util.concurrent.ExecutionException; +import javax.net.ssl.SSLException; import javax.net.ssl.SSLHandshakeException; /** Base class for all service exceptions. */ @@ -256,6 +257,8 @@ public static boolean isRetryable(boolean idempotent, IOException exception) { boolean exceptionIsRetryable = exception instanceof SocketTimeoutException || exception instanceof SocketException + || (exception instanceof SSLException + && exception.getMessage().contains("Connection has been shutdown: ")) || (exception instanceof SSLHandshakeException && !(exception.getCause() instanceof CertificateException)) || "insufficient data written".equals(exception.getMessage()) From fed7d1f4f79626c003404227b32bd62243b8a860 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 16 Mar 2020 11:30:35 -0700 Subject: [PATCH 8/8] chore: release 1.93.3 (#180) * updated CHANGELOG.md [ci skip] * updated README.md [ci skip] * updated versions.txt [ci skip] * updated google-cloud-core-bom/pom.xml [ci skip] * updated google-cloud-core-grpc/pom.xml [ci skip] * updated google-cloud-core-http/pom.xml [ci skip] * updated google-cloud-core/pom.xml [ci skip] * updated pom.xml [ci skip] Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- CHANGELOG.md | 14 ++++++++++++++ google-cloud-core-bom/pom.xml | 8 ++++---- google-cloud-core-grpc/pom.xml | 4 ++-- google-cloud-core-http/pom.xml | 4 ++-- google-cloud-core/pom.xml | 4 ++-- pom.xml | 2 +- versions.txt | 2 +- 7 files changed, 26 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3bf02ff519..5218a786fe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,19 @@ # Changelog +### [1.93.3](https://www.github.com/googleapis/java-core/compare/v1.93.2...v1.93.3) (2020-03-16) + + +### Bug Fixes + +* fix Timestamp.of(java.sql.Timestamp) pre-epoch on exact second ([#179](https://www.github.com/googleapis/java-core/issues/179)) ([9bfb54c](https://www.github.com/googleapis/java-core/commit/9bfb54c5a88c906bebcf90f81ed19aeece09befd)) +* retry SSLException ([#183](https://www.github.com/googleapis/java-core/issues/183)) ([775a848](https://www.github.com/googleapis/java-core/commit/775a84877ef69d22ca7a4392edd0d3680df2256e)) + + +### Dependencies + +* revert gRPC updates ([#181](https://www.github.com/googleapis/java-core/issues/181)) ([f5ba782](https://www.github.com/googleapis/java-core/commit/f5ba782fe7078bd2e02d27d8770ad20a459c73f3)) +* update dependency io.grpc:grpc-bom to v1.28.0 ([#178](https://www.github.com/googleapis/java-core/issues/178)) ([6d5632c](https://www.github.com/googleapis/java-core/commit/6d5632c22507d1d3d36a90778291a6fa25b4788b)) + ### [1.93.2](https://www.github.com/googleapis/java-core/compare/v1.93.1...v1.93.2) (2020-03-10) diff --git a/google-cloud-core-bom/pom.xml b/google-cloud-core-bom/pom.xml index 67060a4858..e819095707 100644 --- a/google-cloud-core-bom/pom.xml +++ b/google-cloud-core-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-core-bom - 1.93.3-SNAPSHOT + 1.93.3 pom com.google.cloud @@ -63,17 +63,17 @@ com.google.cloud google-cloud-core - 1.93.3-SNAPSHOT + 1.93.3 com.google.cloud google-cloud-core-grpc - 1.93.3-SNAPSHOT + 1.93.3 com.google.cloud google-cloud-core-http - 1.93.3-SNAPSHOT + 1.93.3 diff --git a/google-cloud-core-grpc/pom.xml b/google-cloud-core-grpc/pom.xml index a8a7adf6c1..b6bb373c38 100644 --- a/google-cloud-core-grpc/pom.xml +++ b/google-cloud-core-grpc/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-core-grpc - 1.93.3-SNAPSHOT + 1.93.3 jar Google Cloud Core gRPC https://github.com/googleapis/java-core @@ -13,7 +13,7 @@ com.google.cloud google-cloud-core-parent - 1.93.3-SNAPSHOT + 1.93.3 google-cloud-core-grpc diff --git a/google-cloud-core-http/pom.xml b/google-cloud-core-http/pom.xml index de64435987..fd7d2bfbd0 100644 --- a/google-cloud-core-http/pom.xml +++ b/google-cloud-core-http/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-core-http - 1.93.3-SNAPSHOT + 1.93.3 jar Google Cloud Core HTTP https://github.com/googleapis/java-core @@ -13,7 +13,7 @@ com.google.cloud google-cloud-core-parent - 1.93.3-SNAPSHOT + 1.93.3 google-cloud-core-http diff --git a/google-cloud-core/pom.xml b/google-cloud-core/pom.xml index 7dd08e495c..445fd81908 100644 --- a/google-cloud-core/pom.xml +++ b/google-cloud-core/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-core - 1.93.3-SNAPSHOT + 1.93.3 jar Google Cloud Core https://github.com/googleapis/java-core @@ -13,7 +13,7 @@ com.google.cloud google-cloud-core-parent - 1.93.3-SNAPSHOT + 1.93.3 google-cloud-core diff --git a/pom.xml b/pom.xml index 68f34c5390..22a6a778ed 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-core-parent pom - 1.93.3-SNAPSHOT + 1.93.3 Google Cloud Core Parent https://github.com/googleapis/java-core diff --git a/versions.txt b/versions.txt index 7fcd8163fc..6a76ae69ca 100644 --- a/versions.txt +++ b/versions.txt @@ -1,4 +1,4 @@ # Format: # module:released-version:current-version -google-cloud-core:1.93.2:1.93.3-SNAPSHOT \ No newline at end of file +google-cloud-core:1.93.3:1.93.3 \ No newline at end of file