Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update CRT submodules to latest releases #1069

Merged
merged 3 commits into from
Oct 17, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions mountpoint-s3-client/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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))
* Retry RequestTimeout error by S3. ([awslabs/aws-c-s3#457](https://github.com/awslabs/aws-c-s3/pull/457))
unexge marked this conversation as resolved.
Show resolved Hide resolved

## v0.10.0 (September 12, 2024)

Expand Down
31 changes: 5 additions & 26 deletions mountpoint-s3-client/tests/network_interface_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down Expand Up @@ -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 {
Expand All @@ -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.
Expand Down
Loading