Skip to content

Commit 46a0db8

Browse files
committed
Re-apply "Upgrade to latest GCS SDK (elastic#124062)"
1 parent 28dd8e1 commit 46a0db8

20 files changed

+294
-105
lines changed

docs/changelog/124062.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 124062
2+
summary: Upgrade to repository-gcs to use com.google.cloud:google-cloud-storage-bom:2.50.0
3+
area: Snapshot/Restore
4+
type: upgrade
5+
issues: []

gradle/verification-metadata.xml

Lines changed: 120 additions & 15 deletions
Large diffs are not rendered by default.

modules/repository-gcs/build.gradle

Lines changed: 86 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -18,40 +18,44 @@ apply plugin: 'elasticsearch.internal-cluster-test'
1818

1919
esplugin {
2020
description = 'The GCS repository plugin adds Google Cloud Storage support for repositories.'
21-
classname ='org.elasticsearch.repositories.gcs.GoogleCloudStoragePlugin'
21+
classname = 'org.elasticsearch.repositories.gcs.GoogleCloudStoragePlugin'
2222
}
2323

2424
dependencies {
25-
api 'com.google.cloud:google-cloud-storage:2.13.1'
26-
api 'com.google.cloud:google-cloud-core:2.8.28'
27-
api 'com.google.cloud:google-cloud-core-http:2.8.28'
28-
runtimeOnly 'com.google.guava:guava:32.0.1-jre'
29-
runtimeOnly 'com.google.guava:failureaccess:1.0.1'
30-
api "commons-logging:commons-logging:${versions.commonslogging}"
31-
api "org.apache.logging.log4j:log4j-1.2-api:${versions.log4j}"
32-
api "commons-codec:commons-codec:${versions.commonscodec}"
33-
api 'com.google.api:api-common:2.3.1'
34-
api 'com.google.api:gax:2.20.1'
35-
api 'org.threeten:threetenbp:1.6.5'
36-
api "com.google.protobuf:protobuf-java-util:${versions.protobuf}"
37-
api "com.google.protobuf:protobuf-java:${versions.protobuf}"
38-
api 'com.google.code.gson:gson:2.10'
39-
api 'com.google.api.grpc:proto-google-common-protos:2.9.6'
40-
api 'com.google.api.grpc:proto-google-iam-v1:1.6.2'
41-
api 'com.google.auth:google-auth-library-credentials:1.11.0'
42-
api 'com.google.auth:google-auth-library-oauth2-http:1.11.0'
43-
api "com.google.oauth-client:google-oauth-client:${versions.google_oauth_client}"
44-
api 'com.google.api-client:google-api-client:2.1.1'
45-
api 'com.google.http-client:google-http-client:1.42.3'
46-
api 'com.google.http-client:google-http-client-gson:1.42.3'
47-
api 'com.google.http-client:google-http-client-appengine:1.42.3'
48-
api 'com.google.http-client:google-http-client-jackson2:1.42.3'
49-
api "com.fasterxml.jackson.core:jackson-core:${versions.jackson}"
50-
api 'com.google.api:gax-httpjson:0.105.1'
51-
api 'io.grpc:grpc-context:1.49.2'
52-
api 'io.opencensus:opencensus-api:0.31.1'
53-
api 'io.opencensus:opencensus-contrib-http-util:0.31.1'
54-
api 'com.google.apis:google-api-services-storage:v1-rev20220705-2.0.0'
25+
// dependencies consistent with 'com.google.cloud:google-cloud-storage-bom:2.50.0'
26+
implementation 'com.google.cloud:google-cloud-storage:2.50.0'
27+
implementation 'com.google.cloud:google-cloud-core:2.53.1'
28+
implementation 'com.google.cloud:google-cloud-core-http:2.53.1'
29+
runtimeOnly 'com.google.guava:guava:33.4.0-jre'
30+
runtimeOnly 'com.google.guava:failureaccess:1.0.2'
31+
runtimeOnly "org.slf4j:slf4j-api:${versions.slf4j}" // 2.0.16 in bom
32+
runtimeOnly "commons-codec:commons-codec:${versions.commonscodec}" // 1.18.0 in bom
33+
implementation 'com.google.api:api-common:2.46.1'
34+
implementation 'com.google.api:gax:2.63.1'
35+
implementation 'org.threeten:threetenbp:1.7.0'
36+
runtimeOnly "com.google.protobuf:protobuf-java-util:${versions.protobuf}" // 3.25.5 in bom
37+
runtimeOnly "com.google.protobuf:protobuf-java:${versions.protobuf}"
38+
runtimeOnly 'com.google.code.gson:gson:2.12.1'
39+
runtimeOnly 'com.google.api.grpc:proto-google-common-protos:2.54.1'
40+
runtimeOnly 'com.google.api.grpc:proto-google-iam-v1:1.49.1'
41+
implementation 'com.google.auth:google-auth-library-credentials:1.33.1'
42+
implementation 'com.google.auth:google-auth-library-oauth2-http:1.33.1'
43+
runtimeOnly "com.google.oauth-client:google-oauth-client:${versions.google_oauth_client}" // 1.37.0 in bom
44+
implementation 'com.google.api-client:google-api-client:2.7.2'
45+
implementation 'com.google.http-client:google-http-client:1.46.3'
46+
runtimeOnly 'com.google.http-client:google-http-client-gson:1.46.3'
47+
runtimeOnly 'com.google.http-client:google-http-client-appengine:1.46.3'
48+
runtimeOnly 'com.google.http-client:google-http-client-jackson2:1.46.3'
49+
runtimeOnly "com.fasterxml.jackson.core:jackson-core:${versions.jackson}" // 2.18.2 in bom
50+
runtimeOnly 'com.google.api:gax-httpjson:2.63.1'
51+
runtimeOnly 'io.opencensus:opencensus-api:0.31.1'
52+
runtimeOnly 'io.opencensus:opencensus-contrib-http-util:0.31.1'
53+
implementation 'com.google.apis:google-api-services-storage:v1-rev20250224-2.0.0'
54+
implementation 'org.checkerframework:checker-qual:3.49.0'
55+
runtimeOnly 'io.opentelemetry:opentelemetry-api:1.47.0'
56+
runtimeOnly 'io.opentelemetry:opentelemetry-context:1.47.0'
57+
runtimeOnly 'com.google.api.grpc:proto-google-cloud-storage-v2:2.50.0'
58+
runtimeOnly 'io.grpc:grpc-api:1.70.0'
5559

5660
testImplementation "org.apache.httpcomponents:httpclient:${versions.httpclient}"
5761
testImplementation "org.apache.httpcomponents:httpcore:${versions.httpcore}"
@@ -62,7 +66,7 @@ dependencies {
6266

6367
restResources {
6468
restApi {
65-
include '_common', 'cluster', 'nodes', 'snapshot','indices', 'index', 'bulk', 'count'
69+
include '_common', 'cluster', 'nodes', 'snapshot', 'indices', 'index', 'bulk', 'count'
6670
}
6771
}
6872

@@ -123,11 +127,6 @@ tasks.named("thirdPartyAudit").configure {
123127
'com.google.appengine.api.urlfetch.HTTPResponse',
124128
'com.google.appengine.api.urlfetch.URLFetchService',
125129
'com.google.appengine.api.urlfetch.URLFetchServiceFactory',
126-
// commons-logging optional dependencies
127-
'org.apache.avalon.framework.logger.Logger',
128-
'org.apache.log.Hierarchy',
129-
'org.apache.log.Logger',
130-
'javax.jms.Message',
131130

132131
// optional apache http client dependencies
133132
'org.apache.http.ConnectionReuseStrategy',
@@ -171,19 +170,59 @@ tasks.named("thirdPartyAudit").configure {
171170
'org.apache.http.protocol.HttpProcessor',
172171
'org.apache.http.protocol.HttpRequestExecutor',
173172

174-
// commons-logging provided dependencies
175-
'javax.servlet.ServletContextEvent',
176-
'javax.servlet.ServletContextListener'
173+
// grpc/proto stuff
174+
'com.google.api.gax.grpc.GrpcCallContext',
175+
'com.google.api.gax.grpc.GrpcCallSettings',
176+
'com.google.api.gax.grpc.GrpcCallSettings$Builder',
177+
'com.google.api.gax.grpc.GrpcInterceptorProvider',
178+
'com.google.api.gax.grpc.GrpcStatusCode',
179+
'com.google.api.gax.grpc.GrpcStubCallableFactory',
180+
'com.google.api.gax.grpc.InstantiatingGrpcChannelProvider',
181+
'com.google.api.gax.grpc.InstantiatingGrpcChannelProvider$Builder',
182+
'com.google.cloud.grpc.GrpcTransportOptions',
183+
'com.google.cloud.grpc.GrpcTransportOptions$Builder',
184+
'com.google.cloud.opentelemetry.metric.GoogleCloudMetricExporter',
185+
'com.google.cloud.opentelemetry.metric.MetricConfiguration',
186+
'com.google.cloud.opentelemetry.metric.MetricConfiguration$Builder',
187+
'com.google.storage.v2.StorageClient',
188+
'com.google.storage.v2.StorageClient$ListBucketsPagedResponse',
189+
'com.google.storage.v2.StorageSettings',
190+
'com.google.storage.v2.StorageSettings$Builder',
191+
'com.google.storage.v2.stub.GrpcStorageStub',
192+
'com.google.storage.v2.stub.StorageStubSettings',
193+
// opentelemetry implementation stuff
194+
'io.grpc.opentelemetry.GrpcOpenTelemetry',
195+
'io.grpc.opentelemetry.GrpcOpenTelemetry$Builder',
196+
'io.grpc.protobuf.ProtoUtils',
197+
'io.opentelemetry.contrib.gcp.resource.GCPResourceProvider',
198+
'io.opentelemetry.sdk.OpenTelemetrySdk',
199+
'io.opentelemetry.sdk.OpenTelemetrySdkBuilder',
200+
'io.opentelemetry.sdk.common.CompletableResultCode',
201+
'io.opentelemetry.sdk.common.export.MemoryMode',
202+
'io.opentelemetry.sdk.metrics.Aggregation',
203+
'io.opentelemetry.sdk.metrics.InstrumentSelector',
204+
'io.opentelemetry.sdk.metrics.InstrumentSelectorBuilder',
205+
'io.opentelemetry.sdk.metrics.InstrumentType',
206+
'io.opentelemetry.sdk.metrics.SdkMeterProvider',
207+
'io.opentelemetry.sdk.metrics.SdkMeterProviderBuilder',
208+
'io.opentelemetry.sdk.metrics.View',
209+
'io.opentelemetry.sdk.metrics.ViewBuilder',
210+
'io.opentelemetry.sdk.metrics.data.AggregationTemporality',
211+
'io.opentelemetry.sdk.metrics.export.DefaultAggregationSelector',
212+
'io.opentelemetry.sdk.metrics.export.MetricExporter',
213+
'io.opentelemetry.sdk.metrics.export.PeriodicMetricReader',
214+
'io.opentelemetry.sdk.metrics.export.PeriodicMetricReaderBuilder',
215+
'io.opentelemetry.sdk.resources.Resource',
177216
)
178217

179218

180-
if(buildParams.graalVmRuntime == false) {
219+
if (buildParams.graalVmRuntime == false) {
181220
ignoreMissingClasses(
182-
'org.graalvm.nativeimage.hosted.Feature',
183-
'org.graalvm.nativeimage.hosted.Feature$BeforeAnalysisAccess',
184-
'org.graalvm.nativeimage.hosted.Feature$DuringAnalysisAccess',
185-
'org.graalvm.nativeimage.hosted.Feature$FeatureAccess',
186-
'org.graalvm.nativeimage.hosted.RuntimeReflection'
221+
'org.graalvm.nativeimage.hosted.Feature',
222+
'org.graalvm.nativeimage.hosted.Feature$BeforeAnalysisAccess',
223+
'org.graalvm.nativeimage.hosted.Feature$DuringAnalysisAccess',
224+
'org.graalvm.nativeimage.hosted.Feature$FeatureAccess',
225+
'org.graalvm.nativeimage.hosted.RuntimeReflection'
187226
)
188227
}
189228
}
@@ -213,7 +252,7 @@ Map<String, Object> expansions = [
213252

214253
tasks.named("processYamlRestTestResources").configure {
215254
inputs.properties(expansions)
216-
filter("tokens" : expansions, ReplaceTokens.class)
255+
filter("tokens": expansions, ReplaceTokens.class)
217256
}
218257

219258
tasks.named("internalClusterTest").configure {
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
Checker Framework qualifiers
2+
Copyright 2004-present by the Checker Framework developers
3+
4+
MIT License:
5+
6+
Permission is hereby granted, free of charge, to any person obtaining a copy
7+
of this software and associated documentation files (the "Software"), to deal
8+
in the Software without restriction, including without limitation the rights
9+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10+
copies of the Software, and to permit persons to whom the Software is
11+
furnished to do so, subject to the following conditions:
12+
13+
The above copyright notice and this permission notice shall be included in
14+
all copies or substantial portions of the Software.
15+
16+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22+
THE SOFTWARE.

modules/repository-gcs/licenses/commons-logging-NOTICE.txt

Lines changed: 0 additions & 5 deletions
This file was deleted.

modules/repository-gcs/licenses/grpc-api-NOTICE.txt

Whitespace-only changes.

modules/repository-gcs/licenses/log4j-NOTICE.txt

Lines changed: 0 additions & 20 deletions
This file was deleted.

0 commit comments

Comments
 (0)