From 587df3b1988441acf3cf86983aa096f7b50d151f Mon Sep 17 00:00:00 2001 From: Burak Date: Thu, 17 Oct 2024 15:16:47 +0100 Subject: [PATCH] Update CRT submodules to latest releases (#1069) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Update CRT submodules to latest releases Signed-off-by: Burak Varlı * Update non-existent network interface initialization test CRT was returning error during first operation before if it provided with a non-existent network interface name. But with https://github.com/awslabs/aws-c-s3/pull/456, it started failing during the client creation phase. Our tests were written for the previous behaviour and was expecting client creation to succeed even with an invalid network interface. The test is updated to expect errors during client creation. Signed-off-by: Burak Varlı * Update CHANGELOG Co-authored-by: Monthon Klongklaew Signed-off-by: Burak --------- Signed-off-by: Burak Varlı Signed-off-by: Burak Co-authored-by: Monthon Klongklaew --- mountpoint-s3-client/CHANGELOG.md | 1 + .../tests/network_interface_config.rs | 31 +++---------------- mountpoint-s3-crt-sys/crt/aws-c-common | 2 +- mountpoint-s3-crt-sys/crt/aws-c-io | 2 +- mountpoint-s3-crt-sys/crt/aws-c-s3 | 2 +- 5 files changed, 9 insertions(+), 29 deletions(-) diff --git a/mountpoint-s3-client/CHANGELOG.md b/mountpoint-s3-client/CHANGELOG.md index e43a6da42..3d694d051 100644 --- a/mountpoint-s3-client/CHANGELOG.md +++ b/mountpoint-s3-client/CHANGELOG.md @@ -8,6 +8,7 @@ * Address a threading issue in the s2n-tls library that could result in premature cleanup and `NULL pointer` errors. ([aws/s2n-tls#4584](https://github.com/aws/s2n-tls/pull/4584)) * Inaccurate reporting of `s3.client.buffer_pool.primary_allocated` CRT statistic is fixed. ([awslabs/aws-c-s3#453](https://github.com/awslabs/aws-c-s3/pull/453)) * Expose `s3.client.buffer_pool.forced_used` metric which account for buffer allocations that could exceed memory limit in the CRT buffer pool. ([#1025](https://github.com/awslabs/mountpoint-s3/pull/1025)) +* The `400 RequestTimeout` error is now treated as retryable. ([awslabs/aws-c-s3#457](https://github.com/awslabs/aws-c-s3/pull/457)) ## v0.10.0 (September 12, 2024) diff --git a/mountpoint-s3-client/tests/network_interface_config.rs b/mountpoint-s3-client/tests/network_interface_config.rs index c42b5e83e..f310ff622 100644 --- a/mountpoint-s3-client/tests/network_interface_config.rs +++ b/mountpoint-s3-client/tests/network_interface_config.rs @@ -6,7 +6,7 @@ use test_case::test_case; use common::*; use mountpoint_s3_client::config::{EndpointConfig, S3ClientConfig}; -use mountpoint_s3_client::error::{HeadObjectError, ObjectClientError::ClientError, ObjectClientError::ServiceError}; +use mountpoint_s3_client::error::{HeadObjectError, ObjectClientError::ServiceError}; use mountpoint_s3_client::{ObjectClient, S3CrtClient}; #[tokio::test] @@ -52,17 +52,11 @@ async fn test_one_interface_ok() { ); } -/// This test demonstrates how the S3 client will fail today when configured with bad network interfaces. -/// The behavior isn't great, but this documents what happens. -/// -/// TODO: How can we get to a point where S3 client creation fails when invalid interface names are provided? +/// This test demonstrates how the S3 client creation will fail today when configured with bad network interfaces. #[test_case(true; "with one valid interface")] #[test_case(false; "without any valid interface")] #[tokio::test] async fn test_nonexistent(with_valid_interface: bool) { - let (bucket, prefix) = get_test_bucket_and_prefix("test_empty_list"); - let key = format!("{prefix}/no-such-key"); - let primary_interface = get_primary_interface_name(); let non_existent_interface = String::from("none0"); let interface_names = if with_valid_interface { @@ -73,24 +67,9 @@ async fn test_nonexistent(with_valid_interface: bool) { let config = S3ClientConfig::new() .endpoint_config(EndpointConfig::new(&get_test_region())) .network_interface_names(interface_names); - let client = S3CrtClient::new(config).expect("client should create OK"); - - let mut socket_creation_failure = None; - for _ in 0..10 { - // It probably should only need two requests (round robin), but let's just do up to 10 if needed. - let err = client - .head_object(&bucket, &key) - .await - .expect_err("head_object should always fail as the object or the network interface didn't exist"); - if let ClientError(_) = &err { - let error_message = format!("{err:?}"); - if error_message.contains("AWS_IO_SOCKET_INVALID_OPTIONS") { - socket_creation_failure = Some(err); - break; - } - } - } - socket_creation_failure.expect("crt should return error on socket creation for non-existent interface"); + S3CrtClient::new(config).expect_err( + "CRT should return an error during client creation if provided with non-existent network interface", + ); } /// Retrieve the primary interface name used to route internet traffic. diff --git a/mountpoint-s3-crt-sys/crt/aws-c-common b/mountpoint-s3-crt-sys/crt/aws-c-common index f8c5d8e51..f58e807d8 160000 --- a/mountpoint-s3-crt-sys/crt/aws-c-common +++ b/mountpoint-s3-crt-sys/crt/aws-c-common @@ -1 +1 @@ -Subproject commit f8c5d8e5134fa97955351a44f16b84f96de24045 +Subproject commit f58e807d8fd643bd9a96eef182c1db37d01b88e7 diff --git a/mountpoint-s3-crt-sys/crt/aws-c-io b/mountpoint-s3-crt-sys/crt/aws-c-io index dc41ddc49..e36374047 160000 --- a/mountpoint-s3-crt-sys/crt/aws-c-io +++ b/mountpoint-s3-crt-sys/crt/aws-c-io @@ -1 +1 @@ -Subproject commit dc41ddc498c10ebbf69aba7775afa36c8c1910bd +Subproject commit e36374047beadc72a0eb6df14ce3cbc822a789a3 diff --git a/mountpoint-s3-crt-sys/crt/aws-c-s3 b/mountpoint-s3-crt-sys/crt/aws-c-s3 index ab70f7429..16701501f 160000 --- a/mountpoint-s3-crt-sys/crt/aws-c-s3 +++ b/mountpoint-s3-crt-sys/crt/aws-c-s3 @@ -1 +1 @@ -Subproject commit ab70f742962131f1d024deb794d86f210bfa4252 +Subproject commit 16701501fa9d1684b0ff5406211d058ce2a5b404