diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 8807efca..3473042c 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,4 +13,4 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest - digest: sha256:7c853edc4136ae8f19f9d46d4569d38de2e446db2eea057f32e412bdba255846 + digest: sha256:df8d7b2cc0dbc65871e7edd86601901a0612b272fa3f7f0eb590c5c53aa5f92e diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 1a6b3850..3ae8c6c3 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -5,3 +5,6 @@ Thank you for opening a Pull Request! Before submitting your PR, there are a few - [ ] Appropriate docs were updated (if necessary) Fixes # ☕️ + +If you write sample code, please follow the [samples format]( +https://github.com/GoogleCloudPlatform/java-docs-samples/blob/main/SAMPLE_FORMAT.md). diff --git a/.github/workflows/approve-readme.yaml b/.github/workflows/approve-readme.yaml index c5132427..f5fc7d51 100644 --- a/.github/workflows/approve-readme.yaml +++ b/.github/workflows/approve-readme.yaml @@ -1,3 +1,18 @@ +# Copyright 2022 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. +# Github action job to test core java library features on +# downstream client libraries before they are released. on: pull_request: name: auto-merge-readme @@ -6,7 +21,7 @@ jobs: runs-on: ubuntu-latest if: github.repository_owner == 'googleapis' && github.head_ref == 'autosynth-readme' steps: - - uses: actions/github-script@v5 + - uses: actions/github-script@v6 with: github-token: ${{secrets.YOSHI_APPROVER_TOKEN}} script: | diff --git a/.github/workflows/auto-release.yaml b/.github/workflows/auto-release.yaml index 59c7cadd..7a106d00 100644 --- a/.github/workflows/auto-release.yaml +++ b/.github/workflows/auto-release.yaml @@ -1,3 +1,18 @@ +# Copyright 2022 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. +# Github action job to test core java library features on +# downstream client libraries before they are released. on: pull_request: name: auto-release @@ -6,7 +21,7 @@ jobs: runs-on: ubuntu-latest if: contains(github.head_ref, 'release-please') steps: - - uses: actions/github-script@v5 + - uses: actions/github-script@v6 with: github-token: ${{secrets.YOSHI_APPROVER_TOKEN}} debug: true @@ -16,13 +31,13 @@ jobs: return; } - // only approve PRs like "chore: release " - if ( !context.payload.pull_request.title.startsWith("chore: release") ) { + // only approve PRs like "chore(main): release " + if ( !context.payload.pull_request.title.startsWith("chore(main): release") ) { return; } // only approve PRs with pom.xml and versions.txt changes - const filesPromise = github.pulls.listFiles.endpoint({ + const filesPromise = github.rest.pulls.listFiles.endpoint({ owner: context.repo.owner, repo: context.repo.repo, pull_number: context.payload.pull_request.number, @@ -54,7 +69,7 @@ jobs: return; } - const promise = github.pulls.list.endpoint({ + const promise = github.rest.pulls.list.endpoint({ owner: context.repo.owner, repo: context.repo.repo, state: 'open' @@ -71,7 +86,7 @@ jobs: } // approve release PR - await github.pulls.createReview({ + await github.rest.pulls.createReview({ owner: context.repo.owner, repo: context.repo.repo, body: 'Rubber stamped release!', @@ -80,7 +95,7 @@ jobs: }); // attach kokoro:force-run and automerge labels - await github.issues.addLabels({ + await github.rest.issues.addLabels({ owner: context.repo.owner, repo: context.repo.repo, issue_number: context.payload.pull_request.number, diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 05de1f60..83ef7f9c 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -1,3 +1,18 @@ +# Copyright 2022 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. +# Github action job to test core java library features on +# downstream client libraries before they are released. on: push: branches: @@ -12,8 +27,8 @@ jobs: matrix: java: [8, 11, 17] steps: - - uses: actions/checkout@v2 - - uses: actions/setup-java@v2 + - uses: actions/checkout@v3 + - uses: actions/setup-java@v3 with: distribution: zulu java-version: ${{matrix.java}} @@ -24,8 +39,8 @@ jobs: windows: runs-on: windows-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-java@v2 + - uses: actions/checkout@v3 + - uses: actions/setup-java@v3 with: distribution: zulu java-version: 8 @@ -39,8 +54,8 @@ jobs: matrix: java: [8, 11, 17] steps: - - uses: actions/checkout@v2 - - uses: actions/setup-java@v2 + - uses: actions/checkout@v3 + - uses: actions/setup-java@v3 with: distribution: zulu java-version: ${{matrix.java}} @@ -49,8 +64,8 @@ jobs: lint: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-java@v2 + - uses: actions/checkout@v3 + - uses: actions/setup-java@v3 with: distribution: zulu java-version: 11 @@ -61,8 +76,8 @@ jobs: clirr: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-java@v2 + - uses: actions/checkout@v3 + - uses: actions/setup-java@v3 with: distribution: zulu java-version: 8 diff --git a/.github/workflows/samples.yaml b/.github/workflows/samples.yaml index c46230a7..912ed8b2 100644 --- a/.github/workflows/samples.yaml +++ b/.github/workflows/samples.yaml @@ -1,3 +1,18 @@ +# Copyright 2022 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. +# Github action job to test core java library features on +# downstream client libraries before they are released. on: pull_request: name: samples @@ -5,9 +20,10 @@ jobs: checkstyle: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-java@v1 + - uses: actions/checkout@v3 + - uses: actions/setup-java@v3 with: + distribution: zulu java-version: 8 - name: Run checkstyle run: mvn -P lint --quiet --batch-mode checkstyle:check diff --git a/.kokoro/build.bat b/.kokoro/build.bat index 05826ad9..067cf4a4 100644 --- a/.kokoro/build.bat +++ b/.kokoro/build.bat @@ -1,3 +1,18 @@ +:: Copyright 2022 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. +:: Github action job to test core java library features on +:: downstream client libraries before they are released. :: See documentation in type-shell-output.bat "C:\Program Files\Git\bin\bash.exe" %~dp0build.sh diff --git a/CHANGELOG.md b/CHANGELOG.md index ac3388f4..b6787d53 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,19 @@ # Changelog +### [2.4.1](https://github.com/googleapis/java-kms/compare/v2.4.0...v2.4.1) (2022-03-03) + + +### Documentation + +* **samples:** fixed comment ([#726](https://github.com/googleapis/java-kms/issues/726)) ([4c33b4a](https://github.com/googleapis/java-kms/commit/4c33b4af140b60eef3ffc645f5013139f65d40f9)) + + +### Dependencies + +* update actions/github-script action to v6 ([#722](https://github.com/googleapis/java-kms/issues/722)) ([16d6835](https://github.com/googleapis/java-kms/commit/16d68355c6992f6056087d97ae4e88b5a70e8454)) +* update dependency com.google.cloud:google-cloud-shared-dependencies to v2.8.0 ([#735](https://github.com/googleapis/java-kms/issues/735)) ([51e375a](https://github.com/googleapis/java-kms/commit/51e375a693757325a4ea6d8c4891c2ff0f17633e)) +* update dependency com.google.protobuf:protobuf-java-util to v3.19.4 ([#710](https://github.com/googleapis/java-kms/issues/710)) ([6f7560a](https://github.com/googleapis/java-kms/commit/6f7560aa6c819314c2d23a2bb54fbfd3f5735865)) + ## [2.4.0](https://github.com/googleapis/java-kms/compare/v2.3.1...v2.4.0) (2022-02-03) diff --git a/README.md b/README.md index 434c520b..37cf1a3d 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 - 24.1.0 + 24.4.0 pom import @@ -42,7 +42,7 @@ If you are using Maven without BOM, add this to your dependencies: com.google.cloud google-cloud-kms - 2.3.1 + 2.4.0 ``` @@ -50,20 +50,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:24.2.0') +implementation platform('com.google.cloud:libraries-bom:24.4.0') implementation 'com.google.cloud:google-cloud-kms' ``` If you are using Gradle without BOM, add this to your dependencies ```Groovy -implementation 'com.google.cloud:google-cloud-kms:2.3.1' +implementation 'com.google.cloud:google-cloud-kms:2.4.0' ``` If you are using SBT, add this to your dependencies ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-kms" % "2.3.1" +libraryDependencies += "com.google.cloud" % "google-cloud-kms" % "2.4.0" ``` ## Authentication diff --git a/google-cloud-kms-bom/pom.xml b/google-cloud-kms-bom/pom.xml index 040bb6bf..022e7115 100644 --- a/google-cloud-kms-bom/pom.xml +++ b/google-cloud-kms-bom/pom.xml @@ -3,12 +3,12 @@ 4.0.0 com.google.cloud google-cloud-kms-bom - 2.4.0 + 2.4.1 pom com.google.cloud google-cloud-shared-config - 1.2.6 + 1.2.7 Google Cloud kms BOM @@ -52,17 +52,17 @@ com.google.cloud google-cloud-kms - 2.4.0 + 2.4.1 com.google.api.grpc grpc-google-cloud-kms-v1 - 0.95.0 + 0.95.1 com.google.api.grpc proto-google-cloud-kms-v1 - 0.95.0 + 0.95.1 diff --git a/google-cloud-kms/pom.xml b/google-cloud-kms/pom.xml index 7fb69353..204a8afd 100644 --- a/google-cloud-kms/pom.xml +++ b/google-cloud-kms/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-kms - 2.4.0 + 2.4.1 jar Google Cloud KMS https://github.com/googleapis/java-kms @@ -11,7 +11,7 @@ com.google.cloud google-cloud-kms-parent - 2.4.0 + 2.4.1 google-cloud-kms diff --git a/grpc-google-cloud-kms-v1/pom.xml b/grpc-google-cloud-kms-v1/pom.xml index 92ba9e16..b21a610c 100644 --- a/grpc-google-cloud-kms-v1/pom.xml +++ b/grpc-google-cloud-kms-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-kms-v1 - 0.95.0 + 0.95.1 grpc-google-cloud-kms-v1 GRPC library for grpc-google-cloud-kms-v1 com.google.cloud google-cloud-kms-parent - 2.4.0 + 2.4.1 diff --git a/pom.xml b/pom.xml index 13eb07c5..a093ce4a 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-kms-parent pom - 2.4.0 + 2.4.1 Google Cloud KMS Parent https://github.com/googleapis/java-kms @@ -14,7 +14,7 @@ com.google.cloud google-cloud-shared-config - 1.2.6 + 1.2.7 @@ -61,28 +61,28 @@ com.google.api.grpc proto-google-cloud-kms-v1 - 0.95.0 + 0.95.1 com.google.api.grpc grpc-google-cloud-kms-v1 - 0.95.0 + 0.95.1 com.google.cloud google-cloud-kms - 2.4.0 + 2.4.1 com.google.cloud google-cloud-kms-bom - 2.3.1 + 2.4.0 com.google.cloud google-cloud-shared-dependencies - 2.7.0 + 2.8.0 pom import @@ -125,7 +125,7 @@ org.apache.maven.plugins maven-project-info-reports-plugin - 3.1.2 + 3.2.2 @@ -152,7 +152,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.3.1 + 3.3.2 html diff --git a/proto-google-cloud-kms-v1/pom.xml b/proto-google-cloud-kms-v1/pom.xml index 3158294e..b0db6533 100644 --- a/proto-google-cloud-kms-v1/pom.xml +++ b/proto-google-cloud-kms-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-kms-v1 - 0.95.0 + 0.95.1 proto-google-cloud-kms-v1 PROTO library for proto-google-cloud-kms-v1 com.google.cloud google-cloud-kms-parent - 2.4.0 + 2.4.1 diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml index 4816053b..5394147e 100644 --- a/samples/install-without-bom/pom.xml +++ b/samples/install-without-bom/pom.xml @@ -29,14 +29,14 @@ com.google.cloud google-cloud-kms - 2.3.1 + 2.4.0 com.google.protobuf protobuf-java-util - 3.19.3 + 3.19.4 junit diff --git a/samples/pom.xml b/samples/pom.xml index aa928308..e45d0e9b 100644 --- a/samples/pom.xml +++ b/samples/pom.xml @@ -46,7 +46,7 @@ org.sonatype.plugins nexus-staging-maven-plugin - 1.6.8 + 1.6.11 true diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index eadc0c67..1c8b2eab 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -28,14 +28,14 @@ com.google.cloud google-cloud-kms - 2.4.0 + 2.4.1 com.google.protobuf protobuf-java-util - 3.19.3 + 3.19.4 junit diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index 5def1081..b15288fc 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 24.1.0 + 24.4.0 pom import diff --git a/samples/snippets/src/main/java/kms/DisableKeyVersion.java b/samples/snippets/src/main/java/kms/DisableKeyVersion.java index ded7fadc..09966b2e 100644 --- a/samples/snippets/src/main/java/kms/DisableKeyVersion.java +++ b/samples/snippets/src/main/java/kms/DisableKeyVersion.java @@ -61,7 +61,7 @@ public void disableKeyVersion( // Create a field mask of updated values. FieldMask fieldMask = FieldMaskUtil.fromString("state"); - // Destroy the key version. + // Disable the key version. CryptoKeyVersion response = client.updateCryptoKeyVersion(keyVersion, fieldMask); System.out.printf("Disabled key version: %s%n", response.getName()); } diff --git a/samples/snippets/src/main/java/kms/EnableKeyVersion.java b/samples/snippets/src/main/java/kms/EnableKeyVersion.java index 9dcbb846..16d13967 100644 --- a/samples/snippets/src/main/java/kms/EnableKeyVersion.java +++ b/samples/snippets/src/main/java/kms/EnableKeyVersion.java @@ -61,7 +61,7 @@ public void enableKeyVersion( // Create a field mask of updated values. FieldMask fieldMask = FieldMaskUtil.fromString("state"); - // Destroy the key version. + // Enable the key version. CryptoKeyVersion response = client.updateCryptoKeyVersion(keyVersion, fieldMask); System.out.printf("Enabled key version: %s%n", response.getName()); } diff --git a/versions.txt b/versions.txt index 41c04adb..8b6b5845 100644 --- a/versions.txt +++ b/versions.txt @@ -1,6 +1,6 @@ # Format: # module:released-version:current-version -google-cloud-kms:2.4.0:2.4.0 -grpc-google-cloud-kms-v1:0.95.0:0.95.0 -proto-google-cloud-kms-v1:0.95.0:0.95.0 +google-cloud-kms:2.4.1:2.4.1 +grpc-google-cloud-kms-v1:0.95.1:0.95.1 +proto-google-cloud-kms-v1:0.95.1:0.95.1