From 9467f0471b1c42993905a60da8717513d35755c0 Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Mon, 27 Jul 2020 11:13:00 -0400 Subject: [PATCH 01/14] move autovalue to annotation processor path --- google-cloud-nio/pom.xml | 13 ++++++++----- pom.xml | 19 +++++++++++++------ 2 files changed, 21 insertions(+), 11 deletions(-) diff --git a/google-cloud-nio/pom.xml b/google-cloud-nio/pom.xml index da50d7c1..96de04a4 100644 --- a/google-cloud-nio/pom.xml +++ b/google-cloud-nio/pom.xml @@ -54,11 +54,6 @@ true provided - - com.google.auto.value - auto-value - provided - com.google.auto.value auto-value-annotations @@ -95,6 +90,7 @@ test + @@ -112,6 +108,13 @@ 1.7 UTF-8 -Xlint:unchecked + + + com.google.auto.value + auto-value + 1.7.3 + + diff --git a/pom.xml b/pom.xml index f0bb7bd8..12f47849 100644 --- a/pom.xml +++ b/pom.xml @@ -94,12 +94,6 @@ google-api-services-storage v1-rev20200611-1.30.9 - - com.google.auto.value - auto-value - provided - ${auto-value-annotation.version} - com.google.auto.value auto-value-annotations @@ -123,6 +117,18 @@ + + maven-compiler-plugin + + + + com.google.auto.value + auto-value + 1.7.3 + + + + org.apache.maven.plugins maven-dependency-plugin @@ -135,6 +141,7 @@ + google-cloud-nio google-cloud-nio-retrofit From 4b56b8e2896750269b1aaaafeec887db3d2d2786 Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Mon, 27 Jul 2020 16:28:52 -0400 Subject: [PATCH 02/14] only one parallel job --- .github/workflows/ci.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 68302207..9be83e13 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -10,6 +10,7 @@ jobs: strategy: matrix: java: [7, 8, 11] + max-parallel: 1 steps: - uses: actions/checkout@v2 - uses: actions/setup-java@v1 From 1893bb3f55567ad88e850469ad5624928ab5db48 Mon Sep 17 00:00:00 2001 From: Frank Natividad Date: Tue, 26 Jan 2021 13:15:55 -0800 Subject: [PATCH 03/14] fix: verify gs filesystem is available --- google-cloud-nio/pom.xml | 11 ----------- .../java.nio.file.spi.FileSystemProvider | 16 ++++++++++++++++ .../contrib/nio/CloudStorageOptionsTest.java | 2 ++ pom.xml | 1 - 4 files changed, 18 insertions(+), 12 deletions(-) create mode 100644 google-cloud-nio/src/main/resources/META-INF/services/java.nio.file.spi.FileSystemProvider diff --git a/google-cloud-nio/pom.xml b/google-cloud-nio/pom.xml index 96de04a4..afcaf1d5 100644 --- a/google-cloud-nio/pom.xml +++ b/google-cloud-nio/pom.xml @@ -176,17 +176,6 @@ - - org.apache.maven.plugins - maven-dependency-plugin - - - com.google.auto.value:auto-value - com.google.auto.service:auto-service - - - - diff --git a/google-cloud-nio/src/main/resources/META-INF/services/java.nio.file.spi.FileSystemProvider b/google-cloud-nio/src/main/resources/META-INF/services/java.nio.file.spi.FileSystemProvider new file mode 100644 index 00000000..93227602 --- /dev/null +++ b/google-cloud-nio/src/main/resources/META-INF/services/java.nio.file.spi.FileSystemProvider @@ -0,0 +1,16 @@ +# Copyright 2021 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +com.google.cloud.storage.contrib.nio.CloudStorageFileSystemProvider diff --git a/google-cloud-nio/src/test/java/com/google/cloud/storage/contrib/nio/CloudStorageOptionsTest.java b/google-cloud-nio/src/test/java/com/google/cloud/storage/contrib/nio/CloudStorageOptionsTest.java index c6ce31ef..02cc4921 100644 --- a/google-cloud-nio/src/test/java/com/google/cloud/storage/contrib/nio/CloudStorageOptionsTest.java +++ b/google-cloud-nio/src/test/java/com/google/cloud/storage/contrib/nio/CloudStorageOptionsTest.java @@ -27,6 +27,8 @@ import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; +import java.nio.file.spi.FileSystemProvider; +import java.util.List; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; diff --git a/pom.xml b/pom.xml index 12f47849..5c9ff9ec 100644 --- a/pom.xml +++ b/pom.xml @@ -99,7 +99,6 @@ auto-value-annotations ${auto-value-annotation.version} - junit junit From a3bfa0a0f0e5cacce79f2155db132dac2befc286 Mon Sep 17 00:00:00 2001 From: Frank Natividad Date: Tue, 26 Jan 2021 14:34:30 -0800 Subject: [PATCH 04/14] fix: remove max-parallel config in workflow --- .github/workflows/ci.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 9be83e13..68302207 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -10,7 +10,6 @@ jobs: strategy: matrix: java: [7, 8, 11] - max-parallel: 1 steps: - uses: actions/checkout@v2 - uses: actions/setup-java@v1 From fc846c2dec5b765df4d708379981289f7e883ec0 Mon Sep 17 00:00:00 2001 From: Frank Natividad Date: Tue, 26 Jan 2021 14:35:29 -0800 Subject: [PATCH 05/14] fix: lint --- .../cloud/storage/contrib/nio/CloudStorageOptionsTest.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/google-cloud-nio/src/test/java/com/google/cloud/storage/contrib/nio/CloudStorageOptionsTest.java b/google-cloud-nio/src/test/java/com/google/cloud/storage/contrib/nio/CloudStorageOptionsTest.java index 02cc4921..c6ce31ef 100644 --- a/google-cloud-nio/src/test/java/com/google/cloud/storage/contrib/nio/CloudStorageOptionsTest.java +++ b/google-cloud-nio/src/test/java/com/google/cloud/storage/contrib/nio/CloudStorageOptionsTest.java @@ -27,8 +27,6 @@ import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; -import java.nio.file.spi.FileSystemProvider; -import java.util.List; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; From 0114e785d18164ac1453ce7de5ac9167afdec598 Mon Sep 17 00:00:00 2001 From: Frank Natividad Date: Tue, 26 Jan 2021 15:36:57 -0800 Subject: [PATCH 06/14] fix: revert plugin ignore removal --- google-cloud-nio/pom.xml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/google-cloud-nio/pom.xml b/google-cloud-nio/pom.xml index afcaf1d5..0e1b0e32 100644 --- a/google-cloud-nio/pom.xml +++ b/google-cloud-nio/pom.xml @@ -176,6 +176,16 @@ + + org.apache.maven.plugins + maven-dependency-plugin + + + com.google.auto.value:auto-value + com.google.auto.service:auto-service + + + From b5b4fd89c4df5485875d9d00dbeda1e3f860041a Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Wed, 27 Jan 2021 09:06:00 -0500 Subject: [PATCH 07/14] autovalue 1.7.4 --- google-cloud-nio/pom.xml | 2 +- pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/google-cloud-nio/pom.xml b/google-cloud-nio/pom.xml index 0e1b0e32..482ba7a0 100644 --- a/google-cloud-nio/pom.xml +++ b/google-cloud-nio/pom.xml @@ -112,7 +112,7 @@ com.google.auto.value auto-value - 1.7.3 + 1.7.4 diff --git a/pom.xml b/pom.xml index 5c9ff9ec..090f2d74 100644 --- a/pom.xml +++ b/pom.xml @@ -123,7 +123,7 @@ com.google.auto.value auto-value - 1.7.3 + 1.7.4 From bccc6cb1b55e895304936493409ac0525563408e Mon Sep 17 00:00:00 2001 From: Frank Natividad Date: Wed, 27 Jan 2021 11:35:13 -0800 Subject: [PATCH 08/14] debug: test provider config is loaded before tests run --- google-cloud-nio/pom.xml | 5 +++++ .../java.nio.file.spi.FileSystemProvider | 16 ---------------- pom.xml | 5 +++++ 3 files changed, 10 insertions(+), 16 deletions(-) delete mode 100644 google-cloud-nio/src/main/resources/META-INF/services/java.nio.file.spi.FileSystemProvider diff --git a/google-cloud-nio/pom.xml b/google-cloud-nio/pom.xml index 482ba7a0..14214e39 100644 --- a/google-cloud-nio/pom.xml +++ b/google-cloud-nio/pom.xml @@ -114,6 +114,11 @@ auto-value 1.7.4 + + com.google.auto.service + auto-service + 1.0-rc7 + diff --git a/google-cloud-nio/src/main/resources/META-INF/services/java.nio.file.spi.FileSystemProvider b/google-cloud-nio/src/main/resources/META-INF/services/java.nio.file.spi.FileSystemProvider deleted file mode 100644 index 93227602..00000000 --- a/google-cloud-nio/src/main/resources/META-INF/services/java.nio.file.spi.FileSystemProvider +++ /dev/null @@ -1,16 +0,0 @@ -# Copyright 2021 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -com.google.cloud.storage.contrib.nio.CloudStorageFileSystemProvider diff --git a/pom.xml b/pom.xml index 090f2d74..64a1d6c2 100644 --- a/pom.xml +++ b/pom.xml @@ -125,6 +125,11 @@ auto-value 1.7.4 + + com.google.auto.service + auto-service + 1.0-rc7 + From c1b0ec5f6f0def4fc57a252ff5a88fd9eb6de459 Mon Sep 17 00:00:00 2001 From: Frank Natividad Date: Wed, 27 Jan 2021 14:23:36 -0800 Subject: [PATCH 09/14] address feedback --- google-cloud-nio/pom.xml | 43 ---------------- .../nio/CloudStorageFileSystemProvider.java | 2 - .../java.nio.file.spi.FileSystemProvider | 14 ++++++ pom.xml | 49 ------------------- 4 files changed, 14 insertions(+), 94 deletions(-) create mode 100644 google-cloud-nio/src/main/resources/META-INF/services/java.nio.file.spi.FileSystemProvider diff --git a/google-cloud-nio/pom.xml b/google-cloud-nio/pom.xml index 14214e39..7ed8f291 100644 --- a/google-cloud-nio/pom.xml +++ b/google-cloud-nio/pom.xml @@ -47,17 +47,6 @@ javax.inject 1 - - com.google.auto.service - auto-service - 1.0-rc3 - true - provided - - - com.google.auto.value - auto-value-annotations - com.google.code.findbugs jsr305 @@ -100,28 +89,6 @@ false - - maven-compiler-plugin - 3.8.1 - - 1.7 - 1.7 - UTF-8 - -Xlint:unchecked - - - com.google.auto.value - auto-value - 1.7.4 - - - com.google.auto.service - auto-service - 1.0-rc7 - - - - org.apache.maven.plugins @@ -181,16 +148,6 @@ - - org.apache.maven.plugins - maven-dependency-plugin - - - com.google.auto.value:auto-value - com.google.auto.service:auto-service - - - diff --git a/google-cloud-nio/src/main/java/com/google/cloud/storage/contrib/nio/CloudStorageFileSystemProvider.java b/google-cloud-nio/src/main/java/com/google/cloud/storage/contrib/nio/CloudStorageFileSystemProvider.java index 7d5e9c97..4f2953b3 100644 --- a/google-cloud-nio/src/main/java/com/google/cloud/storage/contrib/nio/CloudStorageFileSystemProvider.java +++ b/google-cloud-nio/src/main/java/com/google/cloud/storage/contrib/nio/CloudStorageFileSystemProvider.java @@ -21,7 +21,6 @@ import static com.google.common.base.Strings.isNullOrEmpty; import com.google.api.gax.paging.Page; -import com.google.auto.service.AutoService; import com.google.cloud.storage.Acl; import com.google.cloud.storage.Blob; import com.google.cloud.storage.BlobId; @@ -86,7 +85,6 @@ */ @Singleton @ThreadSafe -@AutoService(FileSystemProvider.class) public final class CloudStorageFileSystemProvider extends FileSystemProvider { private Storage storage; diff --git a/google-cloud-nio/src/main/resources/META-INF/services/java.nio.file.spi.FileSystemProvider b/google-cloud-nio/src/main/resources/META-INF/services/java.nio.file.spi.FileSystemProvider new file mode 100644 index 00000000..cdacea41 --- /dev/null +++ b/google-cloud-nio/src/main/resources/META-INF/services/java.nio.file.spi.FileSystemProvider @@ -0,0 +1,14 @@ +# Copyright 2021 Google LLC +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +com.google.cloud.storage.contrib.nio.CloudStorageFileSystemProvider diff --git a/pom.xml b/pom.xml index 64a1d6c2..5fe70939 100644 --- a/pom.xml +++ b/pom.xml @@ -94,11 +94,6 @@ google-api-services-storage v1-rev20200611-1.30.9 - - com.google.auto.value - auto-value-annotations - ${auto-value-annotation.version} - junit junit @@ -113,38 +108,6 @@ - - - - - maven-compiler-plugin - - - - com.google.auto.value - auto-value - 1.7.4 - - - com.google.auto.service - auto-service - 1.0-rc7 - - - - - - org.apache.maven.plugins - maven-dependency-plugin - - - com.google.auto.value:auto-value-annotations - - - - - - google-cloud-nio @@ -218,18 +181,6 @@ - - maven-compiler-plugin - - - - com.google.auto.value - auto-value - ${auto-value.version} - - - - From 81e8a36a738076612c40999856ced9a965cdf992 Mon Sep 17 00:00:00 2001 From: Frank Natividad Date: Wed, 27 Jan 2021 14:28:38 -0800 Subject: [PATCH 10/14] add EnableAutoValue.txt --- google-cloud-nio/EnableAutoValue.txt | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 google-cloud-nio/EnableAutoValue.txt diff --git a/google-cloud-nio/EnableAutoValue.txt b/google-cloud-nio/EnableAutoValue.txt new file mode 100644 index 00000000..e69de29b From c010b606e9058efea1aa84b50e5a4b8efb8057a0 Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Thu, 28 Jan 2021 10:09:12 -0500 Subject: [PATCH 11/14] mockito for Java 7 --- google-cloud-nio/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/google-cloud-nio/pom.xml b/google-cloud-nio/pom.xml index 78f3bdf1..2e18d0f4 100644 --- a/google-cloud-nio/pom.xml +++ b/google-cloud-nio/pom.xml @@ -70,7 +70,7 @@ org.mockito mockito-core - 3.7.0 + 2.28.2 test org.hamcrest From 9e62484beeb048de5d11d9056d34a7161532e5ef Mon Sep 17 00:00:00 2001 From: Frank Natividad Date: Thu, 28 Jan 2021 13:02:24 -0800 Subject: [PATCH 12/14] add auto-value-annotations to project deps --- google-cloud-nio/pom.xml | 4 ++++ pom.xml | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/google-cloud-nio/pom.xml b/google-cloud-nio/pom.xml index 2e18d0f4..8cc3169c 100644 --- a/google-cloud-nio/pom.xml +++ b/google-cloud-nio/pom.xml @@ -42,6 +42,10 @@ com.google.http-client google-http-client + + com.google.auto.value + auto-value-annotations + javax.inject javax.inject diff --git a/pom.xml b/pom.xml index 3f0fea5d..812b2b3b 100644 --- a/pom.xml +++ b/pom.xml @@ -94,6 +94,12 @@ google-api-services-storage v1-rev20201112-1.31.0 + + com.google.auto.value + auto-value-annotations + provided + ${auto-value-annotation.version} + junit junit From d153920eab4ce5ca371f8c111473ce6209d953cb Mon Sep 17 00:00:00 2001 From: Frank Natividad Date: Thu, 28 Jan 2021 14:06:14 -0800 Subject: [PATCH 13/14] add retries to tests --- .kokoro/build.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.kokoro/build.sh b/.kokoro/build.sh index 454c4aa2..4e488ef4 100755 --- a/.kokoro/build.sh +++ b/.kokoro/build.sh @@ -47,7 +47,8 @@ set +e case ${JOB_TYPE} in test) - mvn test -B -Dclirr.skip=true -Denforcer.skip=true + retry_with_backoff 3 10 \ + mvn test -B -Dclirr.skip=true -Denforcer.skip=true RETURN_CODE=$? ;; lint) From 375ff4d9c95f7bf5faa0182f878cb809db849cfd Mon Sep 17 00:00:00 2001 From: Frank Natividad Date: Thu, 28 Jan 2021 14:25:02 -0800 Subject: [PATCH 14/14] revert retry in build.sh --- .kokoro/build.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.kokoro/build.sh b/.kokoro/build.sh index 4e488ef4..454c4aa2 100755 --- a/.kokoro/build.sh +++ b/.kokoro/build.sh @@ -47,8 +47,7 @@ set +e case ${JOB_TYPE} in test) - retry_with_backoff 3 10 \ - mvn test -B -Dclirr.skip=true -Denforcer.skip=true + mvn test -B -Dclirr.skip=true -Denforcer.skip=true RETURN_CODE=$? ;; lint)