From 2206961bb8566735fb86346605aa8416e3069aee Mon Sep 17 00:00:00 2001 From: Armin Braun Date: Mon, 5 Jul 2021 17:27:48 +0200 Subject: [PATCH] Upgrade GCS SDK to 1.117.1 We're behind the ugprade schedule by quite a bit here, upgrading to the latest version and adjusting our test fixture accordingly. --- plugins/repository-gcs/build.gradle | 57 ++--- .../licenses/api-common-1.10.4.jar.sha1 | 1 + .../licenses/api-common-1.8.1.jar.sha1 | 1 - .../licenses/failureaccess-1.0.1.jar.sha1 | 1 + .../licenses/failureaccess-LICENSE.txt | 202 ++++++++++++++++++ .../licenses/failureaccess-NOTICE.txt | 0 .../licenses/gax-1.54.0.jar.sha1 | 1 - .../licenses/gax-1.66.0.jar.sha1 | 1 + .../licenses/gax-httpjson-0.62.0.jar.sha1 | 1 - .../licenses/gax-httpjson-0.83.0.jar.sha1 | 1 + .../google-api-client-1.30.10.jar.sha1 | 1 - .../google-api-client-1.32.1.jar.sha1 | 1 + ...es-storage-v1-rev20200814-1.30.10.jar.sha1 | 1 - ...ces-storage-v1-rev20210127-1.31.5.jar.sha1 | 1 + ...e-auth-library-credentials-0.20.0.jar.sha1 | 1 - ...e-auth-library-credentials-0.26.0.jar.sha1 | 1 + ...e-auth-library-oauth2-http-0.20.0.jar.sha1 | 1 - ...e-auth-library-oauth2-http-0.26.0.jar.sha1 | 1 + .../google-cloud-core-1.93.3.jar.sha1 | 1 - .../google-cloud-core-1.95.4.jar.sha1 | 1 + .../google-cloud-core-http-1.93.3.jar.sha1 | 1 - .../google-cloud-core-http-1.95.4.jar.sha1 | 1 + .../google-cloud-storage-1.113.1.jar.sha1 | 1 - .../google-cloud-storage-1.117.1.jar.sha1 | 1 + .../google-http-client-1.35.0.jar.sha1 | 1 - .../google-http-client-1.39.2.jar.sha1 | 1 + ...ogle-http-client-appengine-1.35.0.jar.sha1 | 1 - ...ogle-http-client-appengine-1.39.2.jar.sha1 | 1 + .../google-http-client-gson-1.39.2.jar.sha1 | 1 + ...oogle-http-client-jackson2-1.35.0.jar.sha1 | 1 - ...oogle-http-client-jackson2-1.39.2.jar.sha1 | 1 + .../google-oauth-client-1.28.0.jar.sha1 | 1 - .../google-oauth-client-1.31.5.jar.sha1 | 1 + .../licenses/grpc-context-1.29.0.jar.sha1 | 1 - .../licenses/grpc-context-1.39.0.jar.sha1 | 1 + .../repository-gcs/licenses/gson-2.7.jar.sha1 | 1 - .../licenses/gson-2.8.7.jar.sha1 | 1 + .../licenses/guava-26.0-jre.jar.sha1 | 1 - .../licenses/guava-30.1.1-jre.jar.sha1 | 1 + .../licenses/opencensus-api-0.18.0.jar.sha1 | 1 - .../licenses/opencensus-api-0.28.0.jar.sha1 | 1 + ...encensus-contrib-http-util-0.18.0.jar.sha1 | 1 - ...encensus-contrib-http-util-0.28.0.jar.sha1 | 1 + ...proto-google-common-protos-1.16.0.jar.sha1 | 1 - .../proto-google-common-protos-2.3.2.jar.sha1 | 1 + .../proto-google-iam-v1-0.12.0.jar.sha1 | 1 - .../proto-google-iam-v1-1.0.14.jar.sha1 | 1 + .../licenses/protobuf-java-3.11.3.jar.sha1 | 1 - .../licenses/protobuf-java-3.17.3.jar.sha1 | 1 + .../protobuf-java-util-3.11.3.jar.sha1 | 1 - .../protobuf-java-util-3.17.3.jar.sha1 | 1 + .../licenses/threetenbp-1.4.4.jar.sha1 | 1 - .../licenses/threetenbp-1.5.1.jar.sha1 | 1 + ...CloudStorageBlobContainerRetriesTests.java | 14 ++ .../gcs/GoogleCloudStorageHttpHandler.java | 8 +- 55 files changed, 277 insertions(+), 54 deletions(-) create mode 100644 plugins/repository-gcs/licenses/api-common-1.10.4.jar.sha1 delete mode 100644 plugins/repository-gcs/licenses/api-common-1.8.1.jar.sha1 create mode 100644 plugins/repository-gcs/licenses/failureaccess-1.0.1.jar.sha1 create mode 100644 plugins/repository-gcs/licenses/failureaccess-LICENSE.txt create mode 100644 plugins/repository-gcs/licenses/failureaccess-NOTICE.txt delete mode 100644 plugins/repository-gcs/licenses/gax-1.54.0.jar.sha1 create mode 100644 plugins/repository-gcs/licenses/gax-1.66.0.jar.sha1 delete mode 100644 plugins/repository-gcs/licenses/gax-httpjson-0.62.0.jar.sha1 create mode 100644 plugins/repository-gcs/licenses/gax-httpjson-0.83.0.jar.sha1 delete mode 100644 plugins/repository-gcs/licenses/google-api-client-1.30.10.jar.sha1 create mode 100644 plugins/repository-gcs/licenses/google-api-client-1.32.1.jar.sha1 delete mode 100644 plugins/repository-gcs/licenses/google-api-services-storage-v1-rev20200814-1.30.10.jar.sha1 create mode 100644 plugins/repository-gcs/licenses/google-api-services-storage-v1-rev20210127-1.31.5.jar.sha1 delete mode 100644 plugins/repository-gcs/licenses/google-auth-library-credentials-0.20.0.jar.sha1 create mode 100644 plugins/repository-gcs/licenses/google-auth-library-credentials-0.26.0.jar.sha1 delete mode 100644 plugins/repository-gcs/licenses/google-auth-library-oauth2-http-0.20.0.jar.sha1 create mode 100644 plugins/repository-gcs/licenses/google-auth-library-oauth2-http-0.26.0.jar.sha1 delete mode 100644 plugins/repository-gcs/licenses/google-cloud-core-1.93.3.jar.sha1 create mode 100644 plugins/repository-gcs/licenses/google-cloud-core-1.95.4.jar.sha1 delete mode 100644 plugins/repository-gcs/licenses/google-cloud-core-http-1.93.3.jar.sha1 create mode 100644 plugins/repository-gcs/licenses/google-cloud-core-http-1.95.4.jar.sha1 delete mode 100644 plugins/repository-gcs/licenses/google-cloud-storage-1.113.1.jar.sha1 create mode 100644 plugins/repository-gcs/licenses/google-cloud-storage-1.117.1.jar.sha1 delete mode 100644 plugins/repository-gcs/licenses/google-http-client-1.35.0.jar.sha1 create mode 100644 plugins/repository-gcs/licenses/google-http-client-1.39.2.jar.sha1 delete mode 100644 plugins/repository-gcs/licenses/google-http-client-appengine-1.35.0.jar.sha1 create mode 100644 plugins/repository-gcs/licenses/google-http-client-appengine-1.39.2.jar.sha1 create mode 100644 plugins/repository-gcs/licenses/google-http-client-gson-1.39.2.jar.sha1 delete mode 100644 plugins/repository-gcs/licenses/google-http-client-jackson2-1.35.0.jar.sha1 create mode 100644 plugins/repository-gcs/licenses/google-http-client-jackson2-1.39.2.jar.sha1 delete mode 100644 plugins/repository-gcs/licenses/google-oauth-client-1.28.0.jar.sha1 create mode 100644 plugins/repository-gcs/licenses/google-oauth-client-1.31.5.jar.sha1 delete mode 100644 plugins/repository-gcs/licenses/grpc-context-1.29.0.jar.sha1 create mode 100644 plugins/repository-gcs/licenses/grpc-context-1.39.0.jar.sha1 delete mode 100644 plugins/repository-gcs/licenses/gson-2.7.jar.sha1 create mode 100644 plugins/repository-gcs/licenses/gson-2.8.7.jar.sha1 delete mode 100644 plugins/repository-gcs/licenses/guava-26.0-jre.jar.sha1 create mode 100644 plugins/repository-gcs/licenses/guava-30.1.1-jre.jar.sha1 delete mode 100644 plugins/repository-gcs/licenses/opencensus-api-0.18.0.jar.sha1 create mode 100644 plugins/repository-gcs/licenses/opencensus-api-0.28.0.jar.sha1 delete mode 100644 plugins/repository-gcs/licenses/opencensus-contrib-http-util-0.18.0.jar.sha1 create mode 100644 plugins/repository-gcs/licenses/opencensus-contrib-http-util-0.28.0.jar.sha1 delete mode 100644 plugins/repository-gcs/licenses/proto-google-common-protos-1.16.0.jar.sha1 create mode 100644 plugins/repository-gcs/licenses/proto-google-common-protos-2.3.2.jar.sha1 delete mode 100644 plugins/repository-gcs/licenses/proto-google-iam-v1-0.12.0.jar.sha1 create mode 100644 plugins/repository-gcs/licenses/proto-google-iam-v1-1.0.14.jar.sha1 delete mode 100644 plugins/repository-gcs/licenses/protobuf-java-3.11.3.jar.sha1 create mode 100644 plugins/repository-gcs/licenses/protobuf-java-3.17.3.jar.sha1 delete mode 100644 plugins/repository-gcs/licenses/protobuf-java-util-3.11.3.jar.sha1 create mode 100644 plugins/repository-gcs/licenses/protobuf-java-util-3.17.3.jar.sha1 delete mode 100644 plugins/repository-gcs/licenses/threetenbp-1.4.4.jar.sha1 create mode 100644 plugins/repository-gcs/licenses/threetenbp-1.5.1.jar.sha1 diff --git a/plugins/repository-gcs/build.gradle b/plugins/repository-gcs/build.gradle index b7b9d1b819124..0f71027870ea9 100644 --- a/plugins/repository-gcs/build.gradle +++ b/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', diff --git a/plugins/repository-gcs/licenses/api-common-1.10.4.jar.sha1 b/plugins/repository-gcs/licenses/api-common-1.10.4.jar.sha1 new file mode 100644 index 0000000000000..add76d71107e5 --- /dev/null +++ b/plugins/repository-gcs/licenses/api-common-1.10.4.jar.sha1 @@ -0,0 +1 @@ +650904f378415673cfc581fe5720ea9026dfd62d \ No newline at end of file diff --git a/plugins/repository-gcs/licenses/api-common-1.8.1.jar.sha1 b/plugins/repository-gcs/licenses/api-common-1.8.1.jar.sha1 deleted file mode 100644 index 7a1c114c6c0fc..0000000000000 --- a/plugins/repository-gcs/licenses/api-common-1.8.1.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -e89befb19b08ad84b262b2f226ab79aefcaa9d7f \ No newline at end of file diff --git a/plugins/repository-gcs/licenses/failureaccess-1.0.1.jar.sha1 b/plugins/repository-gcs/licenses/failureaccess-1.0.1.jar.sha1 new file mode 100644 index 0000000000000..4798b37e20691 --- /dev/null +++ b/plugins/repository-gcs/licenses/failureaccess-1.0.1.jar.sha1 @@ -0,0 +1 @@ +1dcf1de382a0bf95a3d8b0849546c88bac1292c9 \ No newline at end of file diff --git a/plugins/repository-gcs/licenses/failureaccess-LICENSE.txt b/plugins/repository-gcs/licenses/failureaccess-LICENSE.txt new file mode 100644 index 0000000000000..d645695673349 --- /dev/null +++ b/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. diff --git a/plugins/repository-gcs/licenses/failureaccess-NOTICE.txt b/plugins/repository-gcs/licenses/failureaccess-NOTICE.txt new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/plugins/repository-gcs/licenses/gax-1.54.0.jar.sha1 b/plugins/repository-gcs/licenses/gax-1.54.0.jar.sha1 deleted file mode 100644 index ed63c084f4edc..0000000000000 --- a/plugins/repository-gcs/licenses/gax-1.54.0.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -1f1668868b8b3fd5fc248d80c16dd9f09afc9180 \ No newline at end of file diff --git a/plugins/repository-gcs/licenses/gax-1.66.0.jar.sha1 b/plugins/repository-gcs/licenses/gax-1.66.0.jar.sha1 new file mode 100644 index 0000000000000..54ea55cb2d743 --- /dev/null +++ b/plugins/repository-gcs/licenses/gax-1.66.0.jar.sha1 @@ -0,0 +1 @@ +8320f0ee0dd4200ffd8abdf9f16a21f2b64ce9b2 \ No newline at end of file diff --git a/plugins/repository-gcs/licenses/gax-httpjson-0.62.0.jar.sha1 b/plugins/repository-gcs/licenses/gax-httpjson-0.62.0.jar.sha1 deleted file mode 100644 index 161ca85ccfc0c..0000000000000 --- a/plugins/repository-gcs/licenses/gax-httpjson-0.62.0.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -05a1a4736acd1c4f30304be953532be6aecdc2c9 \ No newline at end of file diff --git a/plugins/repository-gcs/licenses/gax-httpjson-0.83.0.jar.sha1 b/plugins/repository-gcs/licenses/gax-httpjson-0.83.0.jar.sha1 new file mode 100644 index 0000000000000..96bbc4cd0c73f --- /dev/null +++ b/plugins/repository-gcs/licenses/gax-httpjson-0.83.0.jar.sha1 @@ -0,0 +1 @@ +b9d8cf27c3ffd409402bee4d8458972ad8638ebc \ No newline at end of file diff --git a/plugins/repository-gcs/licenses/google-api-client-1.30.10.jar.sha1 b/plugins/repository-gcs/licenses/google-api-client-1.30.10.jar.sha1 deleted file mode 100644 index 62c51887ee1ea..0000000000000 --- a/plugins/repository-gcs/licenses/google-api-client-1.30.10.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -2de98417199785982e1f037fb8b52613f57175ae \ No newline at end of file diff --git a/plugins/repository-gcs/licenses/google-api-client-1.32.1.jar.sha1 b/plugins/repository-gcs/licenses/google-api-client-1.32.1.jar.sha1 new file mode 100644 index 0000000000000..2c7872e3226f7 --- /dev/null +++ b/plugins/repository-gcs/licenses/google-api-client-1.32.1.jar.sha1 @@ -0,0 +1 @@ +3e216f54e59e3c6f01bc52beeeed9010724e0edf \ No newline at end of file diff --git a/plugins/repository-gcs/licenses/google-api-services-storage-v1-rev20200814-1.30.10.jar.sha1 b/plugins/repository-gcs/licenses/google-api-services-storage-v1-rev20200814-1.30.10.jar.sha1 deleted file mode 100644 index e399aa5865413..0000000000000 --- a/plugins/repository-gcs/licenses/google-api-services-storage-v1-rev20200814-1.30.10.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -fe3b480958961fc7144da10ce3653065d5eb5490 \ No newline at end of file diff --git a/plugins/repository-gcs/licenses/google-api-services-storage-v1-rev20210127-1.31.5.jar.sha1 b/plugins/repository-gcs/licenses/google-api-services-storage-v1-rev20210127-1.31.5.jar.sha1 new file mode 100644 index 0000000000000..f0931d9855355 --- /dev/null +++ b/plugins/repository-gcs/licenses/google-api-services-storage-v1-rev20210127-1.31.5.jar.sha1 @@ -0,0 +1 @@ +721b04e4e41c7db323a9ed3fb240f58ee5adf3fe \ No newline at end of file diff --git a/plugins/repository-gcs/licenses/google-auth-library-credentials-0.20.0.jar.sha1 b/plugins/repository-gcs/licenses/google-auth-library-credentials-0.20.0.jar.sha1 deleted file mode 100644 index 14cc742737eed..0000000000000 --- a/plugins/repository-gcs/licenses/google-auth-library-credentials-0.20.0.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -87a91a373e64ba5c3cdf8cc5cf54b189dd1492f8 \ No newline at end of file diff --git a/plugins/repository-gcs/licenses/google-auth-library-credentials-0.26.0.jar.sha1 b/plugins/repository-gcs/licenses/google-auth-library-credentials-0.26.0.jar.sha1 new file mode 100644 index 0000000000000..edcd514c2530c --- /dev/null +++ b/plugins/repository-gcs/licenses/google-auth-library-credentials-0.26.0.jar.sha1 @@ -0,0 +1 @@ +da0919aae28fd57fb98057e3125040e31b582f5f \ No newline at end of file diff --git a/plugins/repository-gcs/licenses/google-auth-library-oauth2-http-0.20.0.jar.sha1 b/plugins/repository-gcs/licenses/google-auth-library-oauth2-http-0.20.0.jar.sha1 deleted file mode 100644 index 7911c34780cbe..0000000000000 --- a/plugins/repository-gcs/licenses/google-auth-library-oauth2-http-0.20.0.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -f33d4d6c91a68826816606a2208990eea93fcb2a \ No newline at end of file diff --git a/plugins/repository-gcs/licenses/google-auth-library-oauth2-http-0.26.0.jar.sha1 b/plugins/repository-gcs/licenses/google-auth-library-oauth2-http-0.26.0.jar.sha1 new file mode 100644 index 0000000000000..314d60821b1af --- /dev/null +++ b/plugins/repository-gcs/licenses/google-auth-library-oauth2-http-0.26.0.jar.sha1 @@ -0,0 +1 @@ +ea3e6869046df1e99abbf89b3417aac12f596743 \ No newline at end of file diff --git a/plugins/repository-gcs/licenses/google-cloud-core-1.93.3.jar.sha1 b/plugins/repository-gcs/licenses/google-cloud-core-1.93.3.jar.sha1 deleted file mode 100644 index fbbcf804bc541..0000000000000 --- a/plugins/repository-gcs/licenses/google-cloud-core-1.93.3.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -6fc017c0908456c0867d21c85d1b906662d4b5f1 \ No newline at end of file diff --git a/plugins/repository-gcs/licenses/google-cloud-core-1.95.4.jar.sha1 b/plugins/repository-gcs/licenses/google-cloud-core-1.95.4.jar.sha1 new file mode 100644 index 0000000000000..cea76be0bc514 --- /dev/null +++ b/plugins/repository-gcs/licenses/google-cloud-core-1.95.4.jar.sha1 @@ -0,0 +1 @@ +9120a006cd1fa2be027de951270d541bef8407f5 \ No newline at end of file diff --git a/plugins/repository-gcs/licenses/google-cloud-core-http-1.93.3.jar.sha1 b/plugins/repository-gcs/licenses/google-cloud-core-http-1.93.3.jar.sha1 deleted file mode 100644 index 0518072447569..0000000000000 --- a/plugins/repository-gcs/licenses/google-cloud-core-http-1.93.3.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -2589aa6a4b6c49811c08ec2803c8e9c79c410bc5 \ No newline at end of file diff --git a/plugins/repository-gcs/licenses/google-cloud-core-http-1.95.4.jar.sha1 b/plugins/repository-gcs/licenses/google-cloud-core-http-1.95.4.jar.sha1 new file mode 100644 index 0000000000000..6042eba8bec3c --- /dev/null +++ b/plugins/repository-gcs/licenses/google-cloud-core-http-1.95.4.jar.sha1 @@ -0,0 +1 @@ +0d705e4f7bd51093c4084507054303c2bd348bc9 \ No newline at end of file diff --git a/plugins/repository-gcs/licenses/google-cloud-storage-1.113.1.jar.sha1 b/plugins/repository-gcs/licenses/google-cloud-storage-1.113.1.jar.sha1 deleted file mode 100644 index 22fc078b36aa1..0000000000000 --- a/plugins/repository-gcs/licenses/google-cloud-storage-1.113.1.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -fd291ed57c1223bbb31363c4aa88c55faf0000c7 \ No newline at end of file diff --git a/plugins/repository-gcs/licenses/google-cloud-storage-1.117.1.jar.sha1 b/plugins/repository-gcs/licenses/google-cloud-storage-1.117.1.jar.sha1 new file mode 100644 index 0000000000000..7fc4ce2d8c2d7 --- /dev/null +++ b/plugins/repository-gcs/licenses/google-cloud-storage-1.117.1.jar.sha1 @@ -0,0 +1 @@ +59b9eceeda71799fe53d1391288b09c542110e02 \ No newline at end of file diff --git a/plugins/repository-gcs/licenses/google-http-client-1.35.0.jar.sha1 b/plugins/repository-gcs/licenses/google-http-client-1.35.0.jar.sha1 deleted file mode 100644 index 802a6ab3a8d04..0000000000000 --- a/plugins/repository-gcs/licenses/google-http-client-1.35.0.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -f2348dd57d5417c29388bd430f5055dca863c600 \ No newline at end of file diff --git a/plugins/repository-gcs/licenses/google-http-client-1.39.2.jar.sha1 b/plugins/repository-gcs/licenses/google-http-client-1.39.2.jar.sha1 new file mode 100644 index 0000000000000..4870e9606ee20 --- /dev/null +++ b/plugins/repository-gcs/licenses/google-http-client-1.39.2.jar.sha1 @@ -0,0 +1 @@ +5aafc3ff51693febf4214bb2a21baf577ce2fb25 \ No newline at end of file diff --git a/plugins/repository-gcs/licenses/google-http-client-appengine-1.35.0.jar.sha1 b/plugins/repository-gcs/licenses/google-http-client-appengine-1.35.0.jar.sha1 deleted file mode 100644 index 8bf444887d30f..0000000000000 --- a/plugins/repository-gcs/licenses/google-http-client-appengine-1.35.0.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -394d1e1376538931ec3d4eeed654f9da911b95eb \ No newline at end of file diff --git a/plugins/repository-gcs/licenses/google-http-client-appengine-1.39.2.jar.sha1 b/plugins/repository-gcs/licenses/google-http-client-appengine-1.39.2.jar.sha1 new file mode 100644 index 0000000000000..924db225f1ffa --- /dev/null +++ b/plugins/repository-gcs/licenses/google-http-client-appengine-1.39.2.jar.sha1 @@ -0,0 +1 @@ +22ba6d92fd2e5c0c9db01848941e2e8bd42943ca \ No newline at end of file diff --git a/plugins/repository-gcs/licenses/google-http-client-gson-1.39.2.jar.sha1 b/plugins/repository-gcs/licenses/google-http-client-gson-1.39.2.jar.sha1 new file mode 100644 index 0000000000000..aec0283e3edd1 --- /dev/null +++ b/plugins/repository-gcs/licenses/google-http-client-gson-1.39.2.jar.sha1 @@ -0,0 +1 @@ +43c1d0500c31ee31ff5918ac4bbe95711cd744a9 \ No newline at end of file diff --git a/plugins/repository-gcs/licenses/google-http-client-jackson2-1.35.0.jar.sha1 b/plugins/repository-gcs/licenses/google-http-client-jackson2-1.35.0.jar.sha1 deleted file mode 100644 index 0342f57779315..0000000000000 --- a/plugins/repository-gcs/licenses/google-http-client-jackson2-1.35.0.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -c1c2a08792b935f3345590783ada872f4a0997f1 \ No newline at end of file diff --git a/plugins/repository-gcs/licenses/google-http-client-jackson2-1.39.2.jar.sha1 b/plugins/repository-gcs/licenses/google-http-client-jackson2-1.39.2.jar.sha1 new file mode 100644 index 0000000000000..170ec10eaf5d2 --- /dev/null +++ b/plugins/repository-gcs/licenses/google-http-client-jackson2-1.39.2.jar.sha1 @@ -0,0 +1 @@ +4037ca41fe43989a5609158d4ed7a3973de5df36 \ No newline at end of file diff --git a/plugins/repository-gcs/licenses/google-oauth-client-1.28.0.jar.sha1 b/plugins/repository-gcs/licenses/google-oauth-client-1.28.0.jar.sha1 deleted file mode 100644 index 474df6e026570..0000000000000 --- a/plugins/repository-gcs/licenses/google-oauth-client-1.28.0.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -9a9e5d0c33b663d6475c96ce79b2949545a113af \ No newline at end of file diff --git a/plugins/repository-gcs/licenses/google-oauth-client-1.31.5.jar.sha1 b/plugins/repository-gcs/licenses/google-oauth-client-1.31.5.jar.sha1 new file mode 100644 index 0000000000000..51cec0db3b2e6 --- /dev/null +++ b/plugins/repository-gcs/licenses/google-oauth-client-1.31.5.jar.sha1 @@ -0,0 +1 @@ +a468e6b6d3d7de8310c3c9f4eb7cbb4eabde4404 \ No newline at end of file diff --git a/plugins/repository-gcs/licenses/grpc-context-1.29.0.jar.sha1 b/plugins/repository-gcs/licenses/grpc-context-1.29.0.jar.sha1 deleted file mode 100644 index a549827edd283..0000000000000 --- a/plugins/repository-gcs/licenses/grpc-context-1.29.0.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -1d8a441110f86f8927543dc3007639080441ea3c \ No newline at end of file diff --git a/plugins/repository-gcs/licenses/grpc-context-1.39.0.jar.sha1 b/plugins/repository-gcs/licenses/grpc-context-1.39.0.jar.sha1 new file mode 100644 index 0000000000000..8734ad2f10b57 --- /dev/null +++ b/plugins/repository-gcs/licenses/grpc-context-1.39.0.jar.sha1 @@ -0,0 +1 @@ +637f453f3654aa29bf085ae7ddc86f9f80c937dd \ No newline at end of file diff --git a/plugins/repository-gcs/licenses/gson-2.7.jar.sha1 b/plugins/repository-gcs/licenses/gson-2.7.jar.sha1 deleted file mode 100644 index b3433f306eb3f..0000000000000 --- a/plugins/repository-gcs/licenses/gson-2.7.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -751f548c85fa49f330cecbb1875893f971b33c4e \ No newline at end of file diff --git a/plugins/repository-gcs/licenses/gson-2.8.7.jar.sha1 b/plugins/repository-gcs/licenses/gson-2.8.7.jar.sha1 new file mode 100644 index 0000000000000..68af718a50e3c --- /dev/null +++ b/plugins/repository-gcs/licenses/gson-2.8.7.jar.sha1 @@ -0,0 +1 @@ +69d9503ea0a40ee16f0bcdac7e3eaf83d0fa914a \ No newline at end of file diff --git a/plugins/repository-gcs/licenses/guava-26.0-jre.jar.sha1 b/plugins/repository-gcs/licenses/guava-26.0-jre.jar.sha1 deleted file mode 100644 index 63d05007650ce..0000000000000 --- a/plugins/repository-gcs/licenses/guava-26.0-jre.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -6a806eff209f36f635f943e16d97491f00f6bfab \ No newline at end of file diff --git a/plugins/repository-gcs/licenses/guava-30.1.1-jre.jar.sha1 b/plugins/repository-gcs/licenses/guava-30.1.1-jre.jar.sha1 new file mode 100644 index 0000000000000..39e641fc7834f --- /dev/null +++ b/plugins/repository-gcs/licenses/guava-30.1.1-jre.jar.sha1 @@ -0,0 +1 @@ +87e0fd1df874ea3cbe577702fe6f17068b790fd8 \ No newline at end of file diff --git a/plugins/repository-gcs/licenses/opencensus-api-0.18.0.jar.sha1 b/plugins/repository-gcs/licenses/opencensus-api-0.18.0.jar.sha1 deleted file mode 100644 index 8b95ab4e4c49c..0000000000000 --- a/plugins/repository-gcs/licenses/opencensus-api-0.18.0.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -b89a8f8dfd1e1e0d68d83c82a855624814b19a6e \ No newline at end of file diff --git a/plugins/repository-gcs/licenses/opencensus-api-0.28.0.jar.sha1 b/plugins/repository-gcs/licenses/opencensus-api-0.28.0.jar.sha1 new file mode 100644 index 0000000000000..e7e2d46fd074c --- /dev/null +++ b/plugins/repository-gcs/licenses/opencensus-api-0.28.0.jar.sha1 @@ -0,0 +1 @@ +0fc0d06a9d975a38c581dff59b99cf31db78bd99 \ No newline at end of file diff --git a/plugins/repository-gcs/licenses/opencensus-contrib-http-util-0.18.0.jar.sha1 b/plugins/repository-gcs/licenses/opencensus-contrib-http-util-0.18.0.jar.sha1 deleted file mode 100644 index 1757e00591110..0000000000000 --- a/plugins/repository-gcs/licenses/opencensus-contrib-http-util-0.18.0.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -76a37e4a931d5801a9e25b0c0353e5f37c4d1e8e \ No newline at end of file diff --git a/plugins/repository-gcs/licenses/opencensus-contrib-http-util-0.28.0.jar.sha1 b/plugins/repository-gcs/licenses/opencensus-contrib-http-util-0.28.0.jar.sha1 new file mode 100644 index 0000000000000..164fa23ede758 --- /dev/null +++ b/plugins/repository-gcs/licenses/opencensus-contrib-http-util-0.28.0.jar.sha1 @@ -0,0 +1 @@ +f6cb276330197d51dd65327fc305a3df7e622705 \ No newline at end of file diff --git a/plugins/repository-gcs/licenses/proto-google-common-protos-1.16.0.jar.sha1 b/plugins/repository-gcs/licenses/proto-google-common-protos-1.16.0.jar.sha1 deleted file mode 100644 index 7762b7a3ebdc3..0000000000000 --- a/plugins/repository-gcs/licenses/proto-google-common-protos-1.16.0.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -2c5f022ea3b8e8df6a619c4cd8faf9af86022daa \ No newline at end of file diff --git a/plugins/repository-gcs/licenses/proto-google-common-protos-2.3.2.jar.sha1 b/plugins/repository-gcs/licenses/proto-google-common-protos-2.3.2.jar.sha1 new file mode 100644 index 0000000000000..789e467a3f74d --- /dev/null +++ b/plugins/repository-gcs/licenses/proto-google-common-protos-2.3.2.jar.sha1 @@ -0,0 +1 @@ +a35fd6ed973f752604fce97a21eb1e09d6afc467 \ No newline at end of file diff --git a/plugins/repository-gcs/licenses/proto-google-iam-v1-0.12.0.jar.sha1 b/plugins/repository-gcs/licenses/proto-google-iam-v1-0.12.0.jar.sha1 deleted file mode 100644 index 2bfae3456d499..0000000000000 --- a/plugins/repository-gcs/licenses/proto-google-iam-v1-0.12.0.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -ea312c0250a5d0a7cdd1b20bc2c3259938b79855 \ No newline at end of file diff --git a/plugins/repository-gcs/licenses/proto-google-iam-v1-1.0.14.jar.sha1 b/plugins/repository-gcs/licenses/proto-google-iam-v1-1.0.14.jar.sha1 new file mode 100644 index 0000000000000..c74b581d09d1b --- /dev/null +++ b/plugins/repository-gcs/licenses/proto-google-iam-v1-1.0.14.jar.sha1 @@ -0,0 +1 @@ +6bc86a81d4bd99bfb54e9591b8de3ccd515fde78 \ No newline at end of file diff --git a/plugins/repository-gcs/licenses/protobuf-java-3.11.3.jar.sha1 b/plugins/repository-gcs/licenses/protobuf-java-3.11.3.jar.sha1 deleted file mode 100644 index 371f423c3751e..0000000000000 --- a/plugins/repository-gcs/licenses/protobuf-java-3.11.3.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -df12be70b968e32442821a2cfdc3cede5a42dec5 \ No newline at end of file diff --git a/plugins/repository-gcs/licenses/protobuf-java-3.17.3.jar.sha1 b/plugins/repository-gcs/licenses/protobuf-java-3.17.3.jar.sha1 new file mode 100644 index 0000000000000..e8afe3160abf6 --- /dev/null +++ b/plugins/repository-gcs/licenses/protobuf-java-3.17.3.jar.sha1 @@ -0,0 +1 @@ +313b1861fa9312dd71e1033a77c2e64fb1a94dd3 \ No newline at end of file diff --git a/plugins/repository-gcs/licenses/protobuf-java-util-3.11.3.jar.sha1 b/plugins/repository-gcs/licenses/protobuf-java-util-3.11.3.jar.sha1 deleted file mode 100644 index 8f8d3cf3c9e49..0000000000000 --- a/plugins/repository-gcs/licenses/protobuf-java-util-3.11.3.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -fd4ba2dfeb1b010eb20ca27e65fbfb74fbbdcdb9 \ No newline at end of file diff --git a/plugins/repository-gcs/licenses/protobuf-java-util-3.17.3.jar.sha1 b/plugins/repository-gcs/licenses/protobuf-java-util-3.17.3.jar.sha1 new file mode 100644 index 0000000000000..b130d7fb53c84 --- /dev/null +++ b/plugins/repository-gcs/licenses/protobuf-java-util-3.17.3.jar.sha1 @@ -0,0 +1 @@ +4340f06a346f46eab1b38feb066e4a2d30aed3b7 \ No newline at end of file diff --git a/plugins/repository-gcs/licenses/threetenbp-1.4.4.jar.sha1 b/plugins/repository-gcs/licenses/threetenbp-1.4.4.jar.sha1 deleted file mode 100644 index 0f7ee08a6d2fc..0000000000000 --- a/plugins/repository-gcs/licenses/threetenbp-1.4.4.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -bbe3cc15e8ea16863435009af8ca40dd97770240 \ No newline at end of file diff --git a/plugins/repository-gcs/licenses/threetenbp-1.5.1.jar.sha1 b/plugins/repository-gcs/licenses/threetenbp-1.5.1.jar.sha1 new file mode 100644 index 0000000000000..5640b4c080ff3 --- /dev/null +++ b/plugins/repository-gcs/licenses/threetenbp-1.5.1.jar.sha1 @@ -0,0 +1 @@ +4307ad2fdd4ba8b5ecd3fdb88b932aa49fa25920 \ No newline at end of file diff --git a/plugins/repository-gcs/src/test/java/org/elasticsearch/repositories/gcs/GoogleCloudStorageBlobContainerRetriesTests.java b/plugins/repository-gcs/src/test/java/org/elasticsearch/repositories/gcs/GoogleCloudStorageBlobContainerRetriesTests.java index b44cdde3d40ff..4940814f75ede 100644 --- a/plugins/repository-gcs/src/test/java/org/elasticsearch/repositories/gcs/GoogleCloudStorageBlobContainerRetriesTests.java +++ b/plugins/repository-gcs/src/test/java/org/elasticsearch/repositories/gcs/GoogleCloudStorageBlobContainerRetriesTests.java @@ -256,6 +256,7 @@ public void testWriteLargeBlob() throws IOException { 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 sessionUploadId = new AtomicReference<>(UUIDs.randomBase64UUID()); @@ -306,6 +307,7 @@ public void testWriteLargeBlob() throws IOException { // 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 void testWriteLargeBlob() throws IOException { 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) { diff --git a/test/fixtures/gcs-fixture/src/main/java/fixture/gcs/GoogleCloudStorageHttpHandler.java b/test/fixtures/gcs-fixture/src/main/java/fixture/gcs/GoogleCloudStorageHttpHandler.java index aee7e0a760478..98d55f5cec5cf 100644 --- a/test/fixtures/gcs-fixture/src/main/java/fixture/gcs/GoogleCloudStorageHttpHandler.java +++ b/test/fixtures/gcs-fixture/src/main/java/fixture/gcs/GoogleCloudStorageHttpHandler.java @@ -237,14 +237,16 @@ public void handle(final HttpExchange exchange) throws IOException { 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 {