From c33fd8a0351fcb8850f48b81de2ec0e10c41064f Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 6 Jan 2022 21:24:16 +0000 Subject: [PATCH 01/29] chore: release 2.3.6-SNAPSHOT (#664) :robot: I have created a release \*beep\* \*boop\* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- google-cloud-core-bom/pom.xml | 8 ++++---- google-cloud-core-grpc/pom.xml | 4 ++-- google-cloud-core-http/pom.xml | 4 ++-- google-cloud-core/pom.xml | 4 ++-- pom.xml | 2 +- versions.txt | 2 +- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/google-cloud-core-bom/pom.xml b/google-cloud-core-bom/pom.xml index 061b5e2a1e..e9aee4ef81 100644 --- a/google-cloud-core-bom/pom.xml +++ b/google-cloud-core-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-core-bom - 2.3.5 + 2.3.6-SNAPSHOT pom com.google.cloud @@ -63,17 +63,17 @@ com.google.cloud google-cloud-core - 2.3.5 + 2.3.6-SNAPSHOT com.google.cloud google-cloud-core-grpc - 2.3.5 + 2.3.6-SNAPSHOT com.google.cloud google-cloud-core-http - 2.3.5 + 2.3.6-SNAPSHOT diff --git a/google-cloud-core-grpc/pom.xml b/google-cloud-core-grpc/pom.xml index b80cae8255..b661f5a410 100644 --- a/google-cloud-core-grpc/pom.xml +++ b/google-cloud-core-grpc/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-core-grpc - 2.3.5 + 2.3.6-SNAPSHOT jar Google Cloud Core gRPC https://github.com/googleapis/java-core @@ -13,7 +13,7 @@ com.google.cloud google-cloud-core-parent - 2.3.5 + 2.3.6-SNAPSHOT google-cloud-core-grpc diff --git a/google-cloud-core-http/pom.xml b/google-cloud-core-http/pom.xml index 108c57617c..33708af95d 100644 --- a/google-cloud-core-http/pom.xml +++ b/google-cloud-core-http/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-core-http - 2.3.5 + 2.3.6-SNAPSHOT jar Google Cloud Core HTTP https://github.com/googleapis/java-core @@ -13,7 +13,7 @@ com.google.cloud google-cloud-core-parent - 2.3.5 + 2.3.6-SNAPSHOT google-cloud-core-http diff --git a/google-cloud-core/pom.xml b/google-cloud-core/pom.xml index 022d2545eb..fa2fc66721 100644 --- a/google-cloud-core/pom.xml +++ b/google-cloud-core/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-core - 2.3.5 + 2.3.6-SNAPSHOT jar Google Cloud Core https://github.com/googleapis/java-core @@ -13,7 +13,7 @@ com.google.cloud google-cloud-core-parent - 2.3.5 + 2.3.6-SNAPSHOT google-cloud-core diff --git a/pom.xml b/pom.xml index 1c6fe10e72..50c970c096 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-core-parent pom - 2.3.5 + 2.3.6-SNAPSHOT Google Cloud Core Parent https://github.com/googleapis/java-core diff --git a/versions.txt b/versions.txt index 2b2db10da9..cdb2601a39 100644 --- a/versions.txt +++ b/versions.txt @@ -1,4 +1,4 @@ # Format: # module:released-version:current-version -google-cloud-core:2.3.5:2.3.5 \ No newline at end of file +google-cloud-core:2.3.5:2.3.6-SNAPSHOT \ No newline at end of file From 600c8ca157dbd6ac1e90ce20639bf54e61767b45 Mon Sep 17 00:00:00 2001 From: Neenu Shaji Date: Mon, 10 Jan 2022 18:56:15 -0500 Subject: [PATCH 02/29] chore: change name to api_shortname in .repo-metadata.json (#670) --- .repo-metadata.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.repo-metadata.json b/.repo-metadata.json index da601b8f85..3a6e008dff 100644 --- a/.repo-metadata.json +++ b/.repo-metadata.json @@ -1,5 +1,5 @@ { - "name": "google-cloud-core", + "api_shortname": "google-cloud-core", "name_pretty": "Google Cloud Core", "release_level": "ga", "language": "java", From d63ab8d11b17235695ed1d9a49e3a2d585515ef7 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 11 Jan 2022 18:36:29 +0000 Subject: [PATCH 03/29] chore(java): update variable name to api_shortname in README template (#1323) (#671) --- .github/.OwlBot.lock.yaml | 2 +- .github/ISSUE_TEMPLATE/bug_report.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 731a0eb4a6..dddb13b845 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:491a007c6bd6e77f9e9b1bebcd6cdf08a4a4ef2c228c123d9696845204cb685d + digest: sha256:7f737996c88586c499f7b0c25294c760f9f5eec092289a0e08d2d3f42a069ebb diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index ac0d0496c9..abc8e98b4d 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -21,7 +21,7 @@ If you are still having issues, please include as much information as possible: General, Core, and Other are also allowed as types 2. OS type and version: 3. Java version: -4. google-cloud-core version(s): +4. version(s): #### Steps to reproduce From 86e04a33a0684aee91be6702eda4543c3016e318 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 12 Jan 2022 18:20:19 +0100 Subject: [PATCH 04/29] build(deps): update dependency com.google.cloud:google-cloud-shared-config to v1.2.5 (#673) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-shared-config](https://togithub.com/googleapis/java-shared-config) | `1.2.4` -> `1.2.5` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-config/1.2.5/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-config/1.2.5/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-config/1.2.5/compatibility-slim/1.2.4)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-config/1.2.5/confidence-slim/1.2.4)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/java-shared-config ### [`v1.2.5`](https://togithub.com/googleapis/java-shared-config/blob/HEAD/CHANGELOG.md#​125-httpsgithubcomgoogleapisjava-shared-configcomparev124v125-2022-01-11) [Compare Source](https://togithub.com/googleapis/java-shared-config/compare/v1.2.4...v1.2.5)
--- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-core). --- google-cloud-core-bom/pom.xml | 2 +- pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/google-cloud-core-bom/pom.xml b/google-cloud-core-bom/pom.xml index e9aee4ef81..763f1f28a7 100644 --- a/google-cloud-core-bom/pom.xml +++ b/google-cloud-core-bom/pom.xml @@ -8,7 +8,7 @@ com.google.cloud google-cloud-shared-config - 1.2.4 + 1.2.5 Google Cloud Core diff --git a/pom.xml b/pom.xml index 50c970c096..d3f951d29f 100644 --- a/pom.xml +++ b/pom.xml @@ -14,7 +14,7 @@ com.google.cloud google-cloud-shared-config - 1.2.4 + 1.2.5 From 32e64fdc4abed27e822165230c07b9ca07b86063 Mon Sep 17 00:00:00 2001 From: Neenu Shaji Date: Thu, 13 Jan 2022 14:34:14 -0500 Subject: [PATCH 05/29] chore: update release-level in .repo-metadata.json (#676) --- .repo-metadata.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.repo-metadata.json b/.repo-metadata.json index 3a6e008dff..1599ab74dd 100644 --- a/.repo-metadata.json +++ b/.repo-metadata.json @@ -1,7 +1,7 @@ { "api_shortname": "google-cloud-core", "name_pretty": "Google Cloud Core", - "release_level": "ga", + "release_level": "stable", "language": "java", "repo": "googleapis/java-core", "repo_short": "java-core", From 154bc18ba86328d29665c502db1d35e265c92bbf Mon Sep 17 00:00:00 2001 From: Daniel Zou Date: Tue, 18 Jan 2022 11:45:38 -0500 Subject: [PATCH 06/29] feat(java): Add native-image support classes to java-core module (#637) Introduce native-image support in a new module native-image-support. Co-authored-by: Owl Bot --- google-cloud-core-bom/pom.xml | 5 + native-image-support/pom.xml | 47 +++++ .../features/GoogleJsonClientFeature.java | 99 ++++++++++ .../features/GrpcNettyFeature.java | 122 ++++++++++++ .../features/NativeImageUtils.java | 174 ++++++++++++++++++ .../features/ProtobufMessageFeature.java | 105 +++++++++++ .../clients/CloudFunctionsFeature.java | 146 +++++++++++++++ .../features/clients/CloudSqlFeature.java | 90 +++++++++ .../features/clients/OpenCensusFeature.java | 38 ++++ .../features/clients/SpannerFeature.java | 50 +++++ .../ApiClientVersionSubstitutions.java | 64 +++++++ .../GaxPropertiesSubstitutions.java | 56 ++++++ ...ttyInternalLoggerFactorySubstitutions.java | 55 ++++++ .../google-cloud-core/native-image.properties | 14 ++ .../google-cloud-core/resource-config.json | 13 ++ pom.xml | 17 ++ versions.txt | 3 +- 17 files changed, 1097 insertions(+), 1 deletion(-) create mode 100644 native-image-support/pom.xml create mode 100644 native-image-support/src/main/java/com/google/cloud/nativeimage/features/GoogleJsonClientFeature.java create mode 100644 native-image-support/src/main/java/com/google/cloud/nativeimage/features/GrpcNettyFeature.java create mode 100644 native-image-support/src/main/java/com/google/cloud/nativeimage/features/NativeImageUtils.java create mode 100644 native-image-support/src/main/java/com/google/cloud/nativeimage/features/ProtobufMessageFeature.java create mode 100644 native-image-support/src/main/java/com/google/cloud/nativeimage/features/clients/CloudFunctionsFeature.java create mode 100644 native-image-support/src/main/java/com/google/cloud/nativeimage/features/clients/CloudSqlFeature.java create mode 100644 native-image-support/src/main/java/com/google/cloud/nativeimage/features/clients/OpenCensusFeature.java create mode 100644 native-image-support/src/main/java/com/google/cloud/nativeimage/features/clients/SpannerFeature.java create mode 100644 native-image-support/src/main/java/com/google/cloud/nativeimage/features/substitutions/ApiClientVersionSubstitutions.java create mode 100644 native-image-support/src/main/java/com/google/cloud/nativeimage/features/substitutions/GaxPropertiesSubstitutions.java create mode 100644 native-image-support/src/main/java/com/google/cloud/nativeimage/features/substitutions/NettyInternalLoggerFactorySubstitutions.java create mode 100644 native-image-support/src/main/resources/META-INF/native-image/com.google.cloud/google-cloud-core/native-image.properties create mode 100644 native-image-support/src/main/resources/META-INF/native-image/com.google.cloud/google-cloud-core/resource-config.json diff --git a/google-cloud-core-bom/pom.xml b/google-cloud-core-bom/pom.xml index 763f1f28a7..2b72ab863b 100644 --- a/google-cloud-core-bom/pom.xml +++ b/google-cloud-core-bom/pom.xml @@ -75,6 +75,11 @@ google-cloud-core-http 2.3.6-SNAPSHOT + + com.google.cloud + native-image-support + 0.11.0-SNAPSHOT + diff --git a/native-image-support/pom.xml b/native-image-support/pom.xml new file mode 100644 index 0000000000..fb74248dcb --- /dev/null +++ b/native-image-support/pom.xml @@ -0,0 +1,47 @@ + + + + 4.0.0 + Google Cloud Native Image Support + com.google.cloud + native-image-support + 0.11.0-SNAPSHOT + jar + + + google-cloud-core-parent + com.google.cloud + 2.3.6-SNAPSHOT + + + + Core gRPC module for the google-cloud. + + + + + com.google.guava + guava + + + + io.grpc + grpc-netty-shaded + provided + + + + org.graalvm.nativeimage + svm + provided + + + + org.graalvm.sdk + graal-sdk + provided + + + \ No newline at end of file diff --git a/native-image-support/src/main/java/com/google/cloud/nativeimage/features/GoogleJsonClientFeature.java b/native-image-support/src/main/java/com/google/cloud/nativeimage/features/GoogleJsonClientFeature.java new file mode 100644 index 0000000000..8cc3107f4e --- /dev/null +++ b/native-image-support/src/main/java/com/google/cloud/nativeimage/features/GoogleJsonClientFeature.java @@ -0,0 +1,99 @@ +/* + * 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 + * + * 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. + */ + +package com.google.cloud.nativeimage.features; + +import static com.google.cloud.nativeimage.features.NativeImageUtils.registerClassForReflection; + +import com.oracle.svm.core.annotate.AutomaticFeature; +import com.oracle.svm.core.configure.ResourcesRegistry; +import org.graalvm.nativeimage.ImageSingletons; +import org.graalvm.nativeimage.hosted.Feature; + +/** Configures Native Image settings for the Google JSON Client. */ +@AutomaticFeature +final class GoogleJsonClientFeature implements Feature { + + private static final String GOOGLE_API_CLIENT_CLASS = + "com.google.api.client.googleapis.services.json.AbstractGoogleJsonClient"; + + private static final String GOOGLE_API_CLIENT_REQUEST_CLASS = + "com.google.api.client.googleapis.services.json.AbstractGoogleJsonClientRequest"; + + private static final String GENERIC_JSON_CLASS = "com.google.api.client.json.GenericJson"; + + @Override + public void beforeAnalysis(BeforeAnalysisAccess access) { + loadApiClient(access); + loadHttpClient(access); + loadMiscClasses(access); + } + + private void loadApiClient(BeforeAnalysisAccess access) { + // For com.google.api-client:google-api-client + Class googleApiClientClass = access.findClassByName(GOOGLE_API_CLIENT_CLASS); + + if (googleApiClientClass != null) { + // All reachable instances of the AbstractGoogleJsonClient must be registered. + access.registerSubtypeReachabilityHandler( + (duringAccess, subtype) -> registerClassForReflection(access, subtype.getName()), + googleApiClientClass); + + // All reachable instances of the AbstractGoogleJsonClientRequest must be registered. + access.registerSubtypeReachabilityHandler( + (duringAccess, subtype) -> registerClassForReflection(access, subtype.getName()), + access.findClassByName(GOOGLE_API_CLIENT_REQUEST_CLASS)); + + // Resources + ResourcesRegistry resourcesRegistry = ImageSingletons.lookup(ResourcesRegistry.class); + resourcesRegistry.addResources( + "\\Qcom/google/api/client/googleapis/google-api-client.properties\\E"); + resourcesRegistry.addResources("\\Qcom/google/api/client/googleapis/google.p12\\E"); + resourcesRegistry.addResources( + "\\Qcom/google/api/client/http/google-http-client.properties\\E"); + } + } + + private void loadHttpClient(BeforeAnalysisAccess access) { + // For com.google.http-client:google-http-client + Class genericJsonClass = access.findClassByName(GENERIC_JSON_CLASS); + + if (genericJsonClass != null) { + // All reachable instances of GenericJson must be registered. + access.registerSubtypeReachabilityHandler( + (duringAccess, subtype) -> registerClassForReflection(access, subtype.getName()), + genericJsonClass); + + registerClassForReflection(access, "com.google.api.client.util.GenericData"); + registerClassForReflection(access, "com.google.api.client.json.webtoken.JsonWebToken"); + registerClassForReflection(access, "com.google.api.client.json.webtoken.JsonWebToken$Header"); + registerClassForReflection( + access, "com.google.api.client.json.webtoken.JsonWebToken$Payload"); + registerClassForReflection( + access, "com.google.api.client.json.webtoken.JsonWebSignature$Header"); + registerClassForReflection(access, "com.google.api.client.json.webtoken.JsonWebSignature"); + registerClassForReflection(access, "com.google.api.client.http.UrlEncodedContent"); + registerClassForReflection(access, "com.google.api.client.http.GenericUrl"); + registerClassForReflection(access, "com.google.api.client.http.HttpRequest"); + registerClassForReflection(access, "com.google.api.client.http.HttpHeaders"); + } + } + + private void loadMiscClasses(BeforeAnalysisAccess access) { + registerClassForReflection(access, "com.google.common.util.concurrent.AbstractFuture"); + registerClassForReflection(access, "com.google.common.util.concurrent.AbstractFuture$Waiter"); + } +} diff --git a/native-image-support/src/main/java/com/google/cloud/nativeimage/features/GrpcNettyFeature.java b/native-image-support/src/main/java/com/google/cloud/nativeimage/features/GrpcNettyFeature.java new file mode 100644 index 0000000000..754f9005e2 --- /dev/null +++ b/native-image-support/src/main/java/com/google/cloud/nativeimage/features/GrpcNettyFeature.java @@ -0,0 +1,122 @@ +/* + * 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 + * + * 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. + */ + +package com.google.cloud.nativeimage.features; + +import static com.google.cloud.nativeimage.features.NativeImageUtils.registerClassForReflection; +import static com.google.cloud.nativeimage.features.NativeImageUtils.registerClassHierarchyForReflection; +import static com.google.cloud.nativeimage.features.NativeImageUtils.registerForReflectiveInstantiation; +import static com.google.cloud.nativeimage.features.NativeImageUtils.registerForUnsafeFieldAccess; + +import com.oracle.svm.core.annotate.AutomaticFeature; +import org.graalvm.nativeimage.hosted.Feature; + +/** Configures Native Image settings for the grpc-netty-shaded dependency. */ +@AutomaticFeature +final class GrpcNettyFeature implements Feature { + + private static final String GRPC_NETTY_SHADED_CLASS = + "io.grpc.netty.shaded.io.grpc.netty.NettyServer"; + + private static final String GOOGLE_AUTH_CLASS = + "com.google.auth.oauth2.ServiceAccountCredentials"; + + @Override + public void beforeAnalysis(BeforeAnalysisAccess access) { + loadGoogleAuthClasses(access); + loadGrpcNettyClasses(access); + loadMiscClasses(access); + } + + private static void loadGoogleAuthClasses(BeforeAnalysisAccess access) { + // For com.google.auth:google-auth-library-oauth2-http + Class authClass = access.findClassByName(GOOGLE_AUTH_CLASS); + if (authClass != null) { + registerClassHierarchyForReflection( + access, "com.google.auth.oauth2.ServiceAccountCredentials"); + registerClassHierarchyForReflection( + access, "com.google.auth.oauth2.ServiceAccountJwtAccessCredentials"); + } + } + + private static void loadGrpcNettyClasses(BeforeAnalysisAccess access) { + // For io.grpc:grpc-netty-shaded + Class nettyShadedClass = access.findClassByName(GRPC_NETTY_SHADED_CLASS); + if (nettyShadedClass != null) { + // Misc. classes used by grpc-netty-shaded + registerForReflectiveInstantiation( + access, "io.grpc.netty.shaded.io.netty.channel.socket.nio.NioSocketChannel"); + registerClassForReflection( + access, "io.grpc.netty.shaded.io.netty.util.internal.NativeLibraryUtil"); + registerClassForReflection(access, "io.grpc.netty.shaded.io.netty.util.ReferenceCountUtil"); + registerClassForReflection( + access, "io.grpc.netty.shaded.io.netty.buffer.AbstractByteBufAllocator"); + + // Epoll Libraries + registerClassForReflection(access, "io.grpc.netty.shaded.io.netty.channel.epoll.Epoll"); + registerClassForReflection( + access, "io.grpc.netty.shaded.io.netty.channel.epoll.EpollChannelOption"); + registerClassForReflection( + access, "io.grpc.netty.shaded.io.netty.channel.epoll.EpollEventLoopGroup"); + registerForReflectiveInstantiation( + access, "io.grpc.netty.shaded.io.netty.channel.epoll.EpollServerSocketChannel"); + registerForReflectiveInstantiation( + access, "io.grpc.netty.shaded.io.netty.channel.epoll.EpollSocketChannel"); + + // Unsafe field accesses + registerForUnsafeFieldAccess( + access, + "io.grpc.netty.shaded.io.netty.util.internal.shaded." + + "org.jctools.queues.MpscArrayQueueProducerIndexField", + "producerIndex"); + registerForUnsafeFieldAccess( + access, + "io.grpc.netty.shaded.io.netty.util.internal.shaded." + + "org.jctools.queues.MpscArrayQueueProducerLimitField", + "producerLimit"); + registerForUnsafeFieldAccess( + access, + "io.grpc.netty.shaded.io.netty.util.internal.shaded." + + "org.jctools.queues.MpscArrayQueueConsumerIndexField", + "consumerIndex"); + registerForUnsafeFieldAccess( + access, + "io.grpc.netty.shaded.io.netty.util.internal.shaded." + + "org.jctools.queues.BaseMpscLinkedArrayQueueProducerFields", + "producerIndex"); + registerForUnsafeFieldAccess( + access, + "io.grpc.netty.shaded.io.netty.util.internal.shaded." + + "org.jctools.queues.BaseMpscLinkedArrayQueueColdProducerFields", + "producerLimit"); + registerForUnsafeFieldAccess( + access, + "io.grpc.netty.shaded.io.netty.util.internal.shaded." + + "org.jctools.queues.BaseMpscLinkedArrayQueueConsumerFields", + "consumerIndex"); + } + } + + /** Miscellaneous classes that need to be registered coming from various JARs. */ + private static void loadMiscClasses(BeforeAnalysisAccess access) { + registerClassHierarchyForReflection(access, "com.google.protobuf.DescriptorProtos"); + registerClassForReflection(access, "com.google.api.FieldBehavior"); + + registerForUnsafeFieldAccess(access, "javax.net.ssl.SSLContext", "contextSpi"); + registerClassForReflection(access, "java.lang.management.ManagementFactory"); + registerClassForReflection(access, "java.lang.management.RuntimeMXBean"); + } +} diff --git a/native-image-support/src/main/java/com/google/cloud/nativeimage/features/NativeImageUtils.java b/native-image-support/src/main/java/com/google/cloud/nativeimage/features/NativeImageUtils.java new file mode 100644 index 0000000000..8b19f4b84f --- /dev/null +++ b/native-image-support/src/main/java/com/google/cloud/nativeimage/features/NativeImageUtils.java @@ -0,0 +1,174 @@ +/* + * 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 + * + * 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. + */ + +package com.google.cloud.nativeimage.features; + +import java.io.IOException; +import java.lang.reflect.Method; +import java.lang.reflect.Modifier; +import java.net.JarURLConnection; +import java.net.URL; +import java.net.URLConnection; +import java.util.ArrayList; +import java.util.Enumeration; +import java.util.List; +import java.util.jar.JarEntry; +import java.util.jar.JarFile; +import java.util.logging.Logger; +import org.graalvm.nativeimage.hosted.Feature.FeatureAccess; +import org.graalvm.nativeimage.hosted.RuntimeReflection; + +/** Internal class offering helper methods for registering methods/classes for reflection. */ +public class NativeImageUtils { + + private static final Logger LOGGER = Logger.getLogger(NativeImageUtils.class.getName()); + + /** Returns the method of a class or fails if it is not present. */ + public static Method getMethodOrFail(Class clazz, String methodName, Class... params) { + try { + return clazz.getDeclaredMethod(methodName, params); + } catch (NoSuchMethodException e) { + throw new RuntimeException( + "Failed to find method " + methodName + " for class " + clazz.getName(), e); + } + } + + /** Registers a class for reflective construction via its default constructor. */ + public static void registerForReflectiveInstantiation(FeatureAccess access, String className) { + Class clazz = access.findClassByName(className); + if (clazz != null) { + RuntimeReflection.register(clazz); + RuntimeReflection.registerForReflectiveInstantiation(clazz); + } else { + LOGGER.warning( + "Failed to find " + className + " on the classpath for reflective instantiation."); + } + } + + /** Registers all constructors of a class for reflection. */ + public static void registerConstructorsForReflection(FeatureAccess access, String name) { + Class clazz = access.findClassByName(name); + if (clazz != null) { + RuntimeReflection.register(clazz); + RuntimeReflection.register(clazz.getDeclaredConstructors()); + } else { + LOGGER.warning("Failed to find " + name + " on the classpath for reflection."); + } + } + + /** Registers an entire class for reflection use. */ + public static void registerClassForReflection(FeatureAccess access, String name) { + Class clazz = access.findClassByName(name); + if (clazz != null) { + RuntimeReflection.register(clazz); + RuntimeReflection.register(clazz.getDeclaredConstructors()); + RuntimeReflection.register(clazz.getDeclaredFields()); + RuntimeReflection.register(clazz.getDeclaredMethods()); + } else { + LOGGER.warning("Failed to find " + name + " on the classpath for reflection."); + } + } + + /** + * Registers the transitive class hierarchy of the provided {@code className} for reflection. + * + *

The transitive class hierarchy contains the class itself and its transitive set of + * *non-private* nested subclasses. + */ + public static void registerClassHierarchyForReflection(FeatureAccess access, String className) { + Class clazz = access.findClassByName(className); + if (clazz != null) { + registerClassForReflection(access, className); + for (Class nestedClass : clazz.getDeclaredClasses()) { + if (!Modifier.isPrivate(nestedClass.getModifiers())) { + registerClassHierarchyForReflection(access, nestedClass.getName()); + } + } + } else { + LOGGER.warning("Failed to find " + className + " on the classpath for reflection."); + } + } + + /** Registers a class for unsafe reflective field access. */ + public static void registerForUnsafeFieldAccess( + FeatureAccess access, String className, String... fields) { + Class clazz = access.findClassByName(className); + if (clazz != null) { + RuntimeReflection.register(clazz); + for (String fieldName : fields) { + try { + RuntimeReflection.register(clazz.getDeclaredField(fieldName)); + } catch (NoSuchFieldException ex) { + LOGGER.warning("Failed to register field " + fieldName + " for class " + className); + LOGGER.warning(ex.getMessage()); + } + } + } else { + LOGGER.warning( + "Failed to find " + + className + + " on the classpath for unsafe fields access registration."); + } + } + + /** Registers all the classes under the specified package for reflection. */ + public static void registerPackageForReflection(FeatureAccess access, String packageName) { + ClassLoader classLoader = Thread.currentThread().getContextClassLoader(); + + try { + String path = packageName.replace('.', '/'); + + Enumeration resources = classLoader.getResources(path); + while (resources.hasMoreElements()) { + URL url = resources.nextElement(); + + URLConnection connection = url.openConnection(); + if (connection instanceof JarURLConnection) { + List classes = findClassesInJar((JarURLConnection) connection, packageName); + for (String className : classes) { + registerClassHierarchyForReflection(access, className); + } + } + } + } catch (IOException e) { + throw new RuntimeException("Failed to load classes under package name.", e); + } + } + + private static List findClassesInJar(JarURLConnection urlConnection, String packageName) + throws IOException { + + List result = new ArrayList<>(); + + final JarFile jarFile = urlConnection.getJarFile(); + final Enumeration entries = jarFile.entries(); + + while (entries.hasMoreElements()) { + JarEntry entry = entries.nextElement(); + String entryName = entry.getName(); + + if (entryName.endsWith(".class")) { + String javaClassName = entryName.replace(".class", "").replace('/', '.'); + + if (javaClassName.startsWith(packageName)) { + result.add(javaClassName); + } + } + } + + return result; + } +} diff --git a/native-image-support/src/main/java/com/google/cloud/nativeimage/features/ProtobufMessageFeature.java b/native-image-support/src/main/java/com/google/cloud/nativeimage/features/ProtobufMessageFeature.java new file mode 100644 index 0000000000..40251e85e4 --- /dev/null +++ b/native-image-support/src/main/java/com/google/cloud/nativeimage/features/ProtobufMessageFeature.java @@ -0,0 +1,105 @@ +/* + * 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 + * + * 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. + */ + +package com.google.cloud.nativeimage.features; + +import java.lang.reflect.Method; +import java.util.Arrays; +import java.util.List; +import org.graalvm.nativeimage.hosted.Feature; +import org.graalvm.nativeimage.hosted.RuntimeReflection; + +/** + * A optional feature which registers reflective usages of the GRPC Protobuf libraries. + * + *

This feature is only needed if you need to access proto objects reflectively (such as + * printing/logging proto objects). + * + *

To add this feature, add "--feature + * com.google.cloud.nativeimage.features.ProtobufMessageFeature" to your GraalVM configuration. + */ +final class ProtobufMessageFeature implements Feature { + + // Proto classes to check on the classpath. + private static final String PROTO_MESSAGE_CLASS = "com.google.protobuf.GeneratedMessageV3"; + private static final String PROTO_ENUM_CLASS = "com.google.protobuf.ProtocolMessageEnum"; + private static final String ENUM_VAL_DESCRIPTOR_CLASS = + "com.google.protobuf.Descriptors$EnumValueDescriptor"; + + // Prefixes of methods accessed reflectively by + // com.google.protobuf.GeneratedMessageV3$ReflectionInvoker + private static final List METHOD_ACCESSOR_PREFIXES = + Arrays.asList("get", "set", "has", "add", "clear", "newBuilder"); + + @Override + public void beforeAnalysis(BeforeAnalysisAccess access) { + Class protoMessageClass = access.findClassByName(PROTO_MESSAGE_CLASS); + if (protoMessageClass != null) { + Method internalAccessorMethod = + NativeImageUtils.getMethodOrFail(protoMessageClass, "internalGetFieldAccessorTable"); + + // Finds every class whose `internalGetFieldAccessorTable()` is reached and registers it. + // `internalGetFieldAccessorTable()` is used downstream to access the class reflectively. + access.registerMethodOverrideReachabilityHandler( + (duringAccess, method) -> { + registerFieldAccessors(method.getDeclaringClass()); + registerFieldAccessors(getBuilderClass(method.getDeclaringClass())); + }, + internalAccessorMethod); + } + + Class protoEnumClass = access.findClassByName(PROTO_ENUM_CLASS); + if (protoEnumClass != null) { + // Finds every reachable proto enum class and registers specific methods for reflection. + access.registerSubtypeReachabilityHandler( + (duringAccess, subtypeClass) -> { + if (!PROTO_ENUM_CLASS.equals(subtypeClass.getName())) { + Method method = + NativeImageUtils.getMethodOrFail( + subtypeClass, + "valueOf", + duringAccess.findClassByName(ENUM_VAL_DESCRIPTOR_CLASS)); + RuntimeReflection.register(method); + + method = NativeImageUtils.getMethodOrFail(subtypeClass, "getValueDescriptor"); + RuntimeReflection.register(method); + } + }, + protoEnumClass); + } + } + + /** Given a proto class, registers the public accessor methods for the provided proto class. */ + private static void registerFieldAccessors(Class protoClass) { + for (Method method : protoClass.getMethods()) { + boolean hasAccessorPrefix = + METHOD_ACCESSOR_PREFIXES.stream().anyMatch(prefix -> method.getName().startsWith(prefix)); + if (hasAccessorPrefix) { + RuntimeReflection.register(method); + } + } + } + + /** Given a proto class, returns the Builder nested class. */ + private static Class getBuilderClass(Class protoClass) { + for (Class clazz : protoClass.getClasses()) { + if (clazz.getName().endsWith("Builder")) { + return clazz; + } + } + return null; + } +} diff --git a/native-image-support/src/main/java/com/google/cloud/nativeimage/features/clients/CloudFunctionsFeature.java b/native-image-support/src/main/java/com/google/cloud/nativeimage/features/clients/CloudFunctionsFeature.java new file mode 100644 index 0000000000..7b7eaaebaf --- /dev/null +++ b/native-image-support/src/main/java/com/google/cloud/nativeimage/features/clients/CloudFunctionsFeature.java @@ -0,0 +1,146 @@ +/* + * 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 + * + * 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. + */ + +package com.google.cloud.nativeimage.features.clients; + +import static com.google.cloud.nativeimage.features.NativeImageUtils.registerClassForReflection; +import static com.google.cloud.nativeimage.features.NativeImageUtils.registerClassHierarchyForReflection; + +import com.oracle.svm.core.annotate.AutomaticFeature; +import com.oracle.svm.core.configure.ResourcesRegistry; +import java.io.IOException; +import java.lang.reflect.Modifier; +import java.lang.reflect.ParameterizedType; +import java.lang.reflect.Type; +import java.nio.file.Path; +import java.util.Arrays; +import java.util.Enumeration; +import java.util.List; +import java.util.function.Consumer; +import java.util.jar.JarEntry; +import java.util.jar.JarFile; +import java.util.stream.Collectors; +import org.graalvm.nativeimage.ImageSingletons; +import org.graalvm.nativeimage.hosted.Feature; +import org.graalvm.nativeimage.hosted.RuntimeReflection; + +/** A feature which registers reflective usages of the Cloud Functions library. */ +@AutomaticFeature +final class CloudFunctionsFeature implements Feature { + + private static final String FUNCTION_INVOKER_CLASS = + "com.google.cloud.functions.invoker.runner.Invoker"; + + private static final List FUNCTIONS_CLASSES = + Arrays.asList( + "com.google.cloud.functions.HttpFunction", + "com.google.cloud.functions.RawBackgroundFunction", + "com.google.cloud.functions.BackgroundFunction"); + + @Override + public void beforeAnalysis(BeforeAnalysisAccess access) { + Class invokerClass = access.findClassByName(FUNCTION_INVOKER_CLASS); + if (invokerClass != null) { + // JCommander libraries + registerClassForReflection(access, "com.beust.jcommander.converters.StringConverter"); + registerClassForReflection(access, "com.beust.jcommander.validators.NoValidator"); + registerClassForReflection(access, "com.beust.jcommander.validators.NoValueValidator"); + + // Jetty libraries + registerClassForReflection(access, "org.eclipse.jetty.http.HttpTokens"); + registerClassForReflection(access, "org.eclipse.jetty.util.TypeUtil"); + + // Cloud Functions core + registerClassForReflection( + access, "com.google.cloud.functions.invoker.runner.Invoker$Options"); + + // Register Jetty Resources. + ResourcesRegistry resourcesRegistry = ImageSingletons.lookup(ResourcesRegistry.class); + resourcesRegistry.addResources( + "\\QMETA-INF/services/org.eclipse.jetty.http.HttpFieldPreEncoder\\E"); + resourcesRegistry.addResources("\\Qorg/eclipse/jetty/http/encoding.properties\\E"); + resourcesRegistry.addResources("\\Qorg/eclipse/jetty/http/mime.properties\\E"); + resourcesRegistry.addResources("\\Qorg/eclipse/jetty/version/build.properties\\E"); + resourcesRegistry.addResourceBundles("javax.servlet.LocalStrings"); + resourcesRegistry.addResourceBundles("javax.servlet.http.LocalStrings"); + + // Register user-implemented Function classes + List> functionClasses = + FUNCTIONS_CLASSES.stream() + .map(name -> access.findClassByName(name)) + .collect(Collectors.toList()); + + scanJarClasspath( + access, + clazz -> { + boolean isFunctionSubtype = + functionClasses.stream() + .anyMatch( + function -> + function.isAssignableFrom(clazz) + && !Modifier.isAbstract(clazz.getModifiers())); + + if (isFunctionSubtype) { + RuntimeReflection.register(clazz); + RuntimeReflection.register(clazz.getDeclaredConstructors()); + RuntimeReflection.register(clazz.getDeclaredMethods()); + + // This part is to register the parameterized class of BackgroundFunctions + // for reflection; i.e. register type T in BackgroundFunction + for (Type type : clazz.getGenericInterfaces()) { + if (type instanceof ParameterizedType) { + ParameterizedType paramType = (ParameterizedType) type; + for (Type argument : paramType.getActualTypeArguments()) { + registerClassHierarchyForReflection(access, argument.getTypeName()); + } + } + } + } + }); + } + } + + /** + * Scan the JAR classpath for classes. The {@code classProcessorFunction} is run once for each + * class in the classpath. + */ + private static void scanJarClasspath( + FeatureAccess access, Consumer> classProcessorCallback) { + + List classPath = access.getApplicationClassPath(); + try { + for (Path path : classPath) { + JarFile jarFile = new JarFile(path.toFile()); + Enumeration entries = jarFile.entries(); + + while (entries.hasMoreElements()) { + JarEntry jarEntry = entries.nextElement(); + String fileName = jarEntry.getName(); + if (fileName.endsWith(".class")) { + String className = fileName.substring(0, fileName.length() - 6).replaceAll("/", "."); + + Class clazz = access.findClassByName(className); + if (clazz != null) { + classProcessorCallback.accept(clazz); + } + } + } + } + } catch (IOException e) { + throw new RuntimeException("Failed to read classpath: ", e); + } + } +} diff --git a/native-image-support/src/main/java/com/google/cloud/nativeimage/features/clients/CloudSqlFeature.java b/native-image-support/src/main/java/com/google/cloud/nativeimage/features/clients/CloudSqlFeature.java new file mode 100644 index 0000000000..48b4c1e4ef --- /dev/null +++ b/native-image-support/src/main/java/com/google/cloud/nativeimage/features/clients/CloudSqlFeature.java @@ -0,0 +1,90 @@ +/* + * 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 + * + * 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. + */ + +package com.google.cloud.nativeimage.features.clients; + +import com.google.cloud.nativeimage.features.NativeImageUtils; +import com.oracle.svm.core.annotate.AutomaticFeature; +import com.oracle.svm.core.configure.ResourcesRegistry; +import org.graalvm.nativeimage.ImageSingletons; +import org.graalvm.nativeimage.hosted.Feature; +import org.graalvm.nativeimage.hosted.RuntimeClassInitialization; +import org.graalvm.nativeimage.hosted.RuntimeReflection; + +/** Registers GraalVM configuration for the Cloud SQL libraries for MySQL and Postgres. */ +@AutomaticFeature +final class CloudSqlFeature implements Feature { + + private static final String CLOUD_SQL_SOCKET_CLASS = + "com.google.cloud.sql.core.CoreSocketFactory"; + + private static final String POSTGRES_SOCKET_CLASS = "com.google.cloud.sql.postgres.SocketFactory"; + + private static final String MYSQL_SOCKET_CLASS = "com.google.cloud.sql.mysql.SocketFactory"; + + @Override + public void beforeAnalysis(BeforeAnalysisAccess access) { + if (access.findClassByName(CLOUD_SQL_SOCKET_CLASS) == null) { + return; + } + + // The Core Cloud SQL Socket + NativeImageUtils.registerClassForReflection(access, CLOUD_SQL_SOCKET_CLASS); + + // Resources for Cloud SQL + ResourcesRegistry resourcesRegistry = ImageSingletons.lookup(ResourcesRegistry.class); + resourcesRegistry.addResources("\\Qcom.google.cloud.sql/project.properties\\E"); + resourcesRegistry.addResources("\\QMETA-INF/services/java.sql.Driver\\E"); + + // Register Hikari configs if used with Cloud SQL. + if (access.findClassByName("com.zaxxer.hikari.HikariConfig") != null) { + NativeImageUtils.registerClassForReflection(access, "com.zaxxer.hikari.HikariConfig"); + + RuntimeReflection.register( + access.findClassByName("[Lcom.zaxxer.hikari.util.ConcurrentBag$IConcurrentBagEntry;")); + + RuntimeReflection.register(access.findClassByName("[Ljava.sql.Statement;")); + } + + // Register PostgreSQL driver config. + if (access.findClassByName(POSTGRES_SOCKET_CLASS) != null) { + NativeImageUtils.registerClassForReflection( + access, "com.google.cloud.sql.postgres.SocketFactory"); + NativeImageUtils.registerClassForReflection(access, "org.postgresql.PGProperty"); + } + + // Register MySQL driver config. + if (access.findClassByName(MYSQL_SOCKET_CLASS) != null) { + NativeImageUtils.registerClassForReflection(access, MYSQL_SOCKET_CLASS); + + NativeImageUtils.registerConstructorsForReflection( + access, "com.mysql.cj.conf.url.SingleConnectionUrl"); + + NativeImageUtils.registerConstructorsForReflection(access, "com.mysql.cj.log.StandardLogger"); + + access.registerSubtypeReachabilityHandler( + (duringAccess, exceptionClass) -> + NativeImageUtils.registerClassForReflection(duringAccess, exceptionClass.getName()), + access.findClassByName("com.mysql.cj.exceptions.CJException")); + + // JDBC classes create socket connections which must be initialized at run time. + RuntimeClassInitialization.initializeAtRunTime("com.mysql.cj.jdbc"); + + // Additional MySQL resources. + resourcesRegistry.addResourceBundles("com.mysql.cj.LocalizedErrorMessages"); + } + } +} diff --git a/native-image-support/src/main/java/com/google/cloud/nativeimage/features/clients/OpenCensusFeature.java b/native-image-support/src/main/java/com/google/cloud/nativeimage/features/clients/OpenCensusFeature.java new file mode 100644 index 0000000000..f2b6cb2098 --- /dev/null +++ b/native-image-support/src/main/java/com/google/cloud/nativeimage/features/clients/OpenCensusFeature.java @@ -0,0 +1,38 @@ +/* + * 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 + * + * 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. + */ + +package com.google.cloud.nativeimage.features.clients; + +import static com.google.cloud.nativeimage.features.NativeImageUtils.registerForReflectiveInstantiation; + +import com.oracle.svm.core.annotate.AutomaticFeature; +import org.graalvm.nativeimage.hosted.Feature; + +/** Registers reflection usage in OpenCensus libraries. */ +@AutomaticFeature +final class OpenCensusFeature implements Feature { + + private static final String OPEN_CENSUS_CLASS = "io.opencensus.impl.tags.TagsComponentImpl"; + + @Override + public void beforeAnalysis(BeforeAnalysisAccess access) { + if (access.findClassByName(OPEN_CENSUS_CLASS) != null) { + registerForReflectiveInstantiation(access, "io.opencensus.impl.metrics.MetricsComponentImpl"); + registerForReflectiveInstantiation(access, "io.opencensus.impl.tags.TagsComponentImpl"); + registerForReflectiveInstantiation(access, "io.opencensus.impl.trace.TraceComponentImpl"); + } + } +} diff --git a/native-image-support/src/main/java/com/google/cloud/nativeimage/features/clients/SpannerFeature.java b/native-image-support/src/main/java/com/google/cloud/nativeimage/features/clients/SpannerFeature.java new file mode 100644 index 0000000000..e902c77928 --- /dev/null +++ b/native-image-support/src/main/java/com/google/cloud/nativeimage/features/clients/SpannerFeature.java @@ -0,0 +1,50 @@ +/* + * 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 + * + * 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. + */ + +package com.google.cloud.nativeimage.features.clients; + +import com.google.cloud.nativeimage.features.NativeImageUtils; +import com.oracle.svm.core.annotate.AutomaticFeature; +import com.oracle.svm.core.configure.ResourcesRegistry; +import org.graalvm.nativeimage.ImageSingletons; +import org.graalvm.nativeimage.hosted.Feature; + +/** Registers Spanner library classes for reflection. */ +@AutomaticFeature +final class SpannerFeature implements Feature { + + private static final String SPANNER_CLASS = "com.google.spanner.v1.SpannerGrpc"; + + @Override + public void beforeAnalysis(BeforeAnalysisAccess access) { + Class spannerClass = access.findClassByName(SPANNER_CLASS); + if (spannerClass != null) { + NativeImageUtils.registerClassHierarchyForReflection( + access, "com.google.spanner.admin.database.v1.Database"); + NativeImageUtils.registerClassHierarchyForReflection( + access, "com.google.spanner.admin.instance.v1.Instance"); + NativeImageUtils.registerClassForReflection( + access, "com.google.spanner.admin.database.v1.RestoreInfo"); + + // Resources + ResourcesRegistry resourcesRegistry = ImageSingletons.lookup(ResourcesRegistry.class); + resourcesRegistry.addResources( + "\\Qcom/google/cloud/spanner/connection/ClientSideStatements.json\\E"); + resourcesRegistry.addResources( + "\\Qcom/google/cloud/spanner/spi/v1/grpc-gcp-apiconfig.json\\E"); + } + } +} diff --git a/native-image-support/src/main/java/com/google/cloud/nativeimage/features/substitutions/ApiClientVersionSubstitutions.java b/native-image-support/src/main/java/com/google/cloud/nativeimage/features/substitutions/ApiClientVersionSubstitutions.java new file mode 100644 index 0000000000..c170c2ea7a --- /dev/null +++ b/native-image-support/src/main/java/com/google/cloud/nativeimage/features/substitutions/ApiClientVersionSubstitutions.java @@ -0,0 +1,64 @@ +/* + * 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 + * + * 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. + */ + +package com.google.cloud.nativeimage.features.substitutions; + +import com.oracle.svm.core.annotate.Alias; +import com.oracle.svm.core.annotate.Substitute; +import com.oracle.svm.core.annotate.TargetClass; +import java.util.function.BooleanSupplier; + +/** Substitution for setting Java version correctly in the Google Java Http Client. */ +@TargetClass( + className = + "com.google.api.client.googleapis.services.AbstractGoogleClientRequest$ApiClientVersion", + onlyWith = ApiClientVersionSubstitutions.OnlyIfInClassPath.class) +final class ApiClientVersionSubstitutions { + + @Alias private String versionString; + + @Substitute + public String toString() { + String[] tokens = versionString.split(" "); + + if (tokens.length > 0 && tokens[0].startsWith("gl-java")) { + tokens[0] += "-graalvm"; + return String.join(" ", tokens); + } else { + return versionString; + } + } + + private ApiClientVersionSubstitutions() {} + + static class OnlyIfInClassPath implements BooleanSupplier { + + @Override + public boolean getAsBoolean() { + try { + // Note: Set initialize = false to avoid initializing the class when looking it up. + Class.forName( + "com.google.api.client.googleapis.services." + + "AbstractGoogleClientRequest$ApiClientVersion", + false, + Thread.currentThread().getContextClassLoader()); + return true; + } catch (ClassNotFoundException e) { + return false; + } + } + } +} diff --git a/native-image-support/src/main/java/com/google/cloud/nativeimage/features/substitutions/GaxPropertiesSubstitutions.java b/native-image-support/src/main/java/com/google/cloud/nativeimage/features/substitutions/GaxPropertiesSubstitutions.java new file mode 100644 index 0000000000..54245a8ee8 --- /dev/null +++ b/native-image-support/src/main/java/com/google/cloud/nativeimage/features/substitutions/GaxPropertiesSubstitutions.java @@ -0,0 +1,56 @@ +/* + * 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 + * + * 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. + */ + +package com.google.cloud.nativeimage.features.substitutions; + +import com.oracle.svm.core.annotate.Alias; +import com.oracle.svm.core.annotate.RecomputeFieldValue; +import com.oracle.svm.core.annotate.RecomputeFieldValue.Kind; +import com.oracle.svm.core.annotate.TargetClass; +import java.util.function.BooleanSupplier; + +/** + * This file contains the GaxProperties substitution to correctly set the Java language string in + * API call headers for Native Image users. + */ +@TargetClass( + className = "com.google.api.gax.core.GaxProperties", + onlyWith = GaxPropertiesSubstitutions.OnlyIfInClassPath.class) +final class GaxPropertiesSubstitutions { + + @Alias + @RecomputeFieldValue(kind = Kind.FromAlias) + private static String JAVA_VERSION = System.getProperty("java.version") + "-graalvm"; + + private GaxPropertiesSubstitutions() {} + + static class OnlyIfInClassPath implements BooleanSupplier { + + @Override + public boolean getAsBoolean() { + try { + // Note: Set initialize = false to avoid initializing the class when looking it up. + Class.forName( + "com.google.api.gax.core.GaxProperties", + false, + Thread.currentThread().getContextClassLoader()); + return true; + } catch (ClassNotFoundException e) { + return false; + } + } + } +} diff --git a/native-image-support/src/main/java/com/google/cloud/nativeimage/features/substitutions/NettyInternalLoggerFactorySubstitutions.java b/native-image-support/src/main/java/com/google/cloud/nativeimage/features/substitutions/NettyInternalLoggerFactorySubstitutions.java new file mode 100644 index 0000000000..7fcea16318 --- /dev/null +++ b/native-image-support/src/main/java/com/google/cloud/nativeimage/features/substitutions/NettyInternalLoggerFactorySubstitutions.java @@ -0,0 +1,55 @@ +/* + * 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 + * + * 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. + */ + +package com.google.cloud.nativeimage.features.substitutions; + +import com.oracle.svm.core.annotate.Substitute; +import com.oracle.svm.core.annotate.TargetClass; +import io.grpc.netty.shaded.io.netty.util.internal.logging.InternalLoggerFactory; +import io.grpc.netty.shaded.io.netty.util.internal.logging.JdkLoggerFactory; +import java.util.function.BooleanSupplier; + +/** + * Substitutions for {@link InternalLoggerFactory} which are needed to avoid dynamic loading of + * logging library. + */ +@TargetClass( + className = "io.grpc.netty.shaded.io.netty.util.internal.logging.InternalLoggerFactory", + onlyWith = NettyInternalLoggerFactorySubstitutions.OnlyIfInClassPath.class) +final class NettyInternalLoggerFactorySubstitutions { + + @Substitute + private static InternalLoggerFactory newDefaultFactory(String name) { + return JdkLoggerFactory.INSTANCE; + } + + static class OnlyIfInClassPath implements BooleanSupplier { + + @Override + public boolean getAsBoolean() { + try { + // Note: Set initialize = false to avoid initializing the class when looking it up. + Class.forName( + "io.grpc.netty.shaded.io.netty.util.internal.logging.InternalLoggerFactory", + false, + Thread.currentThread().getContextClassLoader()); + return true; + } catch (ClassNotFoundException e) { + return false; + } + } + } +} diff --git a/native-image-support/src/main/resources/META-INF/native-image/com.google.cloud/google-cloud-core/native-image.properties b/native-image-support/src/main/resources/META-INF/native-image/com.google.cloud/google-cloud-core/native-image.properties new file mode 100644 index 0000000000..aa61561066 --- /dev/null +++ b/native-image-support/src/main/resources/META-INF/native-image/com.google.cloud/google-cloud-core/native-image.properties @@ -0,0 +1,14 @@ +Args = --allow-incomplete-classpath \ +--enable-url-protocols=https,http \ +--initialize-at-build-time=org.conscrypt \ +--initialize-at-run-time=io.grpc.netty.shaded.io.netty.handler.ssl.OpenSsl,\ + io.grpc.netty.shaded.io.netty.internal.tcnative.SSL,\ + io.grpc.netty.shaded.io.netty.internal.tcnative.CertificateVerifier,\ + io.grpc.netty.shaded.io.netty.internal.tcnative.SSLPrivateKeyMethod,\ + io.grpc.netty.shaded.io.grpc.netty,\ + io.grpc.netty.shaded.io.netty.channel.epoll,\ + io.grpc.netty.shaded.io.netty.channel.unix,\ + io.grpc.netty.shaded.io.netty.handler.ssl,\ + io.grpc.internal.RetriableStream,\ + com.google.api.client.googleapis.services.AbstractGoogleClientRequest$ApiClientVersion,\ + com.google.cloud.firestore.FirestoreImpl diff --git a/native-image-support/src/main/resources/META-INF/native-image/com.google.cloud/google-cloud-core/resource-config.json b/native-image-support/src/main/resources/META-INF/native-image/com.google.cloud/google-cloud-core/resource-config.json new file mode 100644 index 0000000000..3afe5ffebc --- /dev/null +++ b/native-image-support/src/main/resources/META-INF/native-image/com.google.cloud/google-cloud-core/resource-config.json @@ -0,0 +1,13 @@ +{ + "resources":[ + {"pattern":"\\QMETA-INF/native/libio_grpc_netty_shaded_netty_tcnative_linux_x86_64.so\\E"}, + {"pattern":"\\QMETA-INF/native/libio_grpc_netty_shaded_netty_transport_native_epoll_x86_64.so\\E"}, + {"pattern":"\\QMETA-INF/services/io.grpc.LoadBalancerProvider\\E"}, + {"pattern":"\\QMETA-INF/services/io.grpc.ManagedChannelProvider\\E"}, + {"pattern":"\\QMETA-INF/services/io.grpc.NameResolverProvider\\E"}, + {"pattern":"\\QMETA-INF/services/jdk.vm.ci.services.JVMCIServiceLocator\\E"}, + {"pattern":"\\Qdependencies.properties\\E"}, + {"pattern":"\\Qgoogle-http-client.properties\\E"} + ], + "bundles":[] +} diff --git a/pom.xml b/pom.xml index d3f951d29f..3ba942f509 100644 --- a/pom.xml +++ b/pom.xml @@ -158,6 +158,7 @@ 1.3.0 1.33.0 1.41.0 + 21.3.0 1.43.1 3.19.2 0.28.0 @@ -283,6 +284,21 @@ ${gson.version} + + + org.graalvm.nativeimage + svm + ${graalvm.version} + provided + + + + org.graalvm.sdk + graal-sdk + ${graalvm.version} + provided + + com.google.truth @@ -322,6 +338,7 @@ google-cloud-core-http google-cloud-core-grpc google-cloud-core-bom + native-image-support diff --git a/versions.txt b/versions.txt index cdb2601a39..4cd1c2e1fd 100644 --- a/versions.txt +++ b/versions.txt @@ -1,4 +1,5 @@ # Format: # module:released-version:current-version -google-cloud-core:2.3.5:2.3.6-SNAPSHOT \ No newline at end of file +google-cloud-core:2.3.5:2.3.6-SNAPSHOT +native-image-support:0.10.0:0.11.0-SNAPSHOT \ No newline at end of file From dfb305acaf9d6db91727e42509fc6b043f07a5ce Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 19 Jan 2022 00:05:17 +0100 Subject: [PATCH 07/29] deps: update graalvm.version to v21.3.1 (#679) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 3ba942f509..5ee7b9c684 100644 --- a/pom.xml +++ b/pom.xml @@ -158,7 +158,7 @@ 1.3.0 1.33.0 1.41.0 - 21.3.0 + 21.3.1 1.43.1 3.19.2 0.28.0 From 6263364ed4ad9aa08821a6f318e70b2be9397de3 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 19 Jan 2022 00:05:44 +0100 Subject: [PATCH 08/29] test(deps): update dependency org.objenesis:objenesis to v3 (#669) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 5ee7b9c684..4f7602fbae 100644 --- a/pom.xml +++ b/pom.xml @@ -169,7 +169,7 @@ 3.6 3.0.2 1.5.2 - 2.6 + 3.2 2.10.0 2.8.9 From b57ec047234a1a044458980a8cf7de6a3156bf41 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 19 Jan 2022 00:05:58 +0100 Subject: [PATCH 09/29] deps: update dependency com.google.api.grpc:proto-google-iam-v1 to v1.2.1 (#667) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 4f7602fbae..d21078e433 100644 --- a/pom.xml +++ b/pom.xml @@ -154,7 +154,7 @@ 2.8.1 2.1.2 2.7.1 - 1.2.0 + 1.2.1 1.3.0 1.33.0 1.41.0 From c2caaa7cb2c094318e611ba2c082a8a31fee21ea Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 19 Jan 2022 00:06:12 +0100 Subject: [PATCH 10/29] deps: update opencensus.version to v0.30.0 (#646) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index d21078e433..6a38fcfce4 100644 --- a/pom.xml +++ b/pom.xml @@ -161,7 +161,7 @@ 21.3.1 1.43.1 3.19.2 - 0.28.0 + 0.30.0 1.3.2 31.0.1-jre 4.13.2 From c36e976c0379c1119dfe643dc3131f2e52130c5c Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 19 Jan 2022 02:26:26 +0100 Subject: [PATCH 11/29] deps: update dependency org.easymock:easymock to v4 (#668) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [org.easymock:easymock](http://easymock.org) ([source](https://togithub.com/easymock/easymock)) | `3.6` -> `4.3` | [![age](https://badges.renovateapi.com/packages/maven/org.easymock:easymock/4.3/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/org.easymock:easymock/4.3/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/org.easymock:easymock/4.3/compatibility-slim/3.6)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/org.easymock:easymock/4.3/confidence-slim/3.6)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-core). --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 6a38fcfce4..0fa8030237 100644 --- a/pom.xml +++ b/pom.xml @@ -166,7 +166,7 @@ 31.0.1-jre 4.13.2 1.1.3 - 3.6 + 4.3 3.0.2 1.5.2 3.2 From 0f535f869f7ce68192f821d0f3361634676dddf7 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 19 Jan 2022 19:45:32 +0100 Subject: [PATCH 12/29] deps: update dependency org.graalvm.sdk:graal-sdk to v22 (#680) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 0fa8030237..301d8e97dc 100644 --- a/pom.xml +++ b/pom.xml @@ -158,7 +158,7 @@ 1.3.0 1.33.0 1.41.0 - 21.3.1 + 22.0.0 1.43.1 3.19.2 0.30.0 From c54f9973b71c91c1fde0a1d128957cd022a27902 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 19 Jan 2022 19:45:42 +0100 Subject: [PATCH 13/29] deps: update dependency com.google.protobuf:protobuf-bom to v3.19.3 (#674) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 301d8e97dc..b2b36650c9 100644 --- a/pom.xml +++ b/pom.xml @@ -160,7 +160,7 @@ 1.41.0 22.0.0 1.43.1 - 3.19.2 + 3.19.3 0.30.0 1.3.2 31.0.1-jre From 752ba6e384c382d0e39d8335640eaaea2beee9e1 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 19 Jan 2022 19:56:15 +0100 Subject: [PATCH 14/29] deps: update dependency io.grpc:grpc-bom to v1.43.2 (#665) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [io.grpc:grpc-bom](https://togithub.com/grpc/grpc-java) | `1.43.1` -> `1.43.2` | [![age](https://badges.renovateapi.com/packages/maven/io.grpc:grpc-bom/1.43.2/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/io.grpc:grpc-bom/1.43.2/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/io.grpc:grpc-bom/1.43.2/compatibility-slim/1.43.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/io.grpc:grpc-bom/1.43.2/confidence-slim/1.43.1)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes

grpc/grpc-java ### [`v1.43.2`](https://togithub.com/grpc/grpc-java/releases/v1.43.2) [Compare Source](https://togithub.com/grpc/grpc-java/compare/v1.43.1...v1.43.2) ##### Dependencies - Upgraded Protobuf to 3.19.2 to avoid CVE-2021-22569. See the [protobuf advisory](https://togithub.com/protocolbuffers/protobuf/security/advisories/GHSA-wrvw-hg22-4m67)
--- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-core). --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index b2b36650c9..53754ae366 100644 --- a/pom.xml +++ b/pom.xml @@ -159,7 +159,7 @@ 1.33.0 1.41.0 22.0.0 - 1.43.1 + 1.43.2 3.19.3 0.30.0 1.3.2 From 3273b1ed0b1db610790e7832a6c92797a341cc7d Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 24 Jan 2022 21:26:24 +0100 Subject: [PATCH 15/29] deps: update dependency com.google.auth:google-auth-library-bom to v1.4.0 (#681) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.auth:google-auth-library-bom](https://togithub.com/googleapis/google-auth-library-java) | `1.3.0` -> `1.4.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.auth:google-auth-library-bom/1.4.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.auth:google-auth-library-bom/1.4.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.auth:google-auth-library-bom/1.4.0/compatibility-slim/1.3.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.auth:google-auth-library-bom/1.4.0/confidence-slim/1.3.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/google-auth-library-java ### [`v1.4.0`](https://togithub.com/googleapis/google-auth-library-java/blob/HEAD/CHANGELOG.md#​140-httpsgithubcomgoogleapisgoogle-auth-library-javacomparev130v140-2022-01-19) [Compare Source](https://togithub.com/googleapis/google-auth-library-java/compare/v1.3.0...v1.4.0) ##### Features - setting the audience to always point to google token endpoint ([#​833](https://togithub.com/googleapis/google-auth-library-java/issues/833)) ([33bfe7a](https://togithub.com/googleapis/google-auth-library-java/commit/33bfe7a788a524324cd9b0a54acc8917f6b75556)) ##### Bug Fixes - (WIF) remove erroneous check for the subject token field name for text credential source ([#​822](https://togithub.com/googleapis/google-auth-library-java/issues/822)) ([6d35c68](https://togithub.com/googleapis/google-auth-library-java/commit/6d35c681cf397ff2a90363184e26ee5850294c41)) - **java:** add -ntp flag to native image testing command ([#​1299](https://togithub.com/googleapis/google-auth-library-java/issues/1299)) ([#​807](https://togithub.com/googleapis/google-auth-library-java/issues/807)) ([aa6654a](https://togithub.com/googleapis/google-auth-library-java/commit/aa6654a639ea15bcce7c7a6e86f170b1345895f0)) - **java:** run Maven in plain console-friendly mode ([#​1301](https://togithub.com/googleapis/google-auth-library-java/issues/1301)) ([#​818](https://togithub.com/googleapis/google-auth-library-java/issues/818)) ([4df45d0](https://togithub.com/googleapis/google-auth-library-java/commit/4df45d0d03a973f1beff43d8965c26289f217f22))
--- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-core). --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 53754ae366..e7969145ca 100644 --- a/pom.xml +++ b/pom.xml @@ -155,7 +155,7 @@ 2.1.2 2.7.1 1.2.1 - 1.3.0 + 1.4.0 1.33.0 1.41.0 22.0.0 From 45cb7535151cfcffa282b4c8d9cd56265cca2ece Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 24 Jan 2022 21:26:28 +0100 Subject: [PATCH 16/29] deps: update dependency com.google.http-client:google-http-client-bom to v1.41.1 (#683) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.http-client:google-http-client-bom](https://togithub.com/googleapis/google-http-java-client) | `1.41.0` -> `1.41.1` | [![age](https://badges.renovateapi.com/packages/maven/com.google.http-client:google-http-client-bom/1.41.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.http-client:google-http-client-bom/1.41.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.http-client:google-http-client-bom/1.41.1/compatibility-slim/1.41.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.http-client:google-http-client-bom/1.41.1/confidence-slim/1.41.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/google-http-java-client ### [`v1.41.1`](https://togithub.com/googleapis/google-http-java-client/blob/HEAD/CHANGELOG.md#​1411-httpsgithubcomgoogleapisgoogle-http-java-clientcomparev1410v1411-2022-01-21) [Compare Source](https://togithub.com/googleapis/google-http-java-client/compare/v1.41.0...v1.41.1)
--- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-core). --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index e7969145ca..3510300613 100644 --- a/pom.xml +++ b/pom.xml @@ -157,7 +157,7 @@ 1.2.1 1.4.0 1.33.0 - 1.41.0 + 1.41.1 22.0.0 1.43.2 3.19.3 From 39ef9af8ddd95180a95ab58b95b355fb675a2c49 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 24 Jan 2022 21:34:15 +0100 Subject: [PATCH 17/29] build(deps): update dependency com.google.cloud:google-cloud-shared-config to v1.2.6 (#682) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-shared-config](https://togithub.com/googleapis/java-shared-config) | `1.2.5` -> `1.2.6` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-config/1.2.6/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-config/1.2.6/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-config/1.2.6/compatibility-slim/1.2.5)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-config/1.2.6/confidence-slim/1.2.5)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/java-shared-config ### [`v1.2.6`](https://togithub.com/googleapis/java-shared-config/blob/HEAD/CHANGELOG.md#​126-httpsgithubcomgoogleapisjava-shared-configcomparev125v126-2022-01-19) [Compare Source](https://togithub.com/googleapis/java-shared-config/compare/v1.2.5...v1.2.6)
--- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-core). --- google-cloud-core-bom/pom.xml | 2 +- pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/google-cloud-core-bom/pom.xml b/google-cloud-core-bom/pom.xml index 2b72ab863b..0bbabd1a64 100644 --- a/google-cloud-core-bom/pom.xml +++ b/google-cloud-core-bom/pom.xml @@ -8,7 +8,7 @@ com.google.cloud google-cloud-shared-config - 1.2.5 + 1.2.6 Google Cloud Core diff --git a/pom.xml b/pom.xml index 3510300613..8df9e82cbb 100644 --- a/pom.xml +++ b/pom.xml @@ -14,7 +14,7 @@ com.google.cloud google-cloud-shared-config - 1.2.5 + 1.2.6 From 9ff47e68d0c435d7636d89b03369aabbdfe3663b Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 24 Jan 2022 22:30:19 +0100 Subject: [PATCH 18/29] deps: update dependency com.google.api-client:google-api-client-bom to v1.33.1 (#684) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.api-client:google-api-client-bom](https://togithub.com/googleapis/google-api-java-client) | `1.33.0` -> `1.33.1` | [![age](https://badges.renovateapi.com/packages/maven/com.google.api-client:google-api-client-bom/1.33.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.api-client:google-api-client-bom/1.33.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.api-client:google-api-client-bom/1.33.1/compatibility-slim/1.33.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.api-client:google-api-client-bom/1.33.1/confidence-slim/1.33.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/google-api-java-client ### [`v1.33.1`](https://togithub.com/googleapis/google-api-java-client/blob/HEAD/CHANGELOG.md#​1331-httpsgithubcomgoogleapisgoogle-api-java-clientcomparev1330v1331-2022-01-21) [Compare Source](https://togithub.com/googleapis/google-api-java-client/compare/v1.33.0...v1.33.1)
--- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-core). --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 8df9e82cbb..c6874784a3 100644 --- a/pom.xml +++ b/pom.xml @@ -156,7 +156,7 @@ 2.7.1 1.2.1 1.4.0 - 1.33.0 + 1.33.1 1.41.1 22.0.0 1.43.2 From eb3aba2455a0ab6ffec2c6beb3f3cbb4bcb6008d Mon Sep 17 00:00:00 2001 From: Mridula <66699525+mpeddada1@users.noreply.github.com> Date: Tue, 25 Jan 2022 10:45:20 -0500 Subject: [PATCH 19/29] fix(java): initialize LoggerFactory at build time (#685) --- .../com.google.cloud/google-cloud-core/native-image.properties | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/native-image-support/src/main/resources/META-INF/native-image/com.google.cloud/google-cloud-core/native-image.properties b/native-image-support/src/main/resources/META-INF/native-image/com.google.cloud/google-cloud-core/native-image.properties index aa61561066..a9171de6a2 100644 --- a/native-image-support/src/main/resources/META-INF/native-image/com.google.cloud/google-cloud-core/native-image.properties +++ b/native-image-support/src/main/resources/META-INF/native-image/com.google.cloud/google-cloud-core/native-image.properties @@ -1,6 +1,7 @@ Args = --allow-incomplete-classpath \ --enable-url-protocols=https,http \ ---initialize-at-build-time=org.conscrypt \ +--initialize-at-build-time=org.conscrypt,\ + org.slf4j.LoggerFactory \ --initialize-at-run-time=io.grpc.netty.shaded.io.netty.handler.ssl.OpenSsl,\ io.grpc.netty.shaded.io.netty.internal.tcnative.SSL,\ io.grpc.netty.shaded.io.netty.internal.tcnative.CertificateVerifier,\ From dc4d18de86695fddbcb9d221cc53fdca3faf09f5 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 26 Jan 2022 00:16:33 +0100 Subject: [PATCH 20/29] deps: update dependency com.google.errorprone:error_prone_annotations to v2.11.0 (#687) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.errorprone:error_prone_annotations](https://errorprone.info) ([source](https://togithub.com/google/error-prone)) | `2.10.0` -> `2.11.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.errorprone:error_prone_annotations/2.11.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.errorprone:error_prone_annotations/2.11.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.errorprone:error_prone_annotations/2.11.0/compatibility-slim/2.10.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.errorprone:error_prone_annotations/2.11.0/confidence-slim/2.10.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
google/error-prone ### [`v2.11.0`](https://togithub.com/google/error-prone/releases/v2.11.0) [Compare Source](https://togithub.com/google/error-prone/compare/v2.10.0...v2.11.0) Error Prone now requires JDK 11 or newer ([https://github.com/google/error-prone/issues/2730](https://togithub.com/google/error-prone/issues/2730)). New checks - [`AutoValueBuilderDefaultsInConstructor`](http://errorprone.info/bugpattern/AutoValueBuilderDefaultsInConstructor) - [`FloggerLogString`](http://errorprone.info/bugpattern/FloggerLogString) - [`UnicodeDirectionalityCharacters`](http://errorprone.info/bugpattern/UnicodeDirectionalityCharacters) - [`UnicodeInCode`](http://errorprone.info/bugpattern/UnicodeInCode) - [`AlreadyChecked`](http://errorprone.info/bugpattern/AlreadyChecked) - [`BugPatternNaming`](http://errorprone.info/bugpattern/BugPatternNaming) - [`MissingImplementsComparable`](http://errorprone.info/bugpattern/MissingImplementsComparable) - [`NegativeCharLiteral`](http://errorprone.info/bugpattern/NegativeCharLiteral) - [`PreferredInterfaceType`](http://errorprone.info/bugpattern/PreferredInterfaceType) - [`StronglyTypeByteString`](http://errorprone.info/bugpattern/StronglyTypeByteString) - [`UsingJsr305CheckReturnValue`](http://errorprone.info/bugpattern/UsingJsr305CheckReturnValue) Fixed issues: [#​2641](https://togithub.com/google/error-prone/issues/2641), [#​2705](https://togithub.com/google/error-prone/issues/2705), [#​2776](https://togithub.com/google/error-prone/issues/2776), [#​2798](https://togithub.com/google/error-prone/issues/2798), [#​2799](https://togithub.com/google/error-prone/issues/2799), [#​2819](https://togithub.com/google/error-prone/issues/2819), [#​2820](https://togithub.com/google/error-prone/issues/2820), [#​2831](https://togithub.com/google/error-prone/issues/2831), [#​2833](https://togithub.com/google/error-prone/issues/2833), [#​2834](https://togithub.com/google/error-prone/issues/2834), [#​2835](https://togithub.com/google/error-prone/issues/2835), [#​2861](https://togithub.com/google/error-prone/issues/2861), [#​2873](https://togithub.com/google/error-prone/issues/2873), [#​2889](https://togithub.com/google/error-prone/issues/2889), [#​2892](https://togithub.com/google/error-prone/issues/2892), [#​2901](https://togithub.com/google/error-prone/issues/2901) **Full Changelog**: https://github.com/google/error-prone/compare/v2.10.0...v2.11.0
--- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-core). --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index c6874784a3..6d02ab5687 100644 --- a/pom.xml +++ b/pom.xml @@ -170,7 +170,7 @@ 3.0.2 1.5.2 3.2 - 2.10.0 + 2.11.0 2.8.9
From 780b734bb4f26fab49065f303d102033b2c3a3d0 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 26 Jan 2022 19:21:37 +0100 Subject: [PATCH 21/29] deps: update graalvm.version to v22.0.0.2 (#691) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 6d02ab5687..b163a1fd79 100644 --- a/pom.xml +++ b/pom.xml @@ -158,7 +158,7 @@ 1.4.0 1.33.1 1.41.1 - 22.0.0 + 22.0.0.2 1.43.2 3.19.3 0.30.0 From eb462c7b1a005ce37d1be58900a244f6b807e5d5 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 27 Jan 2022 21:17:51 -0500 Subject: [PATCH 22/29] deps(java): update actions/github-script action to v5 (#1339) (#689) Source-Link: https://github.com/googleapis/synthtool/commit/466412a75d636d69bcf8a42d9a5f956e73ac421d Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:7062473f423f339256346ddbee3d81fb1de6b784fabc2a4d959d7df2c720e375 Co-authored-by: Owl Bot --- .github/.OwlBot.lock.yaml | 15 ++++++++++++++- .github/workflows/approve-readme.yaml | 2 +- .github/workflows/auto-release.yaml | 2 +- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index dddb13b845..be3b9bde4f 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -1,3 +1,16 @@ +# 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. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest - digest: sha256:7f737996c88586c499f7b0c25294c760f9f5eec092289a0e08d2d3f42a069ebb + digest: sha256:7062473f423f339256346ddbee3d81fb1de6b784fabc2a4d959d7df2c720e375 diff --git a/.github/workflows/approve-readme.yaml b/.github/workflows/approve-readme.yaml index 7513acaebc..c513242798 100644 --- a/.github/workflows/approve-readme.yaml +++ b/.github/workflows/approve-readme.yaml @@ -6,7 +6,7 @@ jobs: runs-on: ubuntu-latest if: github.repository_owner == 'googleapis' && github.head_ref == 'autosynth-readme' steps: - - uses: actions/github-script@v3 + - uses: actions/github-script@v5 with: github-token: ${{secrets.YOSHI_APPROVER_TOKEN}} script: | diff --git a/.github/workflows/auto-release.yaml b/.github/workflows/auto-release.yaml index 9b4fd4d834..59c7cadde3 100644 --- a/.github/workflows/auto-release.yaml +++ b/.github/workflows/auto-release.yaml @@ -6,7 +6,7 @@ jobs: runs-on: ubuntu-latest if: contains(github.head_ref, 'release-please') steps: - - uses: actions/github-script@v3 + - uses: actions/github-script@v5 with: github-token: ${{secrets.YOSHI_APPROVER_TOKEN}} debug: true From bdf7d4ec05c5314e5f2667287ed3e7cb83667c35 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 28 Jan 2022 03:18:13 +0100 Subject: [PATCH 23/29] deps: update opencensus.version to v0.31.0 (#692) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index b163a1fd79..549a3cc320 100644 --- a/pom.xml +++ b/pom.xml @@ -161,7 +161,7 @@ 22.0.0.2 1.43.2 3.19.3 - 0.30.0 + 0.31.0 1.3.2 31.0.1-jre 4.13.2 From ed850455995fc5b5c2dae3595116721316f63698 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 28 Jan 2022 03:18:25 +0100 Subject: [PATCH 24/29] deps: update dependency io.grpc:grpc-bom to v1.44.0 (#693) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 549a3cc320..464c351c03 100644 --- a/pom.xml +++ b/pom.xml @@ -159,7 +159,7 @@ 1.33.1 1.41.1 22.0.0.2 - 1.43.2 + 1.44.0 3.19.3 0.31.0 1.3.2 From 1085d2cb1d7e8391f981d1f4b97c7724b0107e94 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 28 Jan 2022 03:18:38 +0100 Subject: [PATCH 25/29] deps: update dependency com.google.api.grpc:proto-google-common-protos to v2.7.2 (#695) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 464c351c03..a84e1fc0d9 100644 --- a/pom.xml +++ b/pom.xml @@ -153,7 +153,7 @@ google-cloud-core-parent 2.8.1 2.1.2 - 2.7.1 + 2.7.2 1.2.1 1.4.0 1.33.1 From f4875c0deecfea3728925e5ee0ef95ee90852301 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 28 Jan 2022 16:19:28 +0100 Subject: [PATCH 26/29] deps: update dependency com.google.http-client:google-http-client-bom to v1.41.2 (#696) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index a84e1fc0d9..e3e3841c35 100644 --- a/pom.xml +++ b/pom.xml @@ -157,7 +157,7 @@ 1.2.1 1.4.0 1.33.1 - 1.41.1 + 1.41.2 22.0.0.2 1.44.0 3.19.3 From 684ae805b8d25747830ce9266fd51a287c018cc9 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 28 Jan 2022 16:35:51 +0100 Subject: [PATCH 27/29] deps: update dependency com.google.api:api-common to v2.1.3 (#694) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index e3e3841c35..1edbd60959 100644 --- a/pom.xml +++ b/pom.xml @@ -152,7 +152,7 @@ github google-cloud-core-parent 2.8.1 - 2.1.2 + 2.1.3 2.7.2 1.2.1 1.4.0 From 1a578bdee2fa229ffbdd8fdde3d66d7e29dedf98 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 28 Jan 2022 16:42:32 +0100 Subject: [PATCH 28/29] deps: update dependency com.google.api:gax-bom to v2.11.0 (#677) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.api:gax-bom](https://togithub.com/googleapis/gax-java) | `2.8.1` -> `2.11.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.api:gax-bom/2.11.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.api:gax-bom/2.11.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.api:gax-bom/2.11.0/compatibility-slim/2.8.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.api:gax-bom/2.11.0/confidence-slim/2.8.1)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/gax-java ### [`v2.11.0`](https://togithub.com/googleapis/gax-java/blob/HEAD/CHANGELOG.md#​2110-httpsgithubcomgoogleapisgax-javacomparev2100v2110-2022-01-27) [Compare Source](https://togithub.com/googleapis/gax-java/compare/v2.10.0...v2.11.0) ##### Features - Add a builder to handle the common logic of extracting routing header values from request ([#​1598](https://togithub.com/googleapis/gax-java/issues/1598)) ([2836baa](https://togithub.com/googleapis/gax-java/commit/2836baafa1114761cffbfdd4aee2322a4a931f8f)) ##### Dependencies - update dependency com_google_protobuf to 3.19.3 ([734906e](https://togithub.com/googleapis/gax-java/commit/734906efd15064ea0d36b308f217508c9bf5ed42)) - update dependency com.google.api:api-common to 2.1.3 ([734906e](https://togithub.com/googleapis/gax-java/commit/734906efd15064ea0d36b308f217508c9bf5ed42)) - update dependency com.google.api.grpc:grpc-google-common-protos to 2.7.2 ([734906e](https://togithub.com/googleapis/gax-java/commit/734906efd15064ea0d36b308f217508c9bf5ed42)) - update dependency com.google.api.grpc:proto-google-common-protos to 2.7.2 ([734906e](https://togithub.com/googleapis/gax-java/commit/734906efd15064ea0d36b308f217508c9bf5ed42)) - update dependency com.google.errorprone:error_prone_annotations to v2.11.0 ([734906e](https://togithub.com/googleapis/gax-java/commit/734906efd15064ea0d36b308f217508c9bf5ed42)) - update dependency com.google.http-client:google-http-client to 1.41.2 ([734906e](https://togithub.com/googleapis/gax-java/commit/734906efd15064ea0d36b308f217508c9bf5ed42)) - update dependency com.google.http-client:google-http-client-gson to 1.41.2 ([734906e](https://togithub.com/googleapis/gax-java/commit/734906efd15064ea0d36b308f217508c9bf5ed42)) - update dependency io_grpc to 1.44.0 ([#​1610](https://togithub.com/googleapis/gax-java/issues/1610)) ([734906e](https://togithub.com/googleapis/gax-java/commit/734906efd15064ea0d36b308f217508c9bf5ed42)) ### [`v2.10.0`](https://togithub.com/googleapis/gax-java/blob/HEAD/CHANGELOG.md#​2100-httpsgithubcomgoogleapisgax-javacomparev290v2100-2022-01-21) [Compare Source](https://togithub.com/googleapis/gax-java/compare/v2.9.0...v2.10.0) ##### Features - add api key support ([#​1436](https://togithub.com/googleapis/gax-java/issues/1436)) ([5081ec6](https://togithub.com/googleapis/gax-java/commit/5081ec6541da8ca3f5a4c0d20aa75bd20010a642)) - introduce HttpJsonClientCall, Listeners infrastructure and ServerStreaming support in REST transport ([#​1599](https://togithub.com/googleapis/gax-java/issues/1599)) ([3c97529](https://togithub.com/googleapis/gax-java/commit/3c97529b8bd0e8141c5d722f887cb7ae1ed30b69)) ### [`v2.9.0`](https://togithub.com/googleapis/gax-java/blob/HEAD/CHANGELOG.md#​290-httpsgithubcomgoogleapisgax-javacomparev281v290-2022-01-14) [Compare Source](https://togithub.com/googleapis/gax-java/compare/v2.8.1...v2.9.0) ##### Features - pass a CallCredentials to grpc-java for DirectPath ([#​1488](https://togithub.com/googleapis/gax-java/issues/1488)) ([4a7713a](https://togithub.com/googleapis/gax-java/commit/4a7713ad683e70380087437d6b52cbe3e115d1fb)) ##### [2.8.1](https://www.github.com/googleapis/gax-java/compare/v2.8.0...v2.8.1) (2022-01-06) ##### Dependencies - update dependency com.google.api:api-common to 2.1.2 ([#​1590](https://www.togithub.com/googleapis/gax-java/issues/1590)) ([1b34870](https://www.github.com/googleapis/gax-java/commit/1b34870358a26bd4542594b6c746dca190f65d24)) - update dependency com.google.auto.value:auto-value to v1.9 ([1b34870](https://www.github.com/googleapis/gax-java/commit/1b34870358a26bd4542594b6c746dca190f65d24))
--- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-core). --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 1edbd60959..71c5160580 100644 --- a/pom.xml +++ b/pom.xml @@ -151,7 +151,7 @@ UTF-8 github google-cloud-core-parent - 2.8.1 + 2.11.0 2.1.3 2.7.2 1.2.1 From 0fd1f2982dbc81f449ea530758fcc6064e9bdd0a Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 28 Jan 2022 10:58:28 -0500 Subject: [PATCH 29/29] chore(main): release 2.4.0 (#678) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- CHANGELOG.md | 35 ++++++++++++++++++++++++++++++++++ google-cloud-core-bom/pom.xml | 10 +++++----- google-cloud-core-grpc/pom.xml | 4 ++-- google-cloud-core-http/pom.xml | 4 ++-- google-cloud-core/pom.xml | 4 ++-- native-image-support/pom.xml | 4 ++-- pom.xml | 2 +- versions.txt | 4 ++-- 8 files changed, 51 insertions(+), 16 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 648155126e..12c336670e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,40 @@ # Changelog +## [2.4.0](https://github.com/googleapis/java-core/compare/v2.3.5...v2.4.0) (2022-01-28) + + +### Features + +* **java:** Add native-image support classes to java-core module ([#637](https://github.com/googleapis/java-core/issues/637)) ([154bc18](https://github.com/googleapis/java-core/commit/154bc18ba86328d29665c502db1d35e265c92bbf)) + + +### Bug Fixes + +* **java:** initialize LoggerFactory at build time ([#685](https://github.com/googleapis/java-core/issues/685)) ([eb3aba2](https://github.com/googleapis/java-core/commit/eb3aba2455a0ab6ffec2c6beb3f3cbb4bcb6008d)) + + +### Dependencies + +* **java:** update actions/github-script action to v5 ([#1339](https://github.com/googleapis/java-core/issues/1339)) ([#689](https://github.com/googleapis/java-core/issues/689)) ([eb462c7](https://github.com/googleapis/java-core/commit/eb462c7b1a005ce37d1be58900a244f6b807e5d5)) +* update dependency com.google.api-client:google-api-client-bom to v1.33.1 ([#684](https://github.com/googleapis/java-core/issues/684)) ([9ff47e6](https://github.com/googleapis/java-core/commit/9ff47e68d0c435d7636d89b03369aabbdfe3663b)) +* update dependency com.google.api:api-common to v2.1.3 ([#694](https://github.com/googleapis/java-core/issues/694)) ([684ae80](https://github.com/googleapis/java-core/commit/684ae805b8d25747830ce9266fd51a287c018cc9)) +* update dependency com.google.api:gax-bom to v2.11.0 ([#677](https://github.com/googleapis/java-core/issues/677)) ([1a578bd](https://github.com/googleapis/java-core/commit/1a578bdee2fa229ffbdd8fdde3d66d7e29dedf98)) +* update dependency com.google.api.grpc:proto-google-common-protos to v2.7.2 ([#695](https://github.com/googleapis/java-core/issues/695)) ([1085d2c](https://github.com/googleapis/java-core/commit/1085d2cb1d7e8391f981d1f4b97c7724b0107e94)) +* update dependency com.google.api.grpc:proto-google-iam-v1 to v1.2.1 ([#667](https://github.com/googleapis/java-core/issues/667)) ([b57ec04](https://github.com/googleapis/java-core/commit/b57ec047234a1a044458980a8cf7de6a3156bf41)) +* update dependency com.google.auth:google-auth-library-bom to v1.4.0 ([#681](https://github.com/googleapis/java-core/issues/681)) ([3273b1e](https://github.com/googleapis/java-core/commit/3273b1ed0b1db610790e7832a6c92797a341cc7d)) +* update dependency com.google.errorprone:error_prone_annotations to v2.11.0 ([#687](https://github.com/googleapis/java-core/issues/687)) ([dc4d18d](https://github.com/googleapis/java-core/commit/dc4d18de86695fddbcb9d221cc53fdca3faf09f5)) +* update dependency com.google.http-client:google-http-client-bom to v1.41.1 ([#683](https://github.com/googleapis/java-core/issues/683)) ([45cb753](https://github.com/googleapis/java-core/commit/45cb7535151cfcffa282b4c8d9cd56265cca2ece)) +* update dependency com.google.http-client:google-http-client-bom to v1.41.2 ([#696](https://github.com/googleapis/java-core/issues/696)) ([f4875c0](https://github.com/googleapis/java-core/commit/f4875c0deecfea3728925e5ee0ef95ee90852301)) +* update dependency com.google.protobuf:protobuf-bom to v3.19.3 ([#674](https://github.com/googleapis/java-core/issues/674)) ([c54f997](https://github.com/googleapis/java-core/commit/c54f9973b71c91c1fde0a1d128957cd022a27902)) +* update dependency io.grpc:grpc-bom to v1.43.2 ([#665](https://github.com/googleapis/java-core/issues/665)) ([752ba6e](https://github.com/googleapis/java-core/commit/752ba6e384c382d0e39d8335640eaaea2beee9e1)) +* update dependency io.grpc:grpc-bom to v1.44.0 ([#693](https://github.com/googleapis/java-core/issues/693)) ([ed85045](https://github.com/googleapis/java-core/commit/ed850455995fc5b5c2dae3595116721316f63698)) +* update dependency org.easymock:easymock to v4 ([#668](https://github.com/googleapis/java-core/issues/668)) ([c36e976](https://github.com/googleapis/java-core/commit/c36e976c0379c1119dfe643dc3131f2e52130c5c)) +* update dependency org.graalvm.sdk:graal-sdk to v22 ([#680](https://github.com/googleapis/java-core/issues/680)) ([0f535f8](https://github.com/googleapis/java-core/commit/0f535f869f7ce68192f821d0f3361634676dddf7)) +* update graalvm.version to v21.3.1 ([#679](https://github.com/googleapis/java-core/issues/679)) ([dfb305a](https://github.com/googleapis/java-core/commit/dfb305acaf9d6db91727e42509fc6b043f07a5ce)) +* update graalvm.version to v22.0.0.2 ([#691](https://github.com/googleapis/java-core/issues/691)) ([780b734](https://github.com/googleapis/java-core/commit/780b734bb4f26fab49065f303d102033b2c3a3d0)) +* update opencensus.version to v0.30.0 ([#646](https://github.com/googleapis/java-core/issues/646)) ([c2caaa7](https://github.com/googleapis/java-core/commit/c2caaa7cb2c094318e611ba2c082a8a31fee21ea)) +* update opencensus.version to v0.31.0 ([#692](https://github.com/googleapis/java-core/issues/692)) ([bdf7d4e](https://github.com/googleapis/java-core/commit/bdf7d4ec05c5314e5f2667287ed3e7cb83667c35)) + ### [2.3.5](https://www.github.com/googleapis/java-core/compare/v2.3.4...v2.3.5) (2022-01-06) diff --git a/google-cloud-core-bom/pom.xml b/google-cloud-core-bom/pom.xml index 0bbabd1a64..22aa79f5b4 100644 --- a/google-cloud-core-bom/pom.xml +++ b/google-cloud-core-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-core-bom - 2.3.6-SNAPSHOT + 2.4.0 pom com.google.cloud @@ -63,22 +63,22 @@ com.google.cloud google-cloud-core - 2.3.6-SNAPSHOT + 2.4.0 com.google.cloud google-cloud-core-grpc - 2.3.6-SNAPSHOT + 2.4.0 com.google.cloud google-cloud-core-http - 2.3.6-SNAPSHOT + 2.4.0 com.google.cloud native-image-support - 0.11.0-SNAPSHOT + 0.11.0 diff --git a/google-cloud-core-grpc/pom.xml b/google-cloud-core-grpc/pom.xml index b661f5a410..49fa672e5c 100644 --- a/google-cloud-core-grpc/pom.xml +++ b/google-cloud-core-grpc/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-core-grpc - 2.3.6-SNAPSHOT + 2.4.0 jar Google Cloud Core gRPC https://github.com/googleapis/java-core @@ -13,7 +13,7 @@ com.google.cloud google-cloud-core-parent - 2.3.6-SNAPSHOT + 2.4.0 google-cloud-core-grpc diff --git a/google-cloud-core-http/pom.xml b/google-cloud-core-http/pom.xml index 33708af95d..f16bcfa261 100644 --- a/google-cloud-core-http/pom.xml +++ b/google-cloud-core-http/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-core-http - 2.3.6-SNAPSHOT + 2.4.0 jar Google Cloud Core HTTP https://github.com/googleapis/java-core @@ -13,7 +13,7 @@ com.google.cloud google-cloud-core-parent - 2.3.6-SNAPSHOT + 2.4.0 google-cloud-core-http diff --git a/google-cloud-core/pom.xml b/google-cloud-core/pom.xml index fa2fc66721..4b23fd7de3 100644 --- a/google-cloud-core/pom.xml +++ b/google-cloud-core/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-core - 2.3.6-SNAPSHOT + 2.4.0 jar Google Cloud Core https://github.com/googleapis/java-core @@ -13,7 +13,7 @@ com.google.cloud google-cloud-core-parent - 2.3.6-SNAPSHOT + 2.4.0 google-cloud-core diff --git a/native-image-support/pom.xml b/native-image-support/pom.xml index fb74248dcb..cb707d1f8d 100644 --- a/native-image-support/pom.xml +++ b/native-image-support/pom.xml @@ -7,13 +7,13 @@ Google Cloud Native Image Support com.google.cloud native-image-support - 0.11.0-SNAPSHOT + 0.11.0 jar google-cloud-core-parent com.google.cloud - 2.3.6-SNAPSHOT + 2.4.0 diff --git a/pom.xml b/pom.xml index 71c5160580..f53bbab823 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-core-parent pom - 2.3.6-SNAPSHOT + 2.4.0 Google Cloud Core Parent https://github.com/googleapis/java-core diff --git a/versions.txt b/versions.txt index 4cd1c2e1fd..7932de9289 100644 --- a/versions.txt +++ b/versions.txt @@ -1,5 +1,5 @@ # Format: # module:released-version:current-version -google-cloud-core:2.3.5:2.3.6-SNAPSHOT -native-image-support:0.10.0:0.11.0-SNAPSHOT \ No newline at end of file +google-cloud-core:2.4.0:2.4.0 +native-image-support:0.11.0:0.11.0 \ No newline at end of file