diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index dc53bbb5..621c0d66 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -1,3 +1,3 @@ docker: image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest - digest: sha256:d4b2141d65566523dfd523f63c6e6899ab1281463bce182a9f600e74b0511875 + digest: sha256:94580e16bbb4ea1592fa9dd5c5df76716e17858c0dc975582d096c6ae0dc91f5 diff --git a/.github/release-please.yml b/.github/release-please.yml index 7bf58076..118a4019 100644 --- a/.github/release-please.yml +++ b/.github/release-please.yml @@ -6,3 +6,7 @@ branches: handleGHRelease: true releaseType: java-yoshi branch: java7 + - bumpMinorPreMajor: true + handleGHRelease: true + releaseType: java-backport + branch: 2.0.x diff --git a/.github/sync-repo-settings.yaml b/.github/sync-repo-settings.yaml index 6f09d695..e5b05793 100644 --- a/.github/sync-repo-settings.yaml +++ b/.github/sync-repo-settings.yaml @@ -33,6 +33,21 @@ branchProtectionRules: - 'Kokoro - Test: Integration' - cla/google - OwlBot Post Processor + - pattern: 2.0.x + isAdminEnforced: true + requiredApprovingReviewCount: 1 + requiresCodeOwnerReviews: true + requiresStrictStatusChecks: false + requiredStatusCheckContexts: + - dependencies (8) + - dependencies (11) + - lint + - clirr + - units (8) + - units (11) + - 'Kokoro - Test: Integration' + - cla/google + - OwlBot Post Processor permissionRules: - team: yoshi-admins permission: admin diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 2425d723..05de1f60 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 e439f6d4..70b27962 100755 --- a/.kokoro/build.sh +++ b/.kokoro/build.sh @@ -91,7 +91,6 @@ samples) pushd ${SAMPLES_DIR} mvn -B \ - -Penable-samples \ -ntp \ -DtrimStackTrace=false \ -Dclirr.skip=true \ diff --git a/.kokoro/dependencies.sh b/.kokoro/dependencies.sh index 9a5105d7..d7476cfe 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/release/publish_javadoc11.sh b/.kokoro/release/publish_javadoc11.sh index f1ac2ad4..1e82ea2f 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-cloud-redis 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 9e5b23a8..99169cc8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,24 @@ # Changelog +## [2.1.0](https://www.github.com/googleapis/java-redis/compare/v2.0.6...v2.1.0) (2021-12-03) + + +### Features + +* [Cloud Memorystore for Redis] Support Multiple Read Replicas when creating Instance ([#547](https://www.github.com/googleapis/java-redis/issues/547)) ([0b0fbf5](https://www.github.com/googleapis/java-redis/commit/0b0fbf5374bc38d13405df6a35c40148d0f464d2)) +* next release from main branch is 2.1.0 ([#541](https://www.github.com/googleapis/java-redis/issues/541)) ([6292cd5](https://www.github.com/googleapis/java-redis/commit/6292cd5b83e77c94fba56b10ebcc82f08f9eced0)) + + +### Bug Fixes + +* **java:** java 17 dependency arguments ([#1266](https://www.github.com/googleapis/java-redis/issues/1266)) ([#538](https://www.github.com/googleapis/java-redis/issues/538)) ([9e6cbf1](https://www.github.com/googleapis/java-redis/commit/9e6cbf158402072c88ec4758fd8c47b0f00406bc)) + + +### Dependencies + +* update dependency com.google.cloud:google-cloud-shared-dependencies to v2.5.0 ([#554](https://www.github.com/googleapis/java-redis/issues/554)) ([3065db4](https://www.github.com/googleapis/java-redis/commit/3065db41a17dbef04580c6e37e6adfc3e454117e)) +* update dependency com.google.cloud:google-cloud-shared-dependencies to v2.5.1 ([#562](https://www.github.com/googleapis/java-redis/issues/562)) ([162fdda](https://www.github.com/googleapis/java-redis/commit/162fdda75fbf4dce4f2f2c6f5a402d24dd808126)) + ### [2.0.6](https://www.github.com/googleapis/java-redis/compare/v2.0.5...v2.0.6) (2021-10-20) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f2dbdee0..b65dd279 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/README.md b/README.md index bbfa025c..0c2af4ba 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file com.google.cloud libraries-bom - 23.1.0 + 24.0.0 pom import @@ -41,7 +41,7 @@ If you are using Maven without BOM, add this to your dependencies: com.google.cloud google-cloud-redis - 2.0.5 + 2.0.6 ``` @@ -49,20 +49,20 @@ If you are using Maven without BOM, add this to your dependencies: If you are using Gradle 5.x or later, add this to your dependencies ```Groovy -implementation platform('com.google.cloud:libraries-bom:23.1.0') +implementation platform('com.google.cloud:libraries-bom:24.0.0') implementation 'com.google.cloud:google-cloud-redis' ``` If you are using Gradle without BOM, add this to your dependencies ```Groovy -implementation 'com.google.cloud:google-cloud-redis:2.0.5' +implementation 'com.google.cloud:google-cloud-redis:2.0.6' ``` If you are using SBT, add this to your dependencies ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-redis" % "2.0.5" +libraryDependencies += "com.google.cloud" % "google-cloud-redis" % "2.0.6" ``` ## Authentication @@ -111,7 +111,7 @@ Cloud Redis uses gRPC for the transport layer. ## Supported Java Versions -Java 7 or above is required for using this client. +Java 8 or above is required for using this client. Google's Java client libraries, [Google Cloud Client Libraries][cloudlibs] @@ -180,7 +180,6 @@ Apache 2.0 - See [LICENSE][license] for more information. Java Version | Status ------------ | ------ -Java 7 | [![Kokoro CI][kokoro-badge-image-1]][kokoro-badge-link-1] Java 8 | [![Kokoro CI][kokoro-badge-image-2]][kokoro-badge-link-2] Java 8 OSX | [![Kokoro CI][kokoro-badge-image-3]][kokoro-badge-link-3] Java 8 Windows | [![Kokoro CI][kokoro-badge-image-4]][kokoro-badge-link-4] diff --git a/google-cloud-redis-bom/pom.xml b/google-cloud-redis-bom/pom.xml index 57783431..bc4e3c9b 100644 --- a/google-cloud-redis-bom/pom.xml +++ b/google-cloud-redis-bom/pom.xml @@ -3,12 +3,12 @@ 4.0.0 com.google.cloud google-cloud-redis-bom - 2.0.6 + 2.1.0 pom com.google.cloud google-cloud-shared-config - 1.1.0 + 1.2.2 Google Cloud Redis BOM @@ -52,27 +52,27 @@ com.google.cloud google-cloud-redis - 2.0.6 + 2.1.0 com.google.api.grpc grpc-google-cloud-redis-v1beta1 - 0.88.6 + 0.89.0 com.google.api.grpc grpc-google-cloud-redis-v1 - 2.0.6 + 2.1.0 com.google.api.grpc proto-google-cloud-redis-v1 - 2.0.6 + 2.1.0 com.google.api.grpc proto-google-cloud-redis-v1beta1 - 0.88.6 + 0.89.0 diff --git a/google-cloud-redis/pom.xml b/google-cloud-redis/pom.xml index 4fff07d8..6d7d441c 100644 --- a/google-cloud-redis/pom.xml +++ b/google-cloud-redis/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-redis - 2.0.6 + 2.1.0 jar Google Cloud Redis https://github.com/googleapis/java-redis @@ -11,7 +11,7 @@ com.google.cloud google-cloud-redis-parent - 2.0.6 + 2.1.0 google-cloud-redis diff --git a/google-cloud-redis/src/main/java/com/google/cloud/redis/v1/CloudRedisClient.java b/google-cloud-redis/src/main/java/com/google/cloud/redis/v1/CloudRedisClient.java index e18c556f..dc984987 100644 --- a/google-cloud-redis/src/main/java/com/google/cloud/redis/v1/CloudRedisClient.java +++ b/google-cloud-redis/src/main/java/com/google/cloud/redis/v1/CloudRedisClient.java @@ -695,7 +695,8 @@ public final UnaryCallable createInstanceCalla * @param updateMask Required. Mask of fields to update. At least one path must be supplied in * this field. The elements of the repeated paths field may only include these fields from * [Instance][google.cloud.redis.v1.Instance]: - *

* `displayName` * `labels` * `memorySizeGb` * `redisConfig` + *

* `displayName` * `labels` * `memorySizeGb` * `redisConfig` * + * `replica_count` * @param instance Required. Update description. Only fields specified in update_mask are updated. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -1167,7 +1168,7 @@ public final UnaryCallable exportInstanceCalla // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Initiates a failover of the master node to current replica node for a specific STANDARD tier + * Initiates a failover of the primary node to current replica node for a specific STANDARD tier * Cloud Memorystore for Redis instance. * *

Sample code: @@ -1200,7 +1201,7 @@ public final OperationFuture failoverInstanceAsync( // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Initiates a failover of the master node to current replica node for a specific STANDARD tier + * Initiates a failover of the primary node to current replica node for a specific STANDARD tier * Cloud Memorystore for Redis instance. * *

Sample code: @@ -1233,7 +1234,7 @@ public final OperationFuture failoverInstanceAsync( // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Initiates a failover of the master node to current replica node for a specific STANDARD tier + * Initiates a failover of the primary node to current replica node for a specific STANDARD tier * Cloud Memorystore for Redis instance. * *

Sample code: @@ -1258,7 +1259,7 @@ public final OperationFuture failoverInstanceAsync( // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Initiates a failover of the master node to current replica node for a specific STANDARD tier + * Initiates a failover of the primary node to current replica node for a specific STANDARD tier * Cloud Memorystore for Redis instance. * *

Sample code: @@ -1283,7 +1284,7 @@ public final OperationFuture failoverInstanceAsync( // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Initiates a failover of the master node to current replica node for a specific STANDARD tier + * Initiates a failover of the primary node to current replica node for a specific STANDARD tier * Cloud Memorystore for Redis instance. * *

Sample code: diff --git a/google-cloud-redis/src/main/java/com/google/cloud/redis/v1/package-info.java b/google-cloud-redis/src/main/java/com/google/cloud/redis/v1/package-info.java index 4bd2e253..40caea49 100644 --- a/google-cloud-redis/src/main/java/com/google/cloud/redis/v1/package-info.java +++ b/google-cloud-redis/src/main/java/com/google/cloud/redis/v1/package-info.java @@ -15,7 +15,9 @@ */ /** - * The interfaces provided are listed below, along with usage samples. + * A client to Google Cloud Memorystore for Redis API + * + *

The interfaces provided are listed below, along with usage samples. * *

======================= CloudRedisClient ======================= * diff --git a/google-cloud-redis/src/main/java/com/google/cloud/redis/v1beta1/CloudRedisClient.java b/google-cloud-redis/src/main/java/com/google/cloud/redis/v1beta1/CloudRedisClient.java index fe918026..8ac7dede 100644 --- a/google-cloud-redis/src/main/java/com/google/cloud/redis/v1beta1/CloudRedisClient.java +++ b/google-cloud-redis/src/main/java/com/google/cloud/redis/v1beta1/CloudRedisClient.java @@ -57,7 +57,7 @@ * `/projects/{project_id}/locations/{location_id}/instances/{instance_id}` * * - *

Note that location_id must be refering to a GCP `region`; for example: + *

Note that location_id must be referring to a GCP `region`; for example: * *

* - *

Note that location_id must be refering to a GCP `region`; for example: + *

Note that location_id must be referring to a GCP `region`; for example: * *