Browse Source

Upgrade GCS SDK to 1.117.1 (#74938)

We're behind the ugprade schedule by quite a bit here, upgrading to the latest version
and adjusting our test fixture accordingly.
Armin Braun 4 years ago
parent
commit
d41dfc9903
55 changed files with 277 additions and 54 deletions
  1. 30 27
      plugins/repository-gcs/build.gradle
  2. 1 0
      plugins/repository-gcs/licenses/api-common-1.10.4.jar.sha1
  3. 0 1
      plugins/repository-gcs/licenses/api-common-1.8.1.jar.sha1
  4. 1 0
      plugins/repository-gcs/licenses/failureaccess-1.0.1.jar.sha1
  5. 202 0
      plugins/repository-gcs/licenses/failureaccess-LICENSE.txt
  6. 0 0
      plugins/repository-gcs/licenses/failureaccess-NOTICE.txt
  7. 0 1
      plugins/repository-gcs/licenses/gax-1.54.0.jar.sha1
  8. 1 0
      plugins/repository-gcs/licenses/gax-1.66.0.jar.sha1
  9. 0 1
      plugins/repository-gcs/licenses/gax-httpjson-0.62.0.jar.sha1
  10. 1 0
      plugins/repository-gcs/licenses/gax-httpjson-0.83.0.jar.sha1
  11. 0 1
      plugins/repository-gcs/licenses/google-api-client-1.30.10.jar.sha1
  12. 1 0
      plugins/repository-gcs/licenses/google-api-client-1.32.1.jar.sha1
  13. 0 1
      plugins/repository-gcs/licenses/google-api-services-storage-v1-rev20200814-1.30.10.jar.sha1
  14. 1 0
      plugins/repository-gcs/licenses/google-api-services-storage-v1-rev20210127-1.31.5.jar.sha1
  15. 0 1
      plugins/repository-gcs/licenses/google-auth-library-credentials-0.20.0.jar.sha1
  16. 1 0
      plugins/repository-gcs/licenses/google-auth-library-credentials-0.26.0.jar.sha1
  17. 0 1
      plugins/repository-gcs/licenses/google-auth-library-oauth2-http-0.20.0.jar.sha1
  18. 1 0
      plugins/repository-gcs/licenses/google-auth-library-oauth2-http-0.26.0.jar.sha1
  19. 0 1
      plugins/repository-gcs/licenses/google-cloud-core-1.93.3.jar.sha1
  20. 1 0
      plugins/repository-gcs/licenses/google-cloud-core-1.95.4.jar.sha1
  21. 0 1
      plugins/repository-gcs/licenses/google-cloud-core-http-1.93.3.jar.sha1
  22. 1 0
      plugins/repository-gcs/licenses/google-cloud-core-http-1.95.4.jar.sha1
  23. 0 1
      plugins/repository-gcs/licenses/google-cloud-storage-1.113.1.jar.sha1
  24. 1 0
      plugins/repository-gcs/licenses/google-cloud-storage-1.117.1.jar.sha1
  25. 0 1
      plugins/repository-gcs/licenses/google-http-client-1.35.0.jar.sha1
  26. 1 0
      plugins/repository-gcs/licenses/google-http-client-1.39.2.jar.sha1
  27. 0 1
      plugins/repository-gcs/licenses/google-http-client-appengine-1.35.0.jar.sha1
  28. 1 0
      plugins/repository-gcs/licenses/google-http-client-appengine-1.39.2.jar.sha1
  29. 1 0
      plugins/repository-gcs/licenses/google-http-client-gson-1.39.2.jar.sha1
  30. 0 1
      plugins/repository-gcs/licenses/google-http-client-jackson2-1.35.0.jar.sha1
  31. 1 0
      plugins/repository-gcs/licenses/google-http-client-jackson2-1.39.2.jar.sha1
  32. 0 1
      plugins/repository-gcs/licenses/google-oauth-client-1.28.0.jar.sha1
  33. 1 0
      plugins/repository-gcs/licenses/google-oauth-client-1.31.5.jar.sha1
  34. 0 1
      plugins/repository-gcs/licenses/grpc-context-1.29.0.jar.sha1
  35. 1 0
      plugins/repository-gcs/licenses/grpc-context-1.39.0.jar.sha1
  36. 0 1
      plugins/repository-gcs/licenses/gson-2.7.jar.sha1
  37. 1 0
      plugins/repository-gcs/licenses/gson-2.8.7.jar.sha1
  38. 0 1
      plugins/repository-gcs/licenses/guava-26.0-jre.jar.sha1
  39. 1 0
      plugins/repository-gcs/licenses/guava-30.1.1-jre.jar.sha1
  40. 0 1
      plugins/repository-gcs/licenses/opencensus-api-0.18.0.jar.sha1
  41. 1 0
      plugins/repository-gcs/licenses/opencensus-api-0.28.0.jar.sha1
  42. 0 1
      plugins/repository-gcs/licenses/opencensus-contrib-http-util-0.18.0.jar.sha1
  43. 1 0
      plugins/repository-gcs/licenses/opencensus-contrib-http-util-0.28.0.jar.sha1
  44. 0 1
      plugins/repository-gcs/licenses/proto-google-common-protos-1.16.0.jar.sha1
  45. 1 0
      plugins/repository-gcs/licenses/proto-google-common-protos-2.3.2.jar.sha1
  46. 0 1
      plugins/repository-gcs/licenses/proto-google-iam-v1-0.12.0.jar.sha1
  47. 1 0
      plugins/repository-gcs/licenses/proto-google-iam-v1-1.0.14.jar.sha1
  48. 0 1
      plugins/repository-gcs/licenses/protobuf-java-3.11.3.jar.sha1
  49. 1 0
      plugins/repository-gcs/licenses/protobuf-java-3.17.3.jar.sha1
  50. 0 1
      plugins/repository-gcs/licenses/protobuf-java-util-3.11.3.jar.sha1
  51. 1 0
      plugins/repository-gcs/licenses/protobuf-java-util-3.17.3.jar.sha1
  52. 0 1
      plugins/repository-gcs/licenses/threetenbp-1.4.4.jar.sha1
  53. 1 0
      plugins/repository-gcs/licenses/threetenbp-1.5.1.jar.sha1
  54. 14 0
      plugins/repository-gcs/src/test/java/org/elasticsearch/repositories/gcs/GoogleCloudStorageBlobContainerRetriesTests.java
  55. 5 3
      test/fixtures/gcs-fixture/src/main/java/fixture/gcs/GoogleCloudStorageHttpHandler.java

+ 30 - 27
plugins/repository-gcs/build.gradle

@@ -1,6 +1,3 @@
-import java.nio.file.Files
-import java.security.KeyPair
-import java.security.KeyPairGenerator
 import org.elasticsearch.gradle.internal.MavenFilteringHack
 import org.elasticsearch.gradle.internal.info.BuildParams
 import org.elasticsearch.gradle.internal.test.RestIntegTestTask
@@ -29,33 +26,35 @@ esplugin {
 }
 
 dependencies {
-  api 'com.google.cloud:google-cloud-storage:1.113.1'
-  api 'com.google.cloud:google-cloud-core:1.93.3'
-  runtimeOnly 'com.google.guava:guava:26.0-jre'
-  api 'com.google.http-client:google-http-client:1.35.0'
+  api 'com.google.cloud:google-cloud-storage:1.117.1'
+  api 'com.google.cloud:google-cloud-core:1.95.4'
+  api 'com.google.cloud:google-cloud-core-http:1.95.4'
+  runtimeOnly 'com.google.guava:guava:30.1.1-jre'
+  api '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:1.8.1'
-  api 'com.google.api:gax:1.54.0'
-  api 'org.threeten:threetenbp:1.4.4'
-  api 'com.google.protobuf:protobuf-java-util:3.11.3'
-  api 'com.google.protobuf:protobuf-java:3.11.3'
-  api 'com.google.code.gson:gson:2.7'
-  api 'com.google.api.grpc:proto-google-common-protos:1.16.0'
-  api 'com.google.api.grpc:proto-google-iam-v1:0.12.0'
-  api 'com.google.cloud:google-cloud-core-http:1.93.3'
-  api 'com.google.auth:google-auth-library-credentials:0.20.0'
-  api 'com.google.auth:google-auth-library-oauth2-http:0.20.0'
-  api 'com.google.oauth-client:google-oauth-client:1.28.0'
-  api 'com.google.api-client:google-api-client:1.30.10'
-  api 'com.google.http-client:google-http-client-appengine:1.35.0'
-  api 'com.google.http-client:google-http-client-jackson2:1.35.0'
-  api 'com.google.api:gax-httpjson:0.62.0'
-  api 'io.grpc:grpc-context:1.29.0'
-  api 'io.opencensus:opencensus-api:0.18.0'
-  api 'io.opencensus:opencensus-contrib-http-util:0.18.0'
-  api 'com.google.apis:google-api-services-storage:v1-rev20200814-1.30.10'
+  api 'com.google.api:api-common:1.10.4'
+  api 'com.google.api:gax:1.66.0'
+  api 'org.threeten:threetenbp:1.5.1'
+  api 'com.google.protobuf:protobuf-java-util:3.17.3'
+  api 'com.google.protobuf:protobuf-java:3.17.3'
+  api 'com.google.code.gson:gson:2.8.7'
+  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:0.26.0'
+  api 'com.google.auth:google-auth-library-oauth2-http:0.26.0'
+  api 'com.google.oauth-client:google-oauth-client:1.31.5'
+  api 'com.google.api-client:google-api-client:1.32.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:gax-httpjson:0.83.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.31.5'
 
   testImplementation project(':test:fixtures:gcs-fixture')
 }
@@ -112,6 +111,7 @@ tasks.named("thirdPartyAudit").configure {
   )
 
   ignoreMissingClasses(
+    'com.google.api.client.http.apache.v2.ApacheHttpTransport',
     'com.google.appengine.api.datastore.Blob',
     'com.google.appengine.api.datastore.DatastoreService',
     'com.google.appengine.api.datastore.DatastoreServiceFactory',
@@ -161,6 +161,8 @@ tasks.named("thirdPartyAudit").configure {
     'org.apache.http.client.methods.HttpPut',
     'org.apache.http.client.methods.HttpRequestBase',
     'org.apache.http.client.methods.HttpTrace',
+    'org.apache.http.config.Registry',
+    'org.apache.http.config.RegistryBuilder',
     'org.apache.http.config.SocketConfig',
     'org.apache.http.config.SocketConfig$Builder',
     'org.apache.http.conn.ClientConnectionManager',
@@ -172,6 +174,7 @@ tasks.named("thirdPartyAudit").configure {
     'org.apache.http.conn.scheme.PlainSocketFactory',
     'org.apache.http.conn.scheme.Scheme',
     'org.apache.http.conn.scheme.SchemeRegistry',
+    'org.apache.http.conn.socket.PlainConnectionSocketFactory',
     'org.apache.http.conn.ssl.SSLConnectionSocketFactory',
     'org.apache.http.conn.ssl.SSLSocketFactory',
     'org.apache.http.conn.ssl.X509HostnameVerifier',

+ 1 - 0
plugins/repository-gcs/licenses/api-common-1.10.4.jar.sha1

@@ -0,0 +1 @@
+650904f378415673cfc581fe5720ea9026dfd62d

+ 0 - 1
plugins/repository-gcs/licenses/api-common-1.8.1.jar.sha1

@@ -1 +0,0 @@
-e89befb19b08ad84b262b2f226ab79aefcaa9d7f

+ 1 - 0
plugins/repository-gcs/licenses/failureaccess-1.0.1.jar.sha1

@@ -0,0 +1 @@
+1dcf1de382a0bf95a3d8b0849546c88bac1292c9

+ 202 - 0
plugins/repository-gcs/licenses/failureaccess-LICENSE.txt

@@ -0,0 +1,202 @@
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   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.

+ 0 - 0
plugins/repository-gcs/licenses/failureaccess-NOTICE.txt


+ 0 - 1
plugins/repository-gcs/licenses/gax-1.54.0.jar.sha1

@@ -1 +0,0 @@
-1f1668868b8b3fd5fc248d80c16dd9f09afc9180

+ 1 - 0
plugins/repository-gcs/licenses/gax-1.66.0.jar.sha1

@@ -0,0 +1 @@
+8320f0ee0dd4200ffd8abdf9f16a21f2b64ce9b2

+ 0 - 1
plugins/repository-gcs/licenses/gax-httpjson-0.62.0.jar.sha1

@@ -1 +0,0 @@
-05a1a4736acd1c4f30304be953532be6aecdc2c9

+ 1 - 0
plugins/repository-gcs/licenses/gax-httpjson-0.83.0.jar.sha1

@@ -0,0 +1 @@
+b9d8cf27c3ffd409402bee4d8458972ad8638ebc

+ 0 - 1
plugins/repository-gcs/licenses/google-api-client-1.30.10.jar.sha1

@@ -1 +0,0 @@
-2de98417199785982e1f037fb8b52613f57175ae

+ 1 - 0
plugins/repository-gcs/licenses/google-api-client-1.32.1.jar.sha1

@@ -0,0 +1 @@
+3e216f54e59e3c6f01bc52beeeed9010724e0edf

+ 0 - 1
plugins/repository-gcs/licenses/google-api-services-storage-v1-rev20200814-1.30.10.jar.sha1

@@ -1 +0,0 @@
-fe3b480958961fc7144da10ce3653065d5eb5490

+ 1 - 0
plugins/repository-gcs/licenses/google-api-services-storage-v1-rev20210127-1.31.5.jar.sha1

@@ -0,0 +1 @@
+721b04e4e41c7db323a9ed3fb240f58ee5adf3fe

+ 0 - 1
plugins/repository-gcs/licenses/google-auth-library-credentials-0.20.0.jar.sha1

@@ -1 +0,0 @@
-87a91a373e64ba5c3cdf8cc5cf54b189dd1492f8

+ 1 - 0
plugins/repository-gcs/licenses/google-auth-library-credentials-0.26.0.jar.sha1

@@ -0,0 +1 @@
+da0919aae28fd57fb98057e3125040e31b582f5f

+ 0 - 1
plugins/repository-gcs/licenses/google-auth-library-oauth2-http-0.20.0.jar.sha1

@@ -1 +0,0 @@
-f33d4d6c91a68826816606a2208990eea93fcb2a

+ 1 - 0
plugins/repository-gcs/licenses/google-auth-library-oauth2-http-0.26.0.jar.sha1

@@ -0,0 +1 @@
+ea3e6869046df1e99abbf89b3417aac12f596743

+ 0 - 1
plugins/repository-gcs/licenses/google-cloud-core-1.93.3.jar.sha1

@@ -1 +0,0 @@
-6fc017c0908456c0867d21c85d1b906662d4b5f1

+ 1 - 0
plugins/repository-gcs/licenses/google-cloud-core-1.95.4.jar.sha1

@@ -0,0 +1 @@
+9120a006cd1fa2be027de951270d541bef8407f5

+ 0 - 1
plugins/repository-gcs/licenses/google-cloud-core-http-1.93.3.jar.sha1

@@ -1 +0,0 @@
-2589aa6a4b6c49811c08ec2803c8e9c79c410bc5

+ 1 - 0
plugins/repository-gcs/licenses/google-cloud-core-http-1.95.4.jar.sha1

@@ -0,0 +1 @@
+0d705e4f7bd51093c4084507054303c2bd348bc9

+ 0 - 1
plugins/repository-gcs/licenses/google-cloud-storage-1.113.1.jar.sha1

@@ -1 +0,0 @@
-fd291ed57c1223bbb31363c4aa88c55faf0000c7

+ 1 - 0
plugins/repository-gcs/licenses/google-cloud-storage-1.117.1.jar.sha1

@@ -0,0 +1 @@
+59b9eceeda71799fe53d1391288b09c542110e02

+ 0 - 1
plugins/repository-gcs/licenses/google-http-client-1.35.0.jar.sha1

@@ -1 +0,0 @@
-f2348dd57d5417c29388bd430f5055dca863c600

+ 1 - 0
plugins/repository-gcs/licenses/google-http-client-1.39.2.jar.sha1

@@ -0,0 +1 @@
+5aafc3ff51693febf4214bb2a21baf577ce2fb25

+ 0 - 1
plugins/repository-gcs/licenses/google-http-client-appengine-1.35.0.jar.sha1

@@ -1 +0,0 @@
-394d1e1376538931ec3d4eeed654f9da911b95eb

+ 1 - 0
plugins/repository-gcs/licenses/google-http-client-appengine-1.39.2.jar.sha1

@@ -0,0 +1 @@
+22ba6d92fd2e5c0c9db01848941e2e8bd42943ca

+ 1 - 0
plugins/repository-gcs/licenses/google-http-client-gson-1.39.2.jar.sha1

@@ -0,0 +1 @@
+43c1d0500c31ee31ff5918ac4bbe95711cd744a9

+ 0 - 1
plugins/repository-gcs/licenses/google-http-client-jackson2-1.35.0.jar.sha1

@@ -1 +0,0 @@
-c1c2a08792b935f3345590783ada872f4a0997f1

+ 1 - 0
plugins/repository-gcs/licenses/google-http-client-jackson2-1.39.2.jar.sha1

@@ -0,0 +1 @@
+4037ca41fe43989a5609158d4ed7a3973de5df36

+ 0 - 1
plugins/repository-gcs/licenses/google-oauth-client-1.28.0.jar.sha1

@@ -1 +0,0 @@
-9a9e5d0c33b663d6475c96ce79b2949545a113af

+ 1 - 0
plugins/repository-gcs/licenses/google-oauth-client-1.31.5.jar.sha1

@@ -0,0 +1 @@
+a468e6b6d3d7de8310c3c9f4eb7cbb4eabde4404

+ 0 - 1
plugins/repository-gcs/licenses/grpc-context-1.29.0.jar.sha1

@@ -1 +0,0 @@
-1d8a441110f86f8927543dc3007639080441ea3c

+ 1 - 0
plugins/repository-gcs/licenses/grpc-context-1.39.0.jar.sha1

@@ -0,0 +1 @@
+637f453f3654aa29bf085ae7ddc86f9f80c937dd

+ 0 - 1
plugins/repository-gcs/licenses/gson-2.7.jar.sha1

@@ -1 +0,0 @@
-751f548c85fa49f330cecbb1875893f971b33c4e

+ 1 - 0
plugins/repository-gcs/licenses/gson-2.8.7.jar.sha1

@@ -0,0 +1 @@
+69d9503ea0a40ee16f0bcdac7e3eaf83d0fa914a

+ 0 - 1
plugins/repository-gcs/licenses/guava-26.0-jre.jar.sha1

@@ -1 +0,0 @@
-6a806eff209f36f635f943e16d97491f00f6bfab

+ 1 - 0
plugins/repository-gcs/licenses/guava-30.1.1-jre.jar.sha1

@@ -0,0 +1 @@
+87e0fd1df874ea3cbe577702fe6f17068b790fd8

+ 0 - 1
plugins/repository-gcs/licenses/opencensus-api-0.18.0.jar.sha1

@@ -1 +0,0 @@
-b89a8f8dfd1e1e0d68d83c82a855624814b19a6e

+ 1 - 0
plugins/repository-gcs/licenses/opencensus-api-0.28.0.jar.sha1

@@ -0,0 +1 @@
+0fc0d06a9d975a38c581dff59b99cf31db78bd99

+ 0 - 1
plugins/repository-gcs/licenses/opencensus-contrib-http-util-0.18.0.jar.sha1

@@ -1 +0,0 @@
-76a37e4a931d5801a9e25b0c0353e5f37c4d1e8e

+ 1 - 0
plugins/repository-gcs/licenses/opencensus-contrib-http-util-0.28.0.jar.sha1

@@ -0,0 +1 @@
+f6cb276330197d51dd65327fc305a3df7e622705

+ 0 - 1
plugins/repository-gcs/licenses/proto-google-common-protos-1.16.0.jar.sha1

@@ -1 +0,0 @@
-2c5f022ea3b8e8df6a619c4cd8faf9af86022daa

+ 1 - 0
plugins/repository-gcs/licenses/proto-google-common-protos-2.3.2.jar.sha1

@@ -0,0 +1 @@
+a35fd6ed973f752604fce97a21eb1e09d6afc467

+ 0 - 1
plugins/repository-gcs/licenses/proto-google-iam-v1-0.12.0.jar.sha1

@@ -1 +0,0 @@
-ea312c0250a5d0a7cdd1b20bc2c3259938b79855

+ 1 - 0
plugins/repository-gcs/licenses/proto-google-iam-v1-1.0.14.jar.sha1

@@ -0,0 +1 @@
+6bc86a81d4bd99bfb54e9591b8de3ccd515fde78

+ 0 - 1
plugins/repository-gcs/licenses/protobuf-java-3.11.3.jar.sha1

@@ -1 +0,0 @@
-df12be70b968e32442821a2cfdc3cede5a42dec5

+ 1 - 0
plugins/repository-gcs/licenses/protobuf-java-3.17.3.jar.sha1

@@ -0,0 +1 @@
+313b1861fa9312dd71e1033a77c2e64fb1a94dd3

+ 0 - 1
plugins/repository-gcs/licenses/protobuf-java-util-3.11.3.jar.sha1

@@ -1 +0,0 @@
-fd4ba2dfeb1b010eb20ca27e65fbfb74fbbdcdb9

+ 1 - 0
plugins/repository-gcs/licenses/protobuf-java-util-3.17.3.jar.sha1

@@ -0,0 +1 @@
+4340f06a346f46eab1b38feb066e4a2d30aed3b7

+ 0 - 1
plugins/repository-gcs/licenses/threetenbp-1.4.4.jar.sha1

@@ -1 +0,0 @@
-bbe3cc15e8ea16863435009af8ca40dd97770240

+ 1 - 0
plugins/repository-gcs/licenses/threetenbp-1.5.1.jar.sha1

@@ -0,0 +1 @@
+4307ad2fdd4ba8b5ecd3fdb88b932aa49fa25920

+ 14 - 0
plugins/repository-gcs/src/test/java/org/elasticsearch/repositories/gcs/GoogleCloudStorageBlobContainerRetriesTests.java

@@ -256,6 +256,7 @@ public class GoogleCloudStorageBlobContainerRetriesTests extends AbstractBlobCon
         final AtomicInteger countUploads = new AtomicInteger(nbErrors * totalChunks);
         final AtomicBoolean allow410Gone = new AtomicBoolean(randomBoolean());
         final AtomicBoolean allowReadTimeout = new AtomicBoolean(rarely());
+        final AtomicInteger bytesReceived = new AtomicInteger();
         final int wrongChunk = randomIntBetween(1, totalChunks);
 
         final AtomicReference<String> sessionUploadId = new AtomicReference<>(UUIDs.randomBase64UUID());
@@ -306,6 +307,7 @@ public class GoogleCloudStorageBlobContainerRetriesTests extends AbstractBlobCon
                         // we must reset the counters because the whole object upload will be retried
                         countInits.set(nbErrors);
                         countUploads.set(nbErrors * totalChunks);
+                        bytesReceived.set(0);
 
                         exchange.sendResponseHeaders(HttpStatus.SC_GONE, -1);
                         return;
@@ -315,13 +317,25 @@ public class GoogleCloudStorageBlobContainerRetriesTests extends AbstractBlobCon
                 final String range = exchange.getRequestHeaders().getFirst("Content-Range");
                 assertTrue(Strings.hasLength(range));
 
+                if (range.equals("bytes */*")) {
+                    final int receivedSoFar = bytesReceived.get();
+                    if (receivedSoFar > 0) {
+                        exchange.getResponseHeaders().add("Range", String.format(Locale.ROOT, "bytes=0-%d", receivedSoFar));
+                    }
+                    exchange.getResponseHeaders().add("Content-Length", "0");
+                    exchange.sendResponseHeaders(308 /* Resume Incomplete */, -1);
+                    return;
+                }
+
                 if (countUploads.decrementAndGet() % 2 == 0) {
+
                     assertThat(Math.toIntExact(requestBody.length()), anyOf(equalTo(defaultChunkSize), equalTo(lastChunkSize)));
 
                     final int rangeStart = getContentRangeStart(range);
                     final int rangeEnd = getContentRangeEnd(range);
                     assertThat(rangeEnd + 1 - rangeStart, equalTo(Math.toIntExact(requestBody.length())));
                     assertThat(new BytesArray(data, rangeStart, rangeEnd - rangeStart + 1), is(requestBody));
+                    bytesReceived.updateAndGet(existing -> Math.max(existing, rangeEnd));
 
                     final Integer limit = getContentRangeLimit(range);
                     if (limit != null) {

+ 5 - 3
test/fixtures/gcs-fixture/src/main/java/fixture/gcs/GoogleCloudStorageHttpHandler.java

@@ -237,14 +237,16 @@ public class GoogleCloudStorageHttpHandler implements HttpHandler {
                 BytesReference blob = blobs.get(blobName);
                 final String range = exchange.getRequestHeaders().getFirst("Content-Range");
                 final Integer limit = getContentRangeLimit(range);
-                final int start = getContentRangeStart(range);
-                final int end = getContentRangeEnd(range);
 
                 blob = CompositeBytesReference.of(blob, requestBody);
                 blobs.put(blobName, blob);
 
                 if (limit == null) {
-                    exchange.getResponseHeaders().add("Range", String.format(Locale.ROOT, "bytes=%d/%d", start, end));
+                    if ("bytes */*".equals(range) == false) {
+                        final int start = getContentRangeStart(range);
+                        final int end = getContentRangeEnd(range);
+                        exchange.getResponseHeaders().add("Range", String.format(Locale.ROOT, "bytes=%d-%d", start, end));
+                    }
                     exchange.getResponseHeaders().add("Content-Length", "0");
                     exchange.sendResponseHeaders(308 /* Resume Incomplete */, -1);
                 } else {