diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 9786771c4..3473042c0 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:3c950ed12391ebaffd1ee66d0374766a1c50144ebe6a7a0042300b2e6bb5856b + digest: sha256:df8d7b2cc0dbc65871e7edd86601901a0612b272fa3f7f0eb590c5c53aa5f92e diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index b1fc16274..8465fc6f5 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 1bb182327..f5fc7d516 100644 --- a/.github/workflows/approve-readme.yaml +++ b/.github/workflows/approve-readme.yaml @@ -21,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 18e23230d..7a106d007 100644 --- a/.github/workflows/auto-release.yaml +++ b/.github/workflows/auto-release.yaml @@ -21,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 diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 6b5e56aaa..83ef7f9c2 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -27,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}} @@ -39,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 @@ -54,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}} @@ -64,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 @@ -76,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 d5d964df1..912ed8b2b 100644 --- a/.github/workflows/samples.yaml +++ b/.github/workflows/samples.yaml @@ -20,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 cc602c9eb..067cf4a4c 100644 --- a/.kokoro/build.bat +++ b/.kokoro/build.bat @@ -1,18 +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 -# 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. "C:\Program Files\Git\bin\bash.exe" %~dp0build.sh diff --git a/CHANGELOG.md b/CHANGELOG.md index 3c27aea11..256d7bfc4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,17 @@ # Changelog +### [3.7.1](https://github.com/googleapis/java-logging/compare/v3.7.0...v3.7.1) (2022-03-03) + + +### Bug Fixes + +* do not use GAE_RUNTIME for GAE environment detection ([#891](https://github.com/googleapis/java-logging/issues/891)) ([19e9abb](https://github.com/googleapis/java-logging/commit/19e9abb389ed98cdcca7ef0dfa5b07e69568f6f9)) + + +### Dependencies + +* update dependency com.google.cloud:google-cloud-shared-dependencies to v2.8.0 ([#889](https://github.com/googleapis/java-logging/issues/889)) ([4885440](https://github.com/googleapis/java-logging/commit/48854405838151a4179f6d1727fc925b06d1727d)) + ## [3.7.0](https://github.com/googleapis/java-logging/compare/v3.6.4...v3.7.0) (2022-02-28) diff --git a/README.md b/README.md index f4efeb4e6..af561067b 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.3.0 + 24.4.0 pom import @@ -43,7 +43,7 @@ If you are using Maven without BOM, add this to your dependencies: com.google.cloud google-cloud-logging - 3.6.4 + 3.7.0 ``` @@ -51,20 +51,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.3.0') +implementation platform('com.google.cloud:libraries-bom:24.4.0') implementation 'com.google.cloud:google-cloud-logging' ``` If you are using Gradle without BOM, add this to your dependencies ```Groovy -implementation 'com.google.cloud:google-cloud-logging:3.6.4' +implementation 'com.google.cloud:google-cloud-logging:3.7.0' ``` If you are using SBT, add this to your dependencies ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-logging" % "3.6.4" +libraryDependencies += "com.google.cloud" % "google-cloud-logging" % "3.7.0" ``` ## Authentication diff --git a/google-cloud-logging-bom/pom.xml b/google-cloud-logging-bom/pom.xml index d521978b0..177ff8ede 100644 --- a/google-cloud-logging-bom/pom.xml +++ b/google-cloud-logging-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-logging-bom - 3.7.0 + 3.7.1 pom com.google.cloud @@ -53,17 +53,17 @@ com.google.cloud google-cloud-logging - 3.7.0 + 3.7.1 com.google.api.grpc grpc-google-cloud-logging-v2 - 0.96.0 + 0.96.1 com.google.api.grpc proto-google-cloud-logging-v2 - 0.96.0 + 0.96.1 diff --git a/google-cloud-logging/pom.xml b/google-cloud-logging/pom.xml index 0c720ec54..b9c513a3c 100644 --- a/google-cloud-logging/pom.xml +++ b/google-cloud-logging/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-logging - 3.7.0 + 3.7.1 jar Google Cloud Logging https://github.com/googleapis/java-logging @@ -11,7 +11,7 @@ com.google.cloud google-cloud-logging-parent - 3.7.0 + 3.7.1 google-cloud-logging diff --git a/google-cloud-logging/src/main/java/com/google/cloud/logging/MonitoredResourceUtil.java b/google-cloud-logging/src/main/java/com/google/cloud/logging/MonitoredResourceUtil.java index df450aee4..bba9bf8e5 100644 --- a/google-cloud-logging/src/main/java/com/google/cloud/logging/MonitoredResourceUtil.java +++ b/google-cloud-logging/src/main/java/com/google/cloud/logging/MonitoredResourceUtil.java @@ -175,7 +175,6 @@ private static Resource detectResourceType() { return Resource.CloudRun; } if (getter.getEnv("GAE_INSTANCE") != null - && getter.getEnv("GAE_RUNTIME") != null && getter.getEnv("GAE_SERVICE") != null && getter.getEnv("GAE_VERSION") != null) { return Resource.AppEngine; diff --git a/google-cloud-logging/src/test/java/com/google/cloud/logging/MonitoredResourceUtilTest.java b/google-cloud-logging/src/test/java/com/google/cloud/logging/MonitoredResourceUtilTest.java index ebcf398d9..136c8e8e6 100644 --- a/google-cloud-logging/src/test/java/com/google/cloud/logging/MonitoredResourceUtilTest.java +++ b/google-cloud-logging/src/test/java/com/google/cloud/logging/MonitoredResourceUtilTest.java @@ -155,7 +155,6 @@ public void testResourceTypeK8sContainer() { private void setupCommonGAEMocks(String mockedModuleId, String mockedVersionId) { expect(getterMock.getAttribute("instance/zone")).andReturn(MOCKED_QUALIFIED_ZONE).once(); expect(getterMock.getEnv("GAE_INSTANCE")).andReturn(MOCKED_NON_EMPTY).once(); - expect(getterMock.getEnv("GAE_RUNTIME")).andReturn(MOCKED_NON_EMPTY).once(); expect(getterMock.getEnv("GAE_SERVICE")).andReturn(mockedModuleId).times(2); expect(getterMock.getEnv("GAE_VERSION")).andReturn(mockedVersionId).times(2); expect(getterMock.getEnv(anyString())).andReturn(null).anyTimes(); diff --git a/grpc-google-cloud-logging-v2/pom.xml b/grpc-google-cloud-logging-v2/pom.xml index 7ef80db58..23666d151 100644 --- a/grpc-google-cloud-logging-v2/pom.xml +++ b/grpc-google-cloud-logging-v2/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-logging-v2 - 0.96.0 + 0.96.1 grpc-google-cloud-logging-v2 GRPC library for grpc-google-cloud-logging-v2 com.google.cloud google-cloud-logging-parent - 3.7.0 + 3.7.1 diff --git a/pom.xml b/pom.xml index c73cc97eb..9145fe3c5 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-logging-parent pom - 3.7.0 + 3.7.1 Google Cloud Logging Parent https://github.com/googleapis/java-logging @@ -61,23 +61,23 @@ com.google.api.grpc proto-google-cloud-logging-v2 - 0.96.0 + 0.96.1 com.google.api.grpc grpc-google-cloud-logging-v2 - 0.96.0 + 0.96.1 com.google.cloud google-cloud-logging - 3.7.0 + 3.7.1 com.google.cloud google-cloud-shared-dependencies - 2.7.0 + 2.8.0 pom import @@ -146,7 +146,7 @@ org.apache.maven.plugins maven-project-info-reports-plugin - 3.2.1 + 3.2.2 diff --git a/proto-google-cloud-logging-v2/pom.xml b/proto-google-cloud-logging-v2/pom.xml index 8df55f75c..8935ac5b4 100644 --- a/proto-google-cloud-logging-v2/pom.xml +++ b/proto-google-cloud-logging-v2/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-logging-v2 - 0.96.0 + 0.96.1 proto-google-cloud-logging-v2 PROTO library for proto-google-cloud-logging-v2 com.google.cloud google-cloud-logging-parent - 3.7.0 + 3.7.1 diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml index ba8299acc..05b9c6819 100644 --- a/samples/install-without-bom/pom.xml +++ b/samples/install-without-bom/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-logging - 3.6.4 + 3.7.0 diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index ca6da66d6..9588fce5b 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-logging - 3.7.0 + 3.7.1 diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index 46c7bd61e..a867fb0e0 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -29,7 +29,7 @@ com.google.cloud libraries-bom - 24.3.0 + 24.4.0 pom import diff --git a/versions.txt b/versions.txt index 7259a60d5..178e205d4 100644 --- a/versions.txt +++ b/versions.txt @@ -1,6 +1,6 @@ # Format: # module:released-version:current-version -google-cloud-logging:3.7.0:3.7.0 -grpc-google-cloud-logging-v2:0.96.0:0.96.0 -proto-google-cloud-logging-v2:0.96.0:0.96.0 +google-cloud-logging:3.7.1:3.7.1 +grpc-google-cloud-logging-v2:0.96.1:0.96.1 +proto-google-cloud-logging-v2:0.96.1:0.96.1