Compare commits

..

2 Commits

Author SHA1 Message Date
Arpad Müller
790ac8a552 Merge branch 'main' into arpad/endpoint_azure 2024-11-25 13:13:36 +01:00
Arpad Müller
bb839903f8 Allow configuring the endpoint for Azure 2024-11-25 12:57:52 +01:00
4 changed files with 1 additions and 16 deletions

1
Cargo.lock generated
View File

@@ -4861,7 +4861,6 @@ dependencies = [
"once_cell",
"pin-project-lite",
"rand 0.8.5",
"reqwest 0.11.19",
"scopeguard",
"serde",
"serde_json",

View File

@@ -18,7 +18,6 @@ camino = { workspace = true, features = ["serde1"] }
humantime-serde.workspace = true
hyper = { workspace = true, features = ["client"] }
futures.workspace = true
reqwest = { version = "0.11", default-features = false, features = ["rustls-tls"] }
serde.workspace = true
serde_json.workspace = true
tokio = { workspace = true, features = ["sync", "fs", "io-util"] }

View File

@@ -15,8 +15,6 @@ use std::time::SystemTime;
use super::REMOTE_STORAGE_PREFIX_SEPARATOR;
use anyhow::Result;
use azure_core::request_options::{IfMatchCondition, MaxResults, Metadata, Range};
use azure_core::HttpClient;
use azure_core::TransportOptions;
use azure_core::{Continuable, RetryOptions};
use azure_identity::DefaultAzureCredential;
use azure_storage::CloudLocation;
@@ -84,8 +82,7 @@ impl AzureBlobStorage {
};
let builder = ClientBuilder::with_location(location, credentials)
// we have an outer retry
.retry(RetryOptions::none())
.transport(TransportOptions::new(reqwest_client(true)));
.retry(RetryOptions::none());
let client = builder.container_client(azure_config.container_name.to_owned());
@@ -258,15 +255,6 @@ impl AzureBlobStorage {
}
}
fn reqwest_client(allow_idle_connections: bool) -> Arc<dyn HttpClient> {
let max_idle = if allow_idle_connections { 8 } else { 0 };
let client = reqwest::ClientBuilder::new()
.pool_max_idle_per_host(max_idle)
.build()
.expect("failed to build `reqwest` client");
Arc::new(client)
}
fn to_azure_metadata(metadata: StorageMetadata) -> Metadata {
let mut res = Metadata::new();
for (k, v) in metadata.0.into_iter() {

View File

@@ -216,7 +216,6 @@ async fn create_azure_client(
storage_account: None,
container_region: remote_storage_azure_region,
prefix_in_container: Some(format!("test_{millis}_{random:08x}/")),
endpoint: None,
concurrency_limit: NonZeroUsize::new(100).unwrap(),
max_keys_per_list_response,
}),