diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml new file mode 100644 index 000000000..731a0eb4a --- /dev/null +++ b/.github/.OwlBot.lock.yaml @@ -0,0 +1,3 @@ +docker: + image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest + digest: sha256:491a007c6bd6e77f9e9b1bebcd6cdf08a4a4ef2c228c123d9696845204cb685d diff --git a/synth.py b/.github/.OwlBot.yaml similarity index 64% rename from synth.py rename to .github/.OwlBot.yaml index cb1a283f1..5d9a9d8b5 100644 --- a/synth.py +++ b/.github/.OwlBot.yaml @@ -1,4 +1,4 @@ -# Copyright 2019 Google LLC +# 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. @@ -11,14 +11,6 @@ # 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. -"""This script is used to synthesize generated parts of this library.""" -import synthtool.languages.java as java - -java.common_templates(excludes=[ - "README.md", - "java.header", - "checkstyle.xml", - "license-checks.xml", - ".github/workflows/samples.yaml", -]) +docker: + image: "gcr.io/cloud-devrel-public-resources/owlbot-java:latest" diff --git a/.github/release-please.yml b/.github/release-please.yml index cf39204dd..202596e5c 100644 --- a/.github/release-please.yml +++ b/.github/release-please.yml @@ -6,3 +6,7 @@ branches: handleGHRelease: true releaseType: java-lts branch: 1.39.2-sp + - bumpMinorPreMajor: true + handleGHRelease: true + releaseType: java-backport + branch: 1.40.x diff --git a/.github/sync-repo-settings.yaml b/.github/sync-repo-settings.yaml index a1781ed43..3c0c8aa6c 100644 --- a/.github/sync-repo-settings.yaml +++ b/.github/sync-repo-settings.yaml @@ -30,6 +30,20 @@ branchProtectionRules: - lint - clirr - cla/google + - pattern: 1.40.x + isAdminEnforced: true + requiredApprovingReviewCount: 1 + requiresCodeOwnerReviews: true + requiresStrictStatusChecks: false + requiredStatusCheckContexts: + - units (8) + - units (11) + - windows + - dependencies (8) + - dependencies (11) + - lint + - clirr + - cla/google permissionRules: - team: yoshi-admins permission: admin diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 2425d7234..05de1f60d 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -8,13 +8,11 @@ jobs: units: runs-on: ubuntu-latest strategy: + fail-fast: false matrix: java: [8, 11, 17] steps: - uses: actions/checkout@v2 - - uses: stCarolas/setup-maven@v4 - with: - maven-version: 3.8.1 - uses: actions/setup-java@v2 with: distribution: zulu @@ -27,9 +25,6 @@ jobs: runs-on: windows-latest steps: - uses: actions/checkout@v2 - - uses: stCarolas/setup-maven@v4 - with: - maven-version: 3.8.1 - uses: actions/setup-java@v2 with: distribution: zulu @@ -45,9 +40,6 @@ jobs: java: [8, 11, 17] steps: - uses: actions/checkout@v2 - - uses: stCarolas/setup-maven@v4 - with: - maven-version: 3.8.1 - uses: actions/setup-java@v2 with: distribution: zulu @@ -58,13 +50,10 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - uses: stCarolas/setup-maven@v4 - with: - maven-version: 3.8.1 - uses: actions/setup-java@v2 with: distribution: zulu - java-version: 8 + java-version: 11 - run: java -version - run: .kokoro/build.sh env: @@ -73,9 +62,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - uses: stCarolas/setup-maven@v4 - with: - maven-version: 3.8.1 - uses: actions/setup-java@v2 with: distribution: zulu diff --git a/.kokoro/build.sh b/.kokoro/build.sh index 0ab303fec..f0b868377 100755 --- a/.kokoro/build.sh +++ b/.kokoro/build.sh @@ -47,15 +47,15 @@ set +e case ${JOB_TYPE} in test) - mvn test -B -Dclirr.skip=true -Denforcer.skip=true + mvn test -B -ntp -Dclirr.skip=true -Denforcer.skip=true RETURN_CODE=$? ;; lint) - mvn com.coveo:fmt-maven-plugin:check + mvn com.coveo:fmt-maven-plugin:check -B -ntp RETURN_CODE=$? ;; javadoc) - mvn javadoc:javadoc javadoc:test-javadoc + mvn javadoc:javadoc javadoc:test-javadoc -B -ntp RETURN_CODE=$? ;; integration) @@ -69,6 +69,11 @@ integration) verify RETURN_CODE=$? ;; +graalvm) + # Run Unit and Integration Tests with Native Image + mvn -B ${INTEGRATION_TEST_ARGS} -ntp -Pnative -Penable-integration-tests test + RETURN_CODE=$? + ;; samples) SAMPLES_DIR=samples # only run ITs in snapshot/ on presubmit PRs. run ITs in all 3 samples/ subdirectories otherwise. @@ -86,7 +91,6 @@ samples) pushd ${SAMPLES_DIR} mvn -B \ - -Penable-samples \ -ntp \ -DtrimStackTrace=false \ -Dclirr.skip=true \ @@ -100,7 +104,7 @@ samples) fi ;; clirr) - mvn -B -Denforcer.skip=true clirr:check + mvn -B -ntp -Denforcer.skip=true clirr:check RETURN_CODE=$? ;; *) diff --git a/.kokoro/dependencies.sh b/.kokoro/dependencies.sh index 9a5105d7e..d7476cfe9 100755 --- a/.kokoro/dependencies.sh +++ b/.kokoro/dependencies.sh @@ -38,15 +38,13 @@ function determineMavenOpts() { | sed -E 's/^(1\.[0-9]\.0).*$/\1/g' ) - case $javaVersion in - "17") + if [[ $javaVersion == 17* ]] + then # MaxPermSize is no longer supported as of jdk 17 echo -n "-Xmx1024m" - ;; - *) + else echo -n "-Xmx1024m -XX:MaxPermSize=128m" - ;; - esac + fi } export MAVEN_OPTS=$(determineMavenOpts) diff --git a/.kokoro/presubmit/graalvm-native.cfg b/.kokoro/presubmit/graalvm-native.cfg new file mode 100644 index 000000000..4c7225ec9 --- /dev/null +++ b/.kokoro/presubmit/graalvm-native.cfg @@ -0,0 +1,33 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/graalvm" +} + +env_vars: { + key: "JOB_TYPE" + value: "graalvm" +} + +# TODO: remove this after we've migrated all tests and scripts +env_vars: { + key: "GCLOUD_PROJECT" + value: "gcloud-devel" +} + +env_vars: { + key: "GOOGLE_CLOUD_PROJECT" + value: "gcloud-devel" +} + +env_vars: { + key: "GOOGLE_APPLICATION_CREDENTIALS" + value: "secret_manager/java-it-service-account" +} + +env_vars: { + key: "SECRET_MANAGER_KEYS" + value: "java-it-service-account" +} diff --git a/.kokoro/release/publish_javadoc11.sh b/.kokoro/release/publish_javadoc11.sh index 7c5f7f6f6..62ffd0776 100755 --- a/.kokoro/release/publish_javadoc11.sh +++ b/.kokoro/release/publish_javadoc11.sh @@ -36,13 +36,9 @@ mvn clean install -B -q -DskipTests=true export NAME=google-http-client export VERSION=$(grep ${NAME}: versions.txt | cut -d: -f3) -# V3 generates docfx yml from javadoc -# generate yml -mvn clean site -B -q -P docFX - -# copy README to docfx-yml dir and rename index.md -cp README.md target/docfx-yml/index.md -# copy CHANGELOG to docfx-yml dir and rename history.md +# cloud RAD generation +mvn clean javadoc:aggregate -B -q -P docFX +# include CHANGELOG cp CHANGELOG.md target/docfx-yml/history.md pushd target/docfx-yml diff --git a/CHANGELOG.md b/CHANGELOG.md index 9c3c2da18..02c1f66b1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,33 @@ # Changelog +## [1.41.0](https://www.github.com/googleapis/google-http-java-client/compare/v1.40.1...v1.41.0) (2022-01-05) + + +### Features + +* add AttemptCount to HttpResponseException ([#1505](https://www.github.com/googleapis/google-http-java-client/issues/1505)) ([ea0f6c0](https://www.github.com/googleapis/google-http-java-client/commit/ea0f6c0f58e8abffae1362feb344a9309d6d814e)) +* next release from main branch is 1.41.0 ([#1478](https://www.github.com/googleapis/google-http-java-client/issues/1478)) ([3ad4831](https://www.github.com/googleapis/google-http-java-client/commit/3ad4831da00579f534ff7eb7de3a0386068902ba)) + + +### Bug Fixes + +* **java:** add -ntp flag to native image testing command ([#1299](https://www.github.com/googleapis/google-http-java-client/issues/1299)) ([#1522](https://www.github.com/googleapis/google-http-java-client/issues/1522)) ([39f63c3](https://www.github.com/googleapis/google-http-java-client/commit/39f63c3ea255fe256391567e66ada7b4122b16f6)) +* **java:** java 17 dependency arguments ([#1266](https://www.github.com/googleapis/google-http-java-client/issues/1266)) ([#1489](https://www.github.com/googleapis/google-http-java-client/issues/1489)) ([4a26e18](https://www.github.com/googleapis/google-http-java-client/commit/4a26e1881075a4f361ec746c2444111c911a8d9f)) + + +### Dependencies + +* update dependency com.coveo:fmt-maven-plugin to v2.12 ([#1487](https://www.github.com/googleapis/google-http-java-client/issues/1487)) ([8b1b8f2](https://www.github.com/googleapis/google-http-java-client/commit/8b1b8f280774115d0521e0f5eada6dd0ef995ca2)) +* update dependency com.google.code.gson:gson to v2.8.9 ([#1492](https://www.github.com/googleapis/google-http-java-client/issues/1492)) ([6615933](https://www.github.com/googleapis/google-http-java-client/commit/6615933e3162969f16d8a0d887afe9f4011e9e5c)) +* update dependency com.google.errorprone:error_prone_annotations to v2.10.0 ([#1498](https://www.github.com/googleapis/google-http-java-client/issues/1498)) ([a6a73c2](https://www.github.com/googleapis/google-http-java-client/commit/a6a73c25104aa2074b0a2bcf021513f943c727d4)) +* update dependency com.google.protobuf:protobuf-java to v3.19.1 ([#1488](https://www.github.com/googleapis/google-http-java-client/issues/1488)) ([24e6c51](https://www.github.com/googleapis/google-http-java-client/commit/24e6c51112e42f12701b5213a4c5f96466d3f7e2)) +* update dependency com.google.protobuf:protobuf-java to v3.19.2 ([#1539](https://www.github.com/googleapis/google-http-java-client/issues/1539)) ([772370a](https://www.github.com/googleapis/google-http-java-client/commit/772370aad7269d30971a38b4471e534d1af9c45a)) +* update dependency com.puppycrawl.tools:checkstyle to v9.1 ([#1493](https://www.github.com/googleapis/google-http-java-client/issues/1493)) ([87b980b](https://www.github.com/googleapis/google-http-java-client/commit/87b980b72f7764aae2a1c5f38d321b25ed7471c4)) +* update dependency com.puppycrawl.tools:checkstyle to v9.2 ([#1510](https://www.github.com/googleapis/google-http-java-client/issues/1510)) ([0922b67](https://www.github.com/googleapis/google-http-java-client/commit/0922b670e4949ca45b2b25a2d89eea2818349a35)) +* update dependency org.apache.httpcomponents:httpcore to v4.4.15 ([#1523](https://www.github.com/googleapis/google-http-java-client/issues/1523)) ([6148d97](https://www.github.com/googleapis/google-http-java-client/commit/6148d9732a7bd745064d68706de75707a9acbb8f)) +* update project.appengine.version to v1.9.92 ([#1495](https://www.github.com/googleapis/google-http-java-client/issues/1495)) ([43c3b11](https://www.github.com/googleapis/google-http-java-client/commit/43c3b116a173d639a1214121e21ffea2fc32935c)) +* update project.appengine.version to v1.9.93 ([#1516](https://www.github.com/googleapis/google-http-java-client/issues/1516)) ([2fa47c6](https://www.github.com/googleapis/google-http-java-client/commit/2fa47c63e5422bf88fe1320e97e0f61265792d8a)) + ### [1.40.1](https://www.github.com/googleapis/google-http-java-client/compare/v1.40.0...v1.40.1) (2021-10-07) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f2dbdee06..b65dd279c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -53,12 +53,12 @@ mvn -Penable-integration-tests clean verify ## Code Samples -Code Samples must be bundled in separate Maven modules, and guarded by a -Maven profile with the name `enable-samples`. +All code samples must be in compliance with the [java sample formatting guide][3]. +Code Samples must be bundled in separate Maven modules. The samples must be separate from the primary project for a few reasons: -1. Primary projects have a minimum Java version of Java 7 whereas samples have - a minimum Java version of Java 8. Due to this we need the ability to +1. Primary projects have a minimum Java version of Java 8 whereas samples can have + Java version of Java 11. Due to this we need the ability to selectively exclude samples from a build run. 2. Many code samples depend on external GCP services and need credentials to access the service. @@ -68,39 +68,16 @@ The samples must be separate from the primary project for a few reasons: ### Building ```bash -mvn -Penable-samples clean verify +mvn clean verify ``` Some samples require access to GCP services and require a service account: ```bash export GOOGLE_APPLICATION_CREDENTIALS=/path/to/service/account.json -mvn -Penable-samples clean verify +mvn clean verify ``` -### Profile Config - -1. To add samples in a profile to your Maven project, add the following to your -`pom.xml` - - ```xml - - [...] - - - enable-samples - - sample - - - - [...] - - ``` - -2. [Activate](#profile-activation) the profile. -3. Define your samples in a normal Maven project in the `samples/` directory. - ### Code Formatting Code in this repo is formatted with @@ -110,30 +87,6 @@ To run formatting on your project, you can run: mvn com.coveo:fmt-maven-plugin:format ``` -### Profile Activation - -To include code samples when building and testing the project, enable the -`enable-samples` Maven profile. - -#### Command line - -To activate the Maven profile on the command line add `-Penable-samples` to your -Maven command. - -#### Maven `settings.xml` - -To activate the Maven profile in your `~/.m2/settings.xml` add an entry of -`enable-samples` following the instructions in [Active Profiles][2]. - -This method has the benefit of applying to all projects you build (and is -respected by IntelliJ IDEA) and is recommended if you are going to be -contributing samples to several projects. - -#### IntelliJ IDEA - -To activate the Maven Profile inside IntelliJ IDEA, follow the instructions in -[Activate Maven profiles][3] to activate `enable-samples`. - [1]: https://cloud.google.com/docs/authentication/getting-started#creating_a_service_account [2]: https://maven.apache.org/settings.html#Active_Profiles -[3]: https://www.jetbrains.com/help/idea/work-with-maven-profiles.html#activate_maven_profiles +[3]: https://github.com/GoogleCloudPlatform/java-docs-samples/blob/main/SAMPLE_FORMAT.md \ No newline at end of file diff --git a/docs/setup.md b/docs/setup.md index 3e57c0741..0db41a40f 100644 --- a/docs/setup.md +++ b/docs/setup.md @@ -23,7 +23,7 @@ the `dependencyManagement` section of your `pom.xml`: com.google.cloud libraries-bom - 23.1.0 + 24.1.1 pom import diff --git a/google-http-client-android-test/pom.xml b/google-http-client-android-test/pom.xml index 189057394..530aa1612 100644 --- a/google-http-client-android-test/pom.xml +++ b/google-http-client-android-test/pom.xml @@ -4,7 +4,7 @@ google-http-client google-http-client-android-test Test project for google-http-client-android. - 1.40.1 + 1.41.0 apk @@ -53,7 +53,7 @@ com.google.http-client google-http-client-android - 1.40.1 + 1.41.0 android @@ -72,7 +72,7 @@ com.google.http-client google-http-client-test - 1.40.1 + 1.41.0 junit diff --git a/google-http-client-android-test/src/main/java/com/google/api/client/extensions/android/json/AndroidJsonFactoryTest.java b/google-http-client-android-test/src/main/java/com/google/api/client/extensions/android/json/AndroidJsonFactoryTest.java index 9357ffdd0..0665acc2a 100644 --- a/google-http-client-android-test/src/main/java/com/google/api/client/extensions/android/json/AndroidJsonFactoryTest.java +++ b/google-http-client-android-test/src/main/java/com/google/api/client/extensions/android/json/AndroidJsonFactoryTest.java @@ -15,7 +15,6 @@ import com.google.api.client.json.JsonFactory; import com.google.api.client.test.json.AbstractJsonFactoryTest; - import java.util.ArrayList; /** @@ -24,16 +23,31 @@ * @author Yaniv Inbar */ public class AndroidJsonFactoryTest extends AbstractJsonFactoryTest { - + private static final String GSON_LINE_SEPARATOR = "\n"; private static final String JSON_ENTRY_PRETTY = "{" + GSON_LINE_SEPARATOR + " \"title\": \"foo\"" + GSON_LINE_SEPARATOR + "}"; - private static final String JSON_FEED_PRETTY = "{" + GSON_LINE_SEPARATOR + " \"entries\": [" - + GSON_LINE_SEPARATOR + " {" + GSON_LINE_SEPARATOR + " \"title\": \"foo\"" - + GSON_LINE_SEPARATOR + " }," + GSON_LINE_SEPARATOR + " {" - + GSON_LINE_SEPARATOR + " \"title\": \"bar\"" + GSON_LINE_SEPARATOR + " }" - + GSON_LINE_SEPARATOR + " ]" + GSON_LINE_SEPARATOR + "}"; + private static final String JSON_FEED_PRETTY = + "{" + + GSON_LINE_SEPARATOR + + " \"entries\": [" + + GSON_LINE_SEPARATOR + + " {" + + GSON_LINE_SEPARATOR + + " \"title\": \"foo\"" + + GSON_LINE_SEPARATOR + + " }," + + GSON_LINE_SEPARATOR + + " {" + + GSON_LINE_SEPARATOR + + " \"title\": \"bar\"" + + GSON_LINE_SEPARATOR + + " }" + + GSON_LINE_SEPARATOR + + " ]" + + GSON_LINE_SEPARATOR + + "}"; public AndroidJsonFactoryTest(String name) { super(name); @@ -61,5 +75,4 @@ public final void testToPrettyString_Feed() throws Exception { feed.entries.add(entryBar); assertEquals(JSON_FEED_PRETTY, newFactory().toPrettyString(feed)); } - } diff --git a/google-http-client-android-test/src/main/java/com/google/api/client/extensions/android/json/FakeTest.java b/google-http-client-android-test/src/main/java/com/google/api/client/extensions/android/json/FakeTest.java index 755613857..e917e114b 100644 --- a/google-http-client-android-test/src/main/java/com/google/api/client/extensions/android/json/FakeTest.java +++ b/google-http-client-android-test/src/main/java/com/google/api/client/extensions/android/json/FakeTest.java @@ -26,6 +26,5 @@ public FakeTest(String name) { super(name); } - public final void test() throws Exception { - } + public final void test() throws Exception {} } diff --git a/google-http-client-android-test/src/main/java/com/google/api/client/extensions/android/json/package-info.java b/google-http-client-android-test/src/main/java/com/google/api/client/extensions/android/json/package-info.java index 8fdf668d9..7ecefd770 100644 --- a/google-http-client-android-test/src/main/java/com/google/api/client/extensions/android/json/package-info.java +++ b/google-http-client-android-test/src/main/java/com/google/api/client/extensions/android/json/package-info.java @@ -17,6 +17,4 @@ * * @author Yaniv Inbar */ - package com.google.api.client.extensions.android.json; - diff --git a/google-http-client-android/pom.xml b/google-http-client-android/pom.xml index 383e11642..ea7daee37 100644 --- a/google-http-client-android/pom.xml +++ b/google-http-client-android/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.40.1 + 1.41.0 ../pom.xml google-http-client-android - 1.40.1 + 1.41.0 Android Platform Extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-v2/pom.xml b/google-http-client-apache-v2/pom.xml index f65cef781..3487aa514 100644 --- a/google-http-client-apache-v2/pom.xml +++ b/google-http-client-apache-v2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.40.1 + 1.41.0 ../pom.xml google-http-client-apache-v2 - 1.40.1 + 1.41.0 Apache HTTP transport v2 for the Google HTTP Client Library for Java. diff --git a/google-http-client-appengine/pom.xml b/google-http-client-appengine/pom.xml index 1ceaf996a..4c7e2db64 100644 --- a/google-http-client-appengine/pom.xml +++ b/google-http-client-appengine/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.40.1 + 1.41.0 ../pom.xml google-http-client-appengine - 1.40.1 + 1.41.0 Google App Engine extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-assembly/pom.xml b/google-http-client-assembly/pom.xml index 0c6c62104..664eff698 100644 --- a/google-http-client-assembly/pom.xml +++ b/google-http-client-assembly/pom.xml @@ -4,12 +4,12 @@ com.google.http-client google-http-client-parent - 1.40.1 + 1.41.0 ../pom.xml com.google.http-client google-http-client-assembly - 1.40.1 + 1.41.0 pom Assembly for the Google HTTP Client Library for Java diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index 01519dbc1..62e749d90 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.http-client google-http-client-bom - 1.40.1 + 1.41.0 pom Google HTTP Client Library for Java BOM @@ -63,52 +63,52 @@ com.google.http-client google-http-client - 1.40.1 + 1.41.0 com.google.http-client google-http-client-android - 1.40.1 + 1.41.0 com.google.http-client google-http-client-apache-v2 - 1.40.1 + 1.41.0 com.google.http-client google-http-client-appengine - 1.40.1 + 1.41.0 com.google.http-client google-http-client-findbugs - 1.40.1 + 1.41.0 com.google.http-client google-http-client-gson - 1.40.1 + 1.41.0 com.google.http-client google-http-client-jackson2 - 1.40.1 + 1.41.0 com.google.http-client google-http-client-protobuf - 1.40.1 + 1.41.0 com.google.http-client google-http-client-test - 1.40.1 + 1.41.0 com.google.http-client google-http-client-xml - 1.40.1 + 1.41.0 @@ -144,18 +144,10 @@ com.coveo fmt-maven-plugin - 2.9 + 2.13 - true - - - com.google.googlejavaformat - google-java-format - 1.7 - - diff --git a/google-http-client-findbugs/google-http-client-findbugs-test/src/main/java/com/google/api/client/findbugs/test/BetaClass.java b/google-http-client-findbugs/google-http-client-findbugs-test/src/main/java/com/google/api/client/findbugs/test/BetaClass.java index bd2ddb50e..13ed288cc 100644 --- a/google-http-client-findbugs/google-http-client-findbugs-test/src/main/java/com/google/api/client/findbugs/test/BetaClass.java +++ b/google-http-client-findbugs/google-http-client-findbugs-test/src/main/java/com/google/api/client/findbugs/test/BetaClass.java @@ -20,8 +20,7 @@ @Beta public class BetaClass { - public void method() { - } + public void method() {} @Beta public void betaMethod() { @@ -36,8 +35,7 @@ public BetaClass() { int field; - @Beta - int betaField; + @Beta int betaField; @Override public String toString() { diff --git a/google-http-client-findbugs/google-http-client-findbugs-test/src/main/java/com/google/api/client/findbugs/test/ClassWithBetaField.java b/google-http-client-findbugs/google-http-client-findbugs-test/src/main/java/com/google/api/client/findbugs/test/ClassWithBetaField.java index ea1c5315c..4ceb1cb17 100644 --- a/google-http-client-findbugs/google-http-client-findbugs-test/src/main/java/com/google/api/client/findbugs/test/ClassWithBetaField.java +++ b/google-http-client-findbugs/google-http-client-findbugs-test/src/main/java/com/google/api/client/findbugs/test/ClassWithBetaField.java @@ -19,12 +19,10 @@ /** A class which contains {@link Beta} fields. */ public class ClassWithBetaField { - @Beta - public int betaField; + @Beta public int betaField; public int field; - @Beta - public static final int betaStaticField = 10; + @Beta public static final int betaStaticField = 10; public static final int staticField = 20; public ClassWithBetaField() { diff --git a/google-http-client-findbugs/google-http-client-findbugs-test/src/main/java/com/google/api/client/findbugs/test/ClassWithBetaMethod.java b/google-http-client-findbugs/google-http-client-findbugs-test/src/main/java/com/google/api/client/findbugs/test/ClassWithBetaMethod.java index 85082217b..3c80ee4be 100644 --- a/google-http-client-findbugs/google-http-client-findbugs-test/src/main/java/com/google/api/client/findbugs/test/ClassWithBetaMethod.java +++ b/google-http-client-findbugs/google-http-client-findbugs-test/src/main/java/com/google/api/client/findbugs/test/ClassWithBetaMethod.java @@ -19,8 +19,7 @@ /** A class which contains {@link Beta} methods. */ public class ClassWithBetaMethod { - @Beta - int betaField = 10; + @Beta int betaField = 10; @Beta public void betaMethod() { diff --git a/google-http-client-findbugs/pom.xml b/google-http-client-findbugs/pom.xml index f9d9b03f4..c8e0bc4a4 100644 --- a/google-http-client-findbugs/pom.xml +++ b/google-http-client-findbugs/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.40.1 + 1.41.0 ../pom.xml google-http-client-findbugs - 1.40.1 + 1.41.0 Google APIs Client Library Findbugs custom plugin. diff --git a/google-http-client-gson/pom.xml b/google-http-client-gson/pom.xml index ad768a4d0..f7d6040fe 100644 --- a/google-http-client-gson/pom.xml +++ b/google-http-client-gson/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.40.1 + 1.41.0 ../pom.xml google-http-client-gson - 1.40.1 + 1.41.0 GSON extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-jackson2/pom.xml b/google-http-client-jackson2/pom.xml index 1d9ef4286..0096fe1d8 100644 --- a/google-http-client-jackson2/pom.xml +++ b/google-http-client-jackson2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.40.1 + 1.41.0 ../pom.xml google-http-client-jackson2 - 1.40.1 + 1.41.0 Jackson 2 extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-protobuf/pom.xml b/google-http-client-protobuf/pom.xml index 5f6cd1b84..05872012b 100644 --- a/google-http-client-protobuf/pom.xml +++ b/google-http-client-protobuf/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.40.1 + 1.41.0 ../pom.xml google-http-client-protobuf - 1.40.1 + 1.41.0 Protocol Buffer extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-test/pom.xml b/google-http-client-test/pom.xml index 5bd3dc575..c41739b50 100644 --- a/google-http-client-test/pom.xml +++ b/google-http-client-test/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.40.1 + 1.41.0 ../pom.xml google-http-client-test - 1.40.1 + 1.41.0 Shared classes used for testing of artifacts in the Google HTTP Client Library for Java. diff --git a/google-http-client-xml/pom.xml b/google-http-client-xml/pom.xml index 2e533db6f..ca706248c 100644 --- a/google-http-client-xml/pom.xml +++ b/google-http-client-xml/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.40.1 + 1.41.0 ../pom.xml google-http-client-xml - 1.40.1 + 1.41.0 XML extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index 5c5314c17..2939d4696 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.40.1 + 1.41.0 ../pom.xml google-http-client - 1.40.1 + 1.41.0 Google HTTP Client Library for Java Google HTTP Client Library for Java. Functionality that works on all supported Java platforms, diff --git a/google-http-client/src/main/java/com/google/api/client/http/GZipEncoding.java b/google-http-client/src/main/java/com/google/api/client/http/GZipEncoding.java index c811b002c..fce2289da 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/GZipEncoding.java +++ b/google-http-client/src/main/java/com/google/api/client/http/GZipEncoding.java @@ -45,6 +45,7 @@ public void close() throws IOException { try { flush(); } catch (IOException ignored) { + // fall through } } }; diff --git a/google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java b/google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java index 312702b9a..78f15d868 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java +++ b/google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java @@ -1113,7 +1113,9 @@ public HttpResponse execute() throws IOException { // throw an exception if unsuccessful response if (throwExceptionOnExecuteError && !response.isSuccessStatusCode()) { try { - throw new HttpResponseException(response); + throw new HttpResponseException.Builder(response) + .setAttemptCount(numRetries - retriesRemaining) + .build(); } finally { response.disconnect(); } diff --git a/google-http-client/src/main/java/com/google/api/client/http/HttpResponseException.java b/google-http-client/src/main/java/com/google/api/client/http/HttpResponseException.java index a9d80a4f5..63bf6fe4c 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/HttpResponseException.java +++ b/google-http-client/src/main/java/com/google/api/client/http/HttpResponseException.java @@ -42,6 +42,9 @@ public class HttpResponseException extends IOException { /** HTTP response content or {@code null} for none. */ private final String content; + /** Number of attempts performed */ + private final int attemptCount; + /** * Constructor that constructs a detail message from the given HTTP response that includes the * status code, status message and HTTP response content. @@ -73,6 +76,7 @@ protected HttpResponseException(Builder builder) { statusMessage = builder.statusMessage; headers = builder.headers; content = builder.content; + attemptCount = builder.attemptCount; } /** @@ -121,6 +125,15 @@ public final String getContent() { return content; } + /** + * Returns the attempt count + * + * @since 1.41 + */ + public final int getAttemptCount() { + return attemptCount; + } + /** * Builder. * @@ -145,6 +158,9 @@ public static class Builder { /** Detail message to use or {@code null} for none. */ String message; + /** Number of attempts performed */ + int attemptCount; + /** * @param statusCode HTTP status code * @param statusMessage status message or {@code null} @@ -260,6 +276,18 @@ public Builder setContent(String content) { return this; } + /** Returns the request attempt count */ + public final int getAttemptCount() { + return attemptCount; + } + + /** Sets the attempt count for the related HTTP request execution. */ + public Builder setAttemptCount(int attemptCount) { + Preconditions.checkArgument(attemptCount >= 0); + this.attemptCount = attemptCount; + return this; + } + /** Returns a new instance of {@link HttpResponseException} based on this builder. */ public HttpResponseException build() { return new HttpResponseException(this); diff --git a/google-http-client/src/main/java/com/google/api/client/testing/util/TestableByteArrayInputStream.java b/google-http-client/src/main/java/com/google/api/client/testing/util/TestableByteArrayInputStream.java index 270925a8f..3513579b5 100644 --- a/google-http-client/src/main/java/com/google/api/client/testing/util/TestableByteArrayInputStream.java +++ b/google-http-client/src/main/java/com/google/api/client/testing/util/TestableByteArrayInputStream.java @@ -41,7 +41,7 @@ public TestableByteArrayInputStream(byte[] buf) { * @param offset offset in the buffer of the first byte to read * @param length maximum number of bytes to read from the buffer */ - public TestableByteArrayInputStream(byte buf[], int offset, int length) { + public TestableByteArrayInputStream(byte[] buf, int offset, int length) { super(buf); } diff --git a/google-http-client/src/main/java/com/google/api/client/util/ArrayValueMap.java b/google-http-client/src/main/java/com/google/api/client/util/ArrayValueMap.java index 07119ab96..41d5ca717 100644 --- a/google-http-client/src/main/java/com/google/api/client/util/ArrayValueMap.java +++ b/google-http-client/src/main/java/com/google/api/client/util/ArrayValueMap.java @@ -11,6 +11,7 @@ * or implied. See the License for the specific language governing permissions and limitations under * the License. */ + package com.google.api.client.util; import java.lang.reflect.Field; diff --git a/google-http-client/src/test/java/com/google/api/client/http/HttpResponseExceptionTest.java b/google-http-client/src/test/java/com/google/api/client/http/HttpResponseExceptionTest.java index 9066e9d70..cbe6e6a0d 100644 --- a/google-http-client/src/test/java/com/google/api/client/http/HttpResponseExceptionTest.java +++ b/google-http-client/src/test/java/com/google/api/client/http/HttpResponseExceptionTest.java @@ -23,6 +23,7 @@ import com.google.api.client.testing.http.MockHttpTransport; import com.google.api.client.testing.http.MockLowLevelHttpRequest; import com.google.api.client.testing.http.MockLowLevelHttpResponse; +import com.google.api.client.util.ExponentialBackOff; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.IOException; @@ -30,6 +31,7 @@ import java.io.ObjectOutput; import java.io.ObjectOutputStream; import junit.framework.TestCase; +import org.junit.Assert; import org.junit.function.ThrowingRunnable; /** @@ -208,6 +210,8 @@ public void run() throws Throwable { + SIMPLE_GENERIC_URL + LINE_SEPARATOR + "Unable to find resource"); + // no retries expected + assertEquals(1, responseException.getAttemptCount()); } public void testInvalidCharset() throws Exception { @@ -245,6 +249,50 @@ public void run() throws Throwable { .isEqualTo("404 Not Found\nGET " + SIMPLE_GENERIC_URL); } + public void testAttemptCountWithBackOff() throws Exception { + HttpTransport fakeTransport = + new MockHttpTransport() { + @Override + public LowLevelHttpRequest buildRequest(String method, String url) throws IOException { + return new MockLowLevelHttpRequest() { + @Override + public LowLevelHttpResponse execute() throws IOException { + MockLowLevelHttpResponse result = new MockLowLevelHttpResponse(); + result.setStatusCode(HttpStatusCodes.STATUS_CODE_SERVER_ERROR); + result.setReasonPhrase("Error"); + result.setContent("Unknown Error"); + return result; + } + }; + } + }; + ExponentialBackOff backoff = new ExponentialBackOff.Builder().build(); + final HttpRequest request = + fakeTransport.createRequestFactory().buildGetRequest(new GenericUrl("http://not/used")); + request.setUnsuccessfulResponseHandler( + new HttpBackOffUnsuccessfulResponseHandler(backoff) + .setBackOffRequired( + new HttpBackOffUnsuccessfulResponseHandler.BackOffRequired() { + public boolean isRequired(HttpResponse response) { + return true; + } + })); + request.setNumberOfRetries(1); + HttpResponseException responseException = + assertThrows( + HttpResponseException.class, + new ThrowingRunnable() { + @Override + public void run() throws Throwable { + request.execute(); + } + }); + + Assert.assertEquals(500, responseException.getStatusCode()); + // original request and 1 retry - total 2 + assertEquals(2, responseException.getAttemptCount()); + } + public void testUnsupportedCharset() throws Exception { HttpTransport transport = new MockHttpTransport() { diff --git a/owlbot.py b/owlbot.py new file mode 100644 index 000000000..8a64e3837 --- /dev/null +++ b/owlbot.py @@ -0,0 +1,32 @@ +# 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 +# +# https://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. + +import synthtool as s +from synthtool.languages import java + + +for library in s.get_staging_dirs(): + # put any special-case replacements here + s.move(library) + +s.remove_staging_dirs() +java.common_templates( + excludes=[ + "README.md", + "java.header", + "checkstyle.xml", + "license-checks.xml", + ".github/workflows/samples.yaml", + ] +) diff --git a/pom.xml b/pom.xml index c66450055..ceb5b2aa9 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.google.http-client google-http-client-parent - 1.40.1 + 1.41.0 pom Parent for the Google HTTP Client Library for Java Google HTTP Client Library for Java @@ -125,7 +125,7 @@ com.google.errorprone error_prone_annotations - 2.9.0 + 2.10.0 com.google.appengine @@ -542,18 +542,10 @@ com.coveo fmt-maven-plugin - 2.9 + 2.13 - true - - - com.google.googlejavaformat - google-java-format - 1.7 - - @@ -568,17 +560,17 @@ - google-api-java-client/google-api-client-assembly/android-properties (make the filenames match the version here) - Internally, update the default features.json file --> - 1.40.1 - 1.9.91 + 1.41.0 + 1.9.93 UTF-8 3.0.2 - 2.8.8 + 2.8.9 2.13.0 - 3.18.1 + 3.19.2 30.1.1-android 1.1.4c 4.5.13 - 4.4.14 + 4.4.15 0.28.0 .. false @@ -667,7 +659,7 @@ com.puppycrawl.tools checkstyle - 9.0.1 + 9.2 @@ -695,35 +687,44 @@ docFX - + + + java-docfx-doclet-1.4.0 + ${project.build.directory}/docfx-yml + ${project.artifactId} + + com\.google\.api\.client\.findbugs:com\.google\.api\.client\.test:com\.google\.api\.services + 8 + + + org.apache.maven.plugins maven-javadoc-plugin 3.3.1 - - - docFX - - javadoc - aggregate - aggregate-jar - - - com.microsoft.doclet.DocFxDoclet false - ${env.KOKORO_GFILE_DIR}/java-docfx-doclet-1.2.1.jar + + ${env.KOKORO_GFILE_DIR}/${docletName}.jar - -outputpath ${project.build.directory}/docfx-yml - -projectname ${artifactId} - -excludepackages com\.google\.api\.client\.findbugs:com\.google\.api\.client\.test:com\.google\.api\.services + -outputpath ${outputpath} + -projectname ${projectname} + -excludeclasses ${excludeclasses}: + -excludepackages ${excludePackages}: + none + protected + true + ${source} + + ${sourceFileExclude} + - + - - + + diff --git a/samples/dailymotion-simple-cmdline-sample/pom.xml b/samples/dailymotion-simple-cmdline-sample/pom.xml index 259925535..522b5cd33 100644 --- a/samples/dailymotion-simple-cmdline-sample/pom.xml +++ b/samples/dailymotion-simple-cmdline-sample/pom.xml @@ -4,7 +4,7 @@ com.google.http-client google-http-client-parent - 1.40.1 + 1.41.0 ../../pom.xml dailymotion-simple-cmdline-sample @@ -95,7 +95,7 @@ com.puppycrawl.tools checkstyle - 9.0.1 + 9.2 diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml index 7980adb7a..a95f36f36 100644 --- a/samples/install-without-bom/pom.xml +++ b/samples/install-without-bom/pom.xml @@ -14,7 +14,7 @@ com.google.cloud.samples shared-configuration - 1.0.23 + 1.2.0 diff --git a/samples/pom.xml b/samples/pom.xml index 84d755df6..d6b2bfa7e 100644 --- a/samples/pom.xml +++ b/samples/pom.xml @@ -18,7 +18,7 @@ com.google.cloud.samples shared-configuration - 1.0.23 + 1.2.0 diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index 0cc5be9cc..69a5e5c7b 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -14,7 +14,7 @@ com.google.cloud.samples shared-configuration - 1.0.23 + 1.2.0 diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index 9d0257028..28eb6b006 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -14,7 +14,7 @@ com.google.cloud.samples shared-configuration - 1.0.23 + 1.2.0 @@ -31,7 +31,7 @@ com.google.cloud libraries-bom - 23.1.0 + 24.1.1 pom import diff --git a/samples/snippets/src/main/java/com/example/json/YouTubeSample.java b/samples/snippets/src/main/java/com/example/json/YouTubeSample.java index aad2b8a99..56107f943 100644 --- a/samples/snippets/src/main/java/com/example/json/YouTubeSample.java +++ b/samples/snippets/src/main/java/com/example/json/YouTubeSample.java @@ -18,7 +18,6 @@ import com.google.api.client.http.HttpResponse; import com.google.api.client.util.Key; - import java.io.IOException; import java.util.List; import java.util.Map; @@ -28,8 +27,7 @@ public static class ListResponse { @Key("items") private List searchResults; - @Key - private PageInfo pageInfo; + @Key private PageInfo pageInfo; public List getSearchResults() { return searchResults; @@ -41,11 +39,9 @@ public PageInfo getPageInfo() { } public static class PageInfo { - @Key - private long totalResults; + @Key private long totalResults; - @Key - private long resultsPerPage; + @Key private long resultsPerPage; public long getTotalResults() { return totalResults; @@ -57,14 +53,12 @@ public long getResultsPerPage() { } public static class SearchResult { - @Key - private String kind; + @Key private String kind; @Key("id") private VideoId videoId; - @Key - private Snippet snippet; + @Key private Snippet snippet; public String getKind() { return kind; @@ -80,11 +74,9 @@ public Snippet getSnippet() { } public static class VideoId { - @Key - private String kind; + @Key private String kind; - @Key - private String videoId; + @Key private String videoId; public String getKind() { return kind; @@ -96,20 +88,15 @@ public String getVideoId() { } public static class Snippet { - @Key - private String publishedAt; + @Key private String publishedAt; - @Key - private String channelId; + @Key private String channelId; - @Key - private String title; + @Key private String title; - @Key - private String description; + @Key private String description; - @Key - private Map thumbnails; + @Key private Map thumbnails; public String getPublishedAt() { return publishedAt; @@ -133,14 +120,11 @@ public Map getThumbnails() { } public static class Thumbnail { - @Key - private String url; + @Key private String url; - @Key - private long width; + @Key private long width; - @Key - private long height; + @Key private long height; public String getUrl() { return url; @@ -171,5 +155,4 @@ public static ListResponse parseJson(HttpResponse httpResponse) throws IOExcepti } return listResponse; } - -} \ No newline at end of file +} diff --git a/samples/snippets/src/test/java/com/example/json/YouTubeSampleTest.java b/samples/snippets/src/test/java/com/example/json/YouTubeSampleTest.java index 8454437f5..92ed5ab3a 100644 --- a/samples/snippets/src/test/java/com/example/json/YouTubeSampleTest.java +++ b/samples/snippets/src/test/java/com/example/json/YouTubeSampleTest.java @@ -19,10 +19,6 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; -import java.io.IOException; -import java.io.InputStream; -import java.util.Map; -import org.junit.Test; import com.google.api.client.http.HttpRequest; import com.google.api.client.http.HttpResponse; import com.google.api.client.http.HttpTransport; @@ -36,12 +32,17 @@ import com.google.api.client.testing.http.MockLowLevelHttpRequest; import com.google.api.client.testing.http.MockLowLevelHttpResponse; import com.google.common.base.Preconditions; +import java.io.IOException; +import java.io.InputStream; +import java.util.Map; +import org.junit.Test; public class YouTubeSampleTest { @Test public void testParsing() throws IOException { - final InputStream contents = getClass().getClassLoader().getResourceAsStream("youtube-search.json"); + final InputStream contents = + getClass().getClassLoader().getResourceAsStream("youtube-search.json"); Preconditions.checkNotNull(contents); HttpTransport transport = new MockHttpTransport() { @@ -91,4 +92,4 @@ public LowLevelHttpResponse execute() throws IOException { } } } -} \ No newline at end of file +} diff --git a/versions.txt b/versions.txt index 106d4e30f..2a515a551 100644 --- a/versions.txt +++ b/versions.txt @@ -1,17 +1,17 @@ # Format: # module:released-version:current-version -google-http-client:1.40.1:1.40.1 -google-http-client-bom:1.40.1:1.40.1 -google-http-client-parent:1.40.1:1.40.1 -google-http-client-android:1.40.1:1.40.1 -google-http-client-android-test:1.40.1:1.40.1 -google-http-client-apache-v2:1.40.1:1.40.1 -google-http-client-appengine:1.40.1:1.40.1 -google-http-client-assembly:1.40.1:1.40.1 -google-http-client-findbugs:1.40.1:1.40.1 -google-http-client-gson:1.40.1:1.40.1 -google-http-client-jackson2:1.40.1:1.40.1 -google-http-client-protobuf:1.40.1:1.40.1 -google-http-client-test:1.40.1:1.40.1 -google-http-client-xml:1.40.1:1.40.1 +google-http-client:1.41.0:1.41.0 +google-http-client-bom:1.41.0:1.41.0 +google-http-client-parent:1.41.0:1.41.0 +google-http-client-android:1.41.0:1.41.0 +google-http-client-android-test:1.41.0:1.41.0 +google-http-client-apache-v2:1.41.0:1.41.0 +google-http-client-appengine:1.41.0:1.41.0 +google-http-client-assembly:1.41.0:1.41.0 +google-http-client-findbugs:1.41.0:1.41.0 +google-http-client-gson:1.41.0:1.41.0 +google-http-client-jackson2:1.41.0:1.41.0 +google-http-client-protobuf:1.41.0:1.41.0 +google-http-client-test:1.41.0:1.41.0 +google-http-client-xml:1.41.0:1.41.0