diff --git a/docs/plugins/repository-s3.asciidoc b/docs/plugins/repository-s3.asciidoc index 8191b00f9d92d..cb7cc67ddbce9 100644 --- a/docs/plugins/repository-s3.asciidoc +++ b/docs/plugins/repository-s3.asciidoc @@ -111,7 +111,7 @@ are marked as `Secure`. `use_throttle_retries`:: - Whether retries should be throttled (ie use backoff). Must be `true` or `false`. Defaults to `false`. + Whether retries should be throttled (ie use backoff). Must be `true` or `false`. Defaults to `true`. [[repository-s3-repository]] ==== Repository Settings diff --git a/plugins/repository-s3/build.gradle b/plugins/repository-s3/build.gradle index e8c7326dee97b..7071307fbc3c2 100644 --- a/plugins/repository-s3/build.gradle +++ b/plugins/repository-s3/build.gradle @@ -23,7 +23,7 @@ esplugin { } versions << [ - 'aws': '1.10.69' + 'aws': '1.11.223' ] dependencies { @@ -76,6 +76,15 @@ thirdPartyAudit.excludes = [ 'org.apache.avalon.framework.logger.Logger', 'org.apache.log.Hierarchy', 'org.apache.log.Logger', + 'software.amazon.ion.IonReader', + 'software.amazon.ion.IonSystem', + 'software.amazon.ion.IonType', + 'software.amazon.ion.IonWriter', + 'software.amazon.ion.Timestamp', + 'software.amazon.ion.system.IonBinaryWriterBuilder', + 'software.amazon.ion.system.IonSystemBuilder', + 'software.amazon.ion.system.IonTextWriterBuilder', + 'software.amazon.ion.system.IonWriterBuilder', ] // jarhell with jdk (intentionally, because jaxb was removed from default modules in java 9) diff --git a/plugins/repository-s3/licenses/aws-java-sdk-core-1.10.69.jar.sha1 b/plugins/repository-s3/licenses/aws-java-sdk-core-1.10.69.jar.sha1 deleted file mode 100644 index 2971a33d7d91b..0000000000000 --- a/plugins/repository-s3/licenses/aws-java-sdk-core-1.10.69.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -a1f02d5f26ba1d8c37e2bf9c847db3c6729dda00 \ No newline at end of file diff --git a/plugins/repository-s3/licenses/aws-java-sdk-core-1.11.223.jar.sha1 b/plugins/repository-s3/licenses/aws-java-sdk-core-1.11.223.jar.sha1 new file mode 100644 index 0000000000000..9890dd8d600b3 --- /dev/null +++ b/plugins/repository-s3/licenses/aws-java-sdk-core-1.11.223.jar.sha1 @@ -0,0 +1 @@ +c3993cb44f5856fa721b7b7ccfc266377c0bf9c0 \ No newline at end of file diff --git a/plugins/repository-s3/licenses/aws-java-sdk-kms-1.10.69.jar.sha1 b/plugins/repository-s3/licenses/aws-java-sdk-kms-1.10.69.jar.sha1 deleted file mode 100644 index 22e1f924664fa..0000000000000 --- a/plugins/repository-s3/licenses/aws-java-sdk-kms-1.10.69.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -ed74ff3872193b4704a751f0b72ab2cf0db0651b \ No newline at end of file diff --git a/plugins/repository-s3/licenses/aws-java-sdk-kms-1.11.223.jar.sha1 b/plugins/repository-s3/licenses/aws-java-sdk-kms-1.11.223.jar.sha1 new file mode 100644 index 0000000000000..d5bc9d30308dc --- /dev/null +++ b/plugins/repository-s3/licenses/aws-java-sdk-kms-1.11.223.jar.sha1 @@ -0,0 +1 @@ +c24e6ebe108c60a08098aeaad5ae0b6a5a77b618 \ No newline at end of file diff --git a/plugins/repository-s3/licenses/aws-java-sdk-s3-1.10.69.jar.sha1 b/plugins/repository-s3/licenses/aws-java-sdk-s3-1.10.69.jar.sha1 deleted file mode 100644 index 64e7336c2bc91..0000000000000 --- a/plugins/repository-s3/licenses/aws-java-sdk-s3-1.10.69.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -6fa48bf0bff43f26436956b88d8d3764b6cf109e \ No newline at end of file diff --git a/plugins/repository-s3/licenses/aws-java-sdk-s3-1.11.223.jar.sha1 b/plugins/repository-s3/licenses/aws-java-sdk-s3-1.11.223.jar.sha1 new file mode 100644 index 0000000000000..fe12b2d4847fa --- /dev/null +++ b/plugins/repository-s3/licenses/aws-java-sdk-s3-1.11.223.jar.sha1 @@ -0,0 +1 @@ +c2ef96732e22d97952fbcd0a94f1dc376d157eda \ No newline at end of file diff --git a/plugins/repository-s3/src/test/java/org/elasticsearch/repositories/s3/AmazonS3Wrapper.java b/plugins/repository-s3/src/test/java/org/elasticsearch/repositories/s3/AmazonS3Wrapper.java index 2ce64d5c6fc83..bcab130e7d531 100644 --- a/plugins/repository-s3/src/test/java/org/elasticsearch/repositories/s3/AmazonS3Wrapper.java +++ b/plugins/repository-s3/src/test/java/org/elasticsearch/repositories/s3/AmazonS3Wrapper.java @@ -24,6 +24,7 @@ import com.amazonaws.AmazonWebServiceRequest; import com.amazonaws.HttpMethod; import com.amazonaws.regions.Region; +import com.amazonaws.services.s3.AbstractAmazonS3; import com.amazonaws.services.s3.AmazonS3; import com.amazonaws.services.s3.S3ClientOptions; import com.amazonaws.services.s3.S3ResponseMetadata; @@ -118,7 +119,7 @@ import java.util.List; @SuppressForbidden(reason = "implements AWS api that uses java.io.File!") -public class AmazonS3Wrapper implements AmazonS3 { +public class AmazonS3Wrapper extends AbstractAmazonS3 { protected AmazonS3 delegate; @@ -126,7 +127,6 @@ public AmazonS3Wrapper(AmazonS3 delegate) { this.delegate = delegate; } - @Override public void setEndpoint(String endpoint) { delegate.setEndpoint(endpoint); diff --git a/plugins/repository-s3/src/test/java/org/elasticsearch/repositories/s3/AwsS3ServiceImplTests.java b/plugins/repository-s3/src/test/java/org/elasticsearch/repositories/s3/AwsS3ServiceImplTests.java index 9863402ec37c1..f85f2eb6f322f 100644 --- a/plugins/repository-s3/src/test/java/org/elasticsearch/repositories/s3/AwsS3ServiceImplTests.java +++ b/plugins/repository-s3/src/test/java/org/elasticsearch/repositories/s3/AwsS3ServiceImplTests.java @@ -95,8 +95,8 @@ private void assertCredentials(Settings singleRepositorySettings, Settings setti } public void testAWSDefaultConfiguration() { - launchAWSConfigurationTest(Settings.EMPTY, Settings.EMPTY, Protocol.HTTPS, null, -1, null, null, 3, false, - ClientConfiguration.DEFAULT_SOCKET_TIMEOUT); + launchAWSConfigurationTest(Settings.EMPTY, Settings.EMPTY, Protocol.HTTPS, null, -1, null, null, 3, + ClientConfiguration.DEFAULT_THROTTLE_RETRIES, ClientConfiguration.DEFAULT_SOCKET_TIMEOUT); } public void testAWSConfigurationWithAwsSettings() { @@ -111,7 +111,7 @@ public void testAWSConfigurationWithAwsSettings() { .put("s3.client.default.read_timeout", "10s") .build(); launchAWSConfigurationTest(settings, Settings.EMPTY, Protocol.HTTP, "aws_proxy_host", 8080, "aws_proxy_username", - "aws_proxy_password", 3, false, 10000); + "aws_proxy_password", 3, ClientConfiguration.DEFAULT_THROTTLE_RETRIES, 10000); } public void testRepositoryMaxRetries() { @@ -119,15 +119,14 @@ public void testRepositoryMaxRetries() { .put("s3.client.default.max_retries", 5) .build(); launchAWSConfigurationTest(settings, Settings.EMPTY, Protocol.HTTPS, null, -1, null, - null, 5, false, 50000); + null, 5, ClientConfiguration.DEFAULT_THROTTLE_RETRIES, 50000); } public void testRepositoryThrottleRetries() { - Settings settings = Settings.builder() - .put("s3.client.default.use_throttle_retries", true) - .build(); - launchAWSConfigurationTest(settings, Settings.EMPTY, Protocol.HTTPS, null, -1, null, - null, 3, true, 50000); + final boolean throttling = randomBoolean(); + + Settings settings = Settings.builder().put("s3.client.default.use_throttle_retries", throttling).build(); + launchAWSConfigurationTest(settings, Settings.EMPTY, Protocol.HTTPS, null, -1, null, null, 3, throttling, 50000); } private void launchAWSConfigurationTest(Settings settings,