Skip to content

Commit

Permalink
Upgrade GCS SDK to 2.13.1 (elastic#92327)
Browse files Browse the repository at this point in the history
Upgrade to the latest version of the SDK that doesn't have known CVEs
and builds w/o complaining. Since 2.2.0 the automatic retry behaviour
has changed and the old behaviour can still be used as
LegacyStorageRetryStrategy. The default retry strategy would cause some
test failures, and therefore we'd need to explicitly set a retry
strategy.

Relates elastic#92474
  • Loading branch information
pxsalehi authored Dec 22, 2022
1 parent 0f97503 commit 8515535
Show file tree
Hide file tree
Showing 6 changed files with 119 additions and 67 deletions.
5 changes: 5 additions & 0 deletions docs/changelog/92327.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
pr: 92327
summary: Upgrade GCS SDK to 2.13.1
area: Snapshot/Restore
type: upgrade
issues: []
125 changes: 80 additions & 45 deletions gradle/verification-metadata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -429,74 +429,79 @@
<sha256 value="896280c8bd0a81a020272af6bfabd855810c4e4fd5ff5605e109f3bb3d2a30e3" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.google.api" name="api-common" version="2.2.1">
<artifact name="api-common-2.2.1.jar">
<sha256 value="197b23f2d22324a923e5d643d1c71c51442ae7b9b166fe6ecd5ad9b6916689b5" origin="Generated by Gradle"/>
<component group="com.google.api" name="api-common" version="2.3.1">
<artifact name="api-common-2.3.1.jar">
<sha256 value="9a8c0f3a638eac791496709b7770c39bda9e56de50728f122237c813bb21f1ee" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.google.api" name="gax" version="2.0.0">
<artifact name="gax-2.0.0.jar">
<sha256 value="37974e31bf9ef5119b0411f83aaa209d4edb4fb10646eb6eaff68e7771a64e50" origin="Generated by Gradle"/>
<component group="com.google.api" name="gax" version="2.20.1">
<artifact name="gax-2.20.1.jar">
<sha256 value="e6588fc1786557fda95024a040b32106d58ffe72fab0933200c4d3c6197a4fe1" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.google.api" name="gax-httpjson" version="0.85.0">
<artifact name="gax-httpjson-0.85.0.jar">
<sha256 value="e0b0411e42c859e0fab4b092a3429aea2a71b2c2ebbbc24d719b9e762be97c35" origin="Generated by Gradle"/>
<component group="com.google.api" name="gax-httpjson" version="0.105.1">
<artifact name="gax-httpjson-0.105.1.jar">
<sha256 value="4b7e1135eb4a97bce9d9d8c56128c5c30594dc2bebf26c9851ac582d2b43b2db" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.google.api-client" name="google-api-client" version="1.33.1">
<artifact name="google-api-client-1.33.1.jar">
<sha256 value="d471ac82f1b285b3fde1e5b7ff265dad7ab9cd73a052bcb01ef35054f7d5db02" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.google.api-client" name="google-api-client" version="1.35.1">
<artifact name="google-api-client-1.35.1.jar">
<sha256 value="24714add0c0248730a0e705448bbc91a5c68dbc0dc9f7fa0c97366bc7b275e23" origin="Generated by Gradle"/>
<component group="com.google.api-client" name="google-api-client" version="2.1.1">
<artifact name="google-api-client-2.1.1.jar">
<sha256 value="05d846e83a2924c2a6facbd72817228fee68bb522b818b9804b26a712f678bf3" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.google.api.grpc" name="proto-google-common-protos" version="2.3.2">
<artifact name="proto-google-common-protos-2.3.2.jar">
<sha256 value="99aa86a5e52dff58be410b5c30905b2ea9a2c995a87e237f160590953c661b6d" origin="Generated by Gradle"/>
<component group="com.google.api.grpc" name="proto-google-common-protos" version="2.9.6">
<artifact name="proto-google-common-protos-2.9.6.jar">
<sha256 value="84e715d92500fd0d44408f58713d5d70ae857d022de3d66d500fbf27fae88103" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.google.api.grpc" name="proto-google-iam-v1" version="1.0.14">
<artifact name="proto-google-iam-v1-1.0.14.jar">
<sha256 value="e722e8d67172a87ad1b5bd3ba02c678484958190c49c059494453b07e7ea5dca" origin="Generated by Gradle"/>
<component group="com.google.api.grpc" name="proto-google-iam-v1" version="1.6.2">
<artifact name="proto-google-iam-v1-1.6.2.jar">
<sha256 value="4fce59633b8a9871614231d213992e60e9b50e12f822c33d7e82a79c90addf25" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.google.apis" name="google-api-services-compute" version="v1-rev20220322-1.32.1">
<artifact name="google-api-services-compute-v1-rev20220322-1.32.1.jar">
<sha256 value="05d913bb9b2baa8e4dfd99a1aee4864240feebf6647986e37aea88f3020313fe" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.google.apis" name="google-api-services-storage" version="v1-rev20210127-1.32.1">
<artifact name="google-api-services-storage-v1-rev20210127-1.32.1.jar">
<sha256 value="c23beb05bb842abed14c8fd75a3e6b7a2f51b0d3ece1903a9c5fd3ab770ad93e" origin="Generated by Gradle"/>
<component group="com.google.apis" name="google-api-services-storage" version="v1-rev20220705-2.0.0">
<artifact name="google-api-services-storage-v1-rev20220705-2.0.0.jar">
<sha256 value="c6027d6c58089402620ce338351ca2efd414f813007844bc252ceb5f47789f4f" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.google.auth" name="google-auth-library-credentials" version="1.0.0">
<artifact name="google-auth-library-credentials-1.0.0.jar">
<sha256 value="8b4e4bf2c89f72e9fdcbbd442c931e17cba01e84f058fd61e470bd19f8a92cc1" origin="Generated by Gradle"/>
<component group="com.google.auth" name="google-auth-library-credentials" version="1.11.0">
<artifact name="google-auth-library-credentials-1.11.0.jar">
<sha256 value="2f47d7d2126576f13c22b7442e97593e9e6285adbd6d4c8dd779d87a8cbb8270" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.google.auth" name="google-auth-library-oauth2-http" version="1.0.0">
<artifact name="google-auth-library-oauth2-http-1.0.0.jar">
<sha256 value="7cae6c73368659ac7a6b46018070f3d7980acd5bfaaa91b840f2e869cef1f07e" origin="Generated by Gradle"/>
<component group="com.google.auth" name="google-auth-library-oauth2-http" version="1.11.0">
<artifact name="google-auth-library-oauth2-http-1.11.0.jar">
<sha256 value="9fc1548aacc781367b5ca8da8e053018929d71af7303f6752952ddcb6f9b50c4" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.google.cloud" name="google-cloud-core" version="2.0.2">
<artifact name="google-cloud-core-2.0.2.jar">
<sha256 value="364be3e5617c973a4fa8ebe2a56aa8eaec9277f5dba7d033cc37b71b00025e45" origin="Generated by Gradle"/>
<component group="com.google.cloud" name="google-cloud-core" version="2.8.28">
<artifact name="google-cloud-core-2.8.28.jar">
<sha256 value="f775b5dc6b6478d07be13c64b3aa8ee0eded5e2571ff737e86ed05958cce4e92" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.google.cloud" name="google-cloud-core-http" version="2.0.2">
<artifact name="google-cloud-core-http-2.0.2.jar">
<sha256 value="087f0bc4d8de1daed73acb631b68c254dcf7993379110c6edf7bc7438d0e52ca" origin="Generated by Gradle"/>
<component group="com.google.cloud" name="google-cloud-core-http" version="2.8.28">
<artifact name="google-cloud-core-http-2.8.28.jar">
<sha256 value="96cd89a23a40b64baa28cba92676fba67d16cfbb1a7085827a1852a71c2dce46" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.google.cloud" name="google-cloud-storage" version="1.118.1">
<artifact name="google-cloud-storage-1.118.1.jar">
<sha256 value="21d675edc7caa02426290ed631b453004e7ece91bc811209855491263ac35f69" origin="Generated by Gradle"/>
<component group="com.google.cloud" name="google-cloud-storage" version="2.13.1">
<artifact name="google-cloud-storage-2.13.1.jar">
<sha256 value="5fee796ca3c328aabe1b96adfbb264714e82b3ceee2971a83732c8cada12a9b6" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.google.cloud" name="google-cloud-storage" version="2.15.1">
<artifact name="google-cloud-storage-2.15.1.jar">
<sha256 value="467dd38d9d028e4645473e8f0271e7a8b2f1c3f3439e4849eb34479cc6f54e66" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.google.code.findbugs" name="jsr305" version="3.0.0">
Expand All @@ -509,6 +514,11 @@
<sha256 value="766ad2a0783f2687962c8ad74ceecc38a28b9f72a2d085ee438b7813e928d0c7" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.google.code.gson" name="gson" version="2.10">
<artifact name="gson-2.10.jar">
<sha256 value="0cdd163ce3598a20fc04eee71b140b24f6f2a3b35f0a499dbbdd9852e83fbfaf" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.google.code.gson" name="gson" version="2.2.4">
<artifact name="gson-2.2.4.jar">
<sha256 value="c0328cd07ca9e363a5acd00c1cf4afe8cf554bd6d373834981ba05cebec687fb" origin="Generated by Gradle"/>
Expand Down Expand Up @@ -614,9 +624,14 @@
<sha256 value="93bf43e033c7441f66f163f2cb1244d89765c492b844031258ae92b7081dde6e" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.google.http-client" name="google-http-client-appengine" version="1.39.2">
<artifact name="google-http-client-appengine-1.39.2.jar">
<sha256 value="f6320dc0db035aff6eab2e28748560da718ab465fbc3481b653ea3f27aa5cac9" origin="Generated by Gradle"/>
<component group="com.google.http-client" name="google-http-client" version="1.42.3">
<artifact name="google-http-client-1.42.3.jar">
<sha256 value="e395dd1765e3e6bceb0c610706bcf4128de84bd6e65cf1d4adbf998b4114161c" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.google.http-client" name="google-http-client-appengine" version="1.42.3">
<artifact name="google-http-client-appengine-1.42.3.jar">
<sha256 value="3a876b1f704ac6d8500b8430b288dbce78c52dc18c43c008a587a7377bb81e2e" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.google.http-client" name="google-http-client-gson" version="1.39.2">
Expand All @@ -629,6 +644,11 @@
<sha256 value="29deba06c722e00dd31fe7e3b526bdfec0577660b868a1efaceeddb5e04208a8" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.google.http-client" name="google-http-client-gson" version="1.42.3">
<artifact name="google-http-client-gson-1.42.3.jar">
<sha256 value="8196efaa89c5f73b00b2b48edad02fcd78524259407c37ab1860737988545cee" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.google.http-client" name="google-http-client-jackson2" version="1.39.2">
<artifact name="google-http-client-jackson2-1.39.2.jar">
<sha256 value="74a493a7ba25e1dfb3d3a4ddf713306d5a3786db00a3489d59061dc8cff321b1" origin="Generated by Gradle"/>
Expand All @@ -639,6 +659,11 @@
<sha256 value="3b9add5859979519236f45cc9c9f53da975e0b5b88e0cdfd4bb009b112b4d435" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.google.http-client" name="google-http-client-jackson2" version="1.42.3">
<artifact name="google-http-client-jackson2-1.42.3.jar">
<sha256 value="b03a79f38e924e2eeaee673acf314626825284cb39948d06c2948ad083b4d089" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.google.inject" name="guice" version="3.0">
<artifact name="guice-3.0.jar">
<sha256 value="1a59d0421ffd355cc0b70b42df1c2e9af744c8a2d0c92da379f5fca2f07f1d22" origin="Generated by Gradle"/>
Expand Down Expand Up @@ -1204,9 +1229,9 @@
<sha256 value="bcbf9055dff453fd6508bd7cca2a0aa2d5f059a9c94beed1f5fda1dc015607b8" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="io.grpc" name="grpc-context" version="1.39.0">
<artifact name="grpc-context-1.39.0.jar">
<sha256 value="97fe70b4e7da86ed4fe3deb16d83fc89c7e5b764ebac8c9dd5d51dd4b5aa920c" origin="Generated by Gradle"/>
<component group="io.grpc" name="grpc-context" version="1.49.2">
<artifact name="grpc-context-1.49.2.jar">
<sha256 value="7aaf3ad732a281be51fe0895acd4538b96e1d7e3b527bce54b651770b8ded174" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="io.netty" name="netty" version="3.10.6.Final">
Expand Down Expand Up @@ -1344,6 +1369,11 @@
<sha256 value="421cbc06d9fb56fcf07332553677ddea04a47079b30955567c8a80b34689ed32" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="io.opencensus" name="opencensus-api" version="0.31.1">
<artifact name="opencensus-api-0.31.1.jar">
<sha256 value="f1474d47f4b6b001558ad27b952e35eda5cc7146788877fc52938c6eba24b382" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="io.opencensus" name="opencensus-contrib-http-util" version="0.28.0">
<artifact name="opencensus-contrib-http-util-0.28.0.jar">
<sha256 value="49c3db2a29f1fdb2f73928cbea969bd1d40fab7cc5bb6273022babd96f7a789b" origin="Generated by Gradle"/>
Expand All @@ -1354,6 +1384,11 @@
<sha256 value="5432d2e9a1bdc8a0e835c6bce52b9d767fbf688cc8892432cff97c3389894b46" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="io.opencensus" name="opencensus-contrib-http-util" version="0.31.1">
<artifact name="opencensus-contrib-http-util-0.31.1.jar">
<sha256 value="3ea995b55a4068be22989b70cc29a4d788c2d328d1d50613a7a9afd13fdd2d0a" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="io.opentelemetry" name="opentelemetry-api" version="1.17.0">
<artifact name="opentelemetry-api-1.17.0.jar">
<sha256 value="dce58a21caef0c6be082ce5ec86ad75f3017744a029a454e068871c110ae029c" origin="Generated by Gradle"/>
Expand Down Expand Up @@ -3804,9 +3839,9 @@
<sha256 value="5196a0da2c5a33d1a04e88fc7a9cc109501bc265b5bac8edd9984a1885070ad4" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.threeten" name="threetenbp" version="1.5.1">
<artifact name="threetenbp-1.5.1.jar">
<sha256 value="4342ee04d87040f71b0aa9188ee960780ef2da734e32a8d43a522a580b5e0f3b" origin="Generated by Gradle"/>
<component group="org.threeten" name="threetenbp" version="1.6.5">
<artifact name="threetenbp-1.6.5.jar">
<sha256 value="b2551604c0d6516428e3065213b74461240378a07622201a37ad32638ecb417c" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.tmatesoft.sqljet" name="sqljet" version="1.1.10">
Expand Down
50 changes: 28 additions & 22 deletions modules/repository-gcs/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,36 +26,36 @@ esplugin {
}

dependencies {
api 'com.google.cloud:google-cloud-storage:1.118.1'
api 'com.google.cloud:google-cloud-core:2.0.2'
api 'com.google.cloud:google-cloud-core-http:2.0.2'
runtimeOnly 'com.google.guava:guava:30.1.1-jre'
api 'com.google.cloud:google-cloud-storage:2.13.1'
api 'com.google.cloud:google-cloud-core:2.8.28'
api 'com.google.cloud:google-cloud-core-http:2.8.28'
runtimeOnly 'com.google.guava:guava:31.1-jre'
runtimeOnly 'com.google.guava:failureaccess:1.0.1'
api "commons-logging:commons-logging:${versions.commonslogging}"
api "org.apache.logging.log4j:log4j-1.2-api:${versions.log4j}"
api "commons-codec:commons-codec:${versions.commonscodec}"
api 'com.google.api:api-common:2.2.1'
api 'com.google.api:gax:2.0.0'
api 'org.threeten:threetenbp:1.5.1'
api 'com.google.api:api-common:2.3.1'
api 'com.google.api:gax:2.20.1'
api 'org.threeten:threetenbp:1.6.5'
api "com.google.protobuf:protobuf-java-util:${versions.protobuf}"
api "com.google.protobuf:protobuf-java:${versions.protobuf}"
api 'com.google.code.gson:gson:2.8.9'
api 'com.google.api.grpc:proto-google-common-protos:2.3.2'
api 'com.google.api.grpc:proto-google-iam-v1:1.0.14'
api 'com.google.auth:google-auth-library-credentials:1.0.0'
api 'com.google.auth:google-auth-library-oauth2-http:1.0.0'
api 'com.google.code.gson:gson:2.10'
api 'com.google.api.grpc:proto-google-common-protos:2.9.6'
api 'com.google.api.grpc:proto-google-iam-v1:1.6.2'
api 'com.google.auth:google-auth-library-credentials:1.11.0'
api 'com.google.auth:google-auth-library-oauth2-http:1.11.0'
api 'com.google.oauth-client:google-oauth-client:1.34.1'
api 'com.google.api-client:google-api-client:1.35.1'
api 'com.google.http-client:google-http-client:1.39.2'
api 'com.google.http-client:google-http-client-gson:1.39.2'
api 'com.google.http-client:google-http-client-appengine:1.39.2'
api 'com.google.http-client:google-http-client-jackson2:1.39.2'
api 'com.google.api-client:google-api-client:2.1.1'
api 'com.google.http-client:google-http-client:1.42.3'
api 'com.google.http-client:google-http-client-gson:1.42.3'
api 'com.google.http-client:google-http-client-appengine:1.42.3'
api 'com.google.http-client:google-http-client-jackson2:1.42.3'
api "com.fasterxml.jackson.core:jackson-core:${versions.jackson}"
api 'com.google.api:gax-httpjson:0.85.0'
api 'io.grpc:grpc-context:1.39.0'
api 'io.opencensus:opencensus-api:0.28.0'
api 'io.opencensus:opencensus-contrib-http-util:0.28.0'
api 'com.google.apis:google-api-services-storage:v1-rev20210127-1.32.1'
api 'com.google.api:gax-httpjson:0.105.1'
api 'io.grpc:grpc-context:1.49.2'
api 'io.opencensus:opencensus-api:0.31.1'
api 'io.opencensus:opencensus-contrib-http-util:0.31.1'
api 'com.google.apis:google-api-services-storage:v1-rev20220705-2.0.0'

testImplementation project(':test:fixtures:gcs-fixture')
}
Expand Down Expand Up @@ -180,6 +180,12 @@ tasks.named("thirdPartyAudit").configure {
'org.apache.http.protocol.HttpContext',
'org.apache.http.protocol.HttpProcessor',
'org.apache.http.protocol.HttpRequestExecutor',
// com.google.api.gax optional dependencies
'org.graalvm.nativeimage.hosted.Feature',
'org.graalvm.nativeimage.hosted.Feature$BeforeAnalysisAccess',
'org.graalvm.nativeimage.hosted.Feature$DuringAnalysisAccess',
'org.graalvm.nativeimage.hosted.Feature$FeatureAccess',
'org.graalvm.nativeimage.hosted.RuntimeReflection',
// commons-logging provided dependencies
'javax.servlet.ServletContextEvent',
'javax.servlet.ServletContextListener'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import com.google.api.gax.retrying.RetrySettings;
import com.google.cloud.http.HttpTransportOptions;
import com.google.cloud.storage.StorageOptions;
import com.google.cloud.storage.StorageRetryStrategy;
import com.sun.net.httpserver.Headers;
import com.sun.net.httpserver.HttpExchange;
import com.sun.net.httpserver.HttpHandler;
Expand Down Expand Up @@ -227,6 +228,7 @@ StorageOptions createStorageOptions(
) {
StorageOptions options = super.createStorageOptions(gcsClientSettings, httpTransportOptions);
return options.toBuilder()
.setStorageRetryStrategy(StorageRetryStrategy.getLegacyStorageRetryStrategy())
.setHost(options.getHost())
.setCredentials(options.getCredentials())
.setRetrySettings(
Expand Down
Loading

0 comments on commit 8515535

Please sign in to comment.