Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
3 changes: 2 additions & 1 deletion .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ on:
pull_request:

jobs:

# Run cargo fmt for all crates
lint:
name: Lint (cargo fmt)
Expand Down Expand Up @@ -60,6 +59,8 @@ jobs:
cargo update -p tokio --precise 1.29.1
cargo update -p url --precise 2.5.0
cargo update -p once_cell --precise 1.20.3
cargo update -p tracing-core --precise 0.1.33
cargo update -p tracing-attributes --precise 0.1.28
- name: Check
run: |
# run `cargo msrv verify` to see problems
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ http-body-util = { version = "0.1.2", optional = true }
httparse = { version = "1.8.0", default-features = false, features = ["std"], optional = true }
hyper = { version = "1.2", default-features = false, optional = true }
md-5 = { version = "0.10.6", default-features = false, optional = true }
quick-xml = { version = "0.37.0", features = ["serialize", "overlapped-lists"], optional = true }
quick-xml = { version = "0.38.0", features = ["serialize", "overlapped-lists"], optional = true }
rand = { version = "0.9", default-features = false, features = ["std", "std_rng", "thread_rng"], optional = true }
reqwest = { version = "0.12", default-features = false, features = ["rustls-tls-native-roots", "http2"], optional = true }
ring = { version = "0.17", default-features = false, features = ["std"], optional = true }
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,6 @@ Planned Release Schedule

| Approximate Date | Version | Notes | Ticket |
|------------------|----------|--------------------------------|:-------------------------------------------------------------------|
| June 2025 | `0.12.2` | Minor, NO breaking API changes | [#307](https://github.com/apache/arrow-rs-object-store/issues/307) |
| June 2025 | `0.13.0` | Major, breaking API changes | [#367](https://github.com/apache/arrow-rs-object-store/issues/367) |
| July 2025 | `0.12.3` | Minor, NO breaking API changes | [#428](https://github.com/apache/arrow-rs-object-store/issues/428) |
| TBD | `0.13.0` | Major, breaking API changes | [#367](https://github.com/apache/arrow-rs-object-store/issues/367) |
| TBD | `0.13.1` | Minor, NO breaking API changes | [#393](https://github.com/apache/arrow-rs-object-store/issues/393) |
4 changes: 2 additions & 2 deletions src/aws/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1587,7 +1587,7 @@ mod tests {
config_key
);
} else {
panic!("{} not propagated as ClientConfigKey", key);
panic!("{key} not propagated as ClientConfigKey");
}
}

Expand All @@ -1606,7 +1606,7 @@ mod tests {

let s3 = builder.build().expect("should build successfully");
let creds = &s3.client.config.credentials;
let debug_str = format!("{:?}", creds);
let debug_str = format!("{creds:?}");
assert!(
debug_str.contains("EKSPodCredentialProvider"),
"expected EKS provider but got: {debug_str}"
Expand Down
8 changes: 4 additions & 4 deletions src/aws/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ use crate::client::{GetOptionsExt, HttpClient, HttpError, HttpResponse};
use crate::list::{PaginatedListOptions, PaginatedListResult};
use crate::multipart::PartId;
use crate::{
Attribute, Attributes, ClientOptions, GetOptions, MultipartId, Path, PutMultipartOpts,
Attribute, Attributes, ClientOptions, GetOptions, MultipartId, Path, PutMultipartOptions,
PutPayload, PutResult, Result, RetryConfig, TagSet,
};
use async_trait::async_trait;
Expand Down Expand Up @@ -375,7 +375,7 @@ impl Request<'_> {
builder.header(CONTENT_TYPE, v.as_ref())
}
Attribute::Metadata(k_suffix) => builder.header(
&format!("{}{}", USER_DEFINED_METADATA_HEADER_PREFIX, k_suffix),
&format!("{USER_DEFINED_METADATA_HEADER_PREFIX}{k_suffix}"),
v.as_ref(),
),
};
Expand Down Expand Up @@ -631,9 +631,9 @@ impl S3Client {
pub(crate) async fn create_multipart(
&self,
location: &Path,
opts: PutMultipartOpts,
opts: PutMultipartOptions,
) -> Result<MultipartId> {
let PutMultipartOpts {
let PutMultipartOptions {
tags,
attributes,
extensions,
Expand Down
2 changes: 1 addition & 1 deletion src/aws/credential.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1284,7 +1284,7 @@ mod tests {
token: Some("temp_token".to_string()),
};

let debug_output = format!("{:?}", cred);
let debug_output = format!("{cred:?}");

assert!(debug_output.contains("key_id: \"AKIAXXX\""));
assert!(debug_output.contains("secret_key: \"******\""));
Expand Down
12 changes: 6 additions & 6 deletions src/aws/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ use crate::signer::Signer;
use crate::util::STRICT_ENCODE_SET;
use crate::{
Error, GetOptions, GetResult, ListResult, MultipartId, MultipartUpload, ObjectMeta,
ObjectStore, Path, PutMode, PutMultipartOpts, PutOptions, PutPayload, PutResult, Result,
ObjectStore, Path, PutMode, PutMultipartOptions, PutOptions, PutPayload, PutResult, Result,
UploadPart,
};

Expand Down Expand Up @@ -245,7 +245,7 @@ impl ObjectStore for AmazonS3 {
async fn put_multipart_opts(
&self,
location: &Path,
opts: PutMultipartOpts,
opts: PutMultipartOptions,
) -> Result<Box<dyn MultipartUpload>> {
let upload_id = self.client.create_multipart(location, opts).await?;

Expand Down Expand Up @@ -331,7 +331,7 @@ impl ObjectStore for AmazonS3 {
Some(S3CopyIfNotExists::Multipart) => {
let upload_id = self
.client
.create_multipart(to, PutMultipartOpts::default())
.create_multipart(to, PutMultipartOptions::default())
.await?;

let res = async {
Expand Down Expand Up @@ -460,7 +460,7 @@ impl MultipartUpload for S3MultiPartUpload {
impl MultipartStore for AmazonS3 {
async fn create_multipart(&self, path: &Path) -> Result<MultipartId> {
self.client
.create_multipart(path, PutMultipartOpts::default())
.create_multipart(path, PutMultipartOptions::default())
.await
}

Expand Down Expand Up @@ -536,7 +536,7 @@ mod tests {

let str = "test.bin";
let path = Path::parse(str).unwrap();
let opts = PutMultipartOpts::default();
let opts = PutMultipartOptions::default();
let mut upload = store.put_multipart_opts(&path, opts).await.unwrap();

upload
Expand Down Expand Up @@ -567,7 +567,7 @@ mod tests {

let str = "test.bin";
let path = Path::parse(str).unwrap();
let opts = PutMultipartOpts::default();
let opts = PutMultipartOptions::default();
let mut upload = store.put_multipart_opts(&path, opts).await.unwrap();

upload
Expand Down
2 changes: 1 addition & 1 deletion src/aws/precondition.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ pub enum S3CopyIfNotExists {
impl std::fmt::Display for S3CopyIfNotExists {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match self {
Self::Header(k, v) => write!(f, "header: {}: {}", k, v),
Self::Header(k, v) => write!(f, "header: {k}: {v}"),
Self::HeaderWithStatus(k, v, code) => {
write!(f, "header-with-status: {k}: {v}: {}", code.as_u16())
}
Expand Down
2 changes: 1 addition & 1 deletion src/aws/resolve.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ impl From<Error> for crate::Error {
pub async fn resolve_bucket_region(bucket: &str, client_options: &ClientOptions) -> Result<String> {
use reqwest::StatusCode;

let endpoint = format!("https://{}.s3.amazonaws.com", bucket);
let endpoint = format!("https://{bucket}.s3.amazonaws.com");

let client = client_options.client()?;

Expand Down
14 changes: 11 additions & 3 deletions src/azure/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -658,8 +658,8 @@ impl MicrosoftAzureBuilder {
};

match parsed.scheme() {
"az" | "adl" | "azure" => self.container_name = Some(validate(host)?),
"abfs" | "abfss" => {
"adl" | "azure" => self.container_name = Some(validate(host)?),
"az" | "abfs" | "abfss" => {
// abfs(s) might refer to the fsspec convention abfs://<container>/<path>
// or the convention for the hadoop driver abfs[s]://<file_system>@<account_name>.dfs.core.windows.net/<path>
if parsed.username().is_empty() {
Expand Down Expand Up @@ -1103,6 +1103,14 @@ mod tests {
assert_eq!(builder.container_name, Some("file_system".to_string()));
assert!(!builder.use_fabric_endpoint.get().unwrap());

let mut builder = MicrosoftAzureBuilder::new();
builder
.parse_url("az://container@account.dfs.core.windows.net/path-part/file")
.unwrap();
assert_eq!(builder.account_name, Some("account".to_string()));
assert_eq!(builder.container_name, Some("container".to_string()));
assert!(!builder.use_fabric_endpoint.get().unwrap());

let mut builder = MicrosoftAzureBuilder::new();
builder
.parse_url("abfss://file_system@account.dfs.fabric.microsoft.com/")
Expand Down Expand Up @@ -1245,7 +1253,7 @@ mod tests {
config_key
);
} else {
panic!("{} not propagated as ClientConfigKey", key);
panic!("{key} not propagated as ClientConfigKey");
}
}
}
12 changes: 6 additions & 6 deletions src/azure/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ use crate::multipart::PartId;
use crate::util::{deserialize_rfc1123, GetRange};
use crate::{
Attribute, Attributes, ClientOptions, GetOptions, ListResult, ObjectMeta, Path, PutMode,
PutMultipartOpts, PutOptions, PutPayload, PutResult, Result, RetryConfig, TagSet,
PutMultipartOptions, PutOptions, PutPayload, PutResult, Result, RetryConfig, TagSet,
};
use async_trait::async_trait;
use base64::prelude::{BASE64_STANDARD, BASE64_STANDARD_NO_PAD};
Expand Down Expand Up @@ -243,7 +243,7 @@ impl PutRequest<'_> {
builder.header(&MS_CONTENT_TYPE, v.as_ref())
}
Attribute::Metadata(k_suffix) => builder.header(
&format!("{}{}", USER_DEFINED_METADATA_HEADER_PREFIX, k_suffix),
&format!("{USER_DEFINED_METADATA_HEADER_PREFIX}{k_suffix}"),
v.as_ref(),
),
};
Expand Down Expand Up @@ -350,7 +350,7 @@ fn serialize_part_delete_request(

// Encode the subrequest request-line
extend(dst, b"DELETE ");
extend(dst, format!("/{} ", relative_url).as_bytes());
extend(dst, format!("/{relative_url} ").as_bytes());
extend(dst, b"HTTP/1.1");
extend(dst, b"\r\n");

Expand Down Expand Up @@ -597,9 +597,9 @@ impl AzureClient {
&self,
path: &Path,
parts: Vec<PartId>,
opts: PutMultipartOpts,
opts: PutMultipartOptions,
) -> Result<PutResult> {
let PutMultipartOpts {
let PutMultipartOptions {
tags,
attributes,
extensions,
Expand Down Expand Up @@ -716,7 +716,7 @@ impl AzureClient {
.query(&[("restype", "container"), ("comp", "batch")])
.header(
CONTENT_TYPE,
HeaderValue::from_str(format!("multipart/mixed; boundary={}", boundary).as_str())
HeaderValue::from_str(format!("multipart/mixed; boundary={boundary}").as_str())
.unwrap(),
)
.header(CONTENT_LENGTH, HeaderValue::from(body_bytes.len()))
Expand Down
2 changes: 1 addition & 1 deletion src/azure/credential.rs
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ impl<'a> AzureAuthorizer<'a> {
AzureCredential::BearerToken(token) => {
request.headers_mut().append(
AUTHORIZATION,
HeaderValue::from_str(format!("Bearer {}", token).as_str()).unwrap(),
HeaderValue::from_str(format!("Bearer {token}").as_str()).unwrap(),
);
}
AzureCredential::SASToken(query_pairs) => {
Expand Down
6 changes: 3 additions & 3 deletions src/azure/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ use crate::{
path::Path,
signer::Signer,
GetOptions, GetResult, ListResult, MultipartId, MultipartUpload, ObjectMeta, ObjectStore,
PutMultipartOpts, PutOptions, PutPayload, PutResult, Result, UploadPart,
PutMultipartOptions, PutOptions, PutPayload, PutResult, Result, UploadPart,
};
use async_trait::async_trait;
use futures::stream::{BoxStream, StreamExt, TryStreamExt};
Expand Down Expand Up @@ -99,7 +99,7 @@ impl ObjectStore for MicrosoftAzure {
async fn put_multipart_opts(
&self,
location: &Path,
opts: PutMultipartOpts,
opts: PutMultipartOptions,
) -> Result<Box<dyn MultipartUpload>> {
Ok(Box::new(AzureMultiPartUpload {
part_idx: 0,
Expand Down Expand Up @@ -221,7 +221,7 @@ impl Signer for MicrosoftAzure {
struct AzureMultiPartUpload {
part_idx: usize,
state: Arc<UploadState>,
opts: PutMultipartOpts,
opts: PutMultipartOptions,
}

#[derive(Debug)]
Expand Down
6 changes: 3 additions & 3 deletions src/buffered.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

use crate::path::Path;
use crate::{
Attributes, ObjectMeta, ObjectStore, PutMultipartOpts, PutOptions, PutPayloadMut, TagSet,
Attributes, ObjectMeta, ObjectStore, PutMultipartOptions, PutOptions, PutPayloadMut, TagSet,
WriteMultipart,
};
use bytes::Bytes;
Expand Down Expand Up @@ -337,7 +337,7 @@ impl BufWriter {
} else {
let buffer = std::mem::take(b);
let path = std::mem::take(path);
let opts = PutMultipartOpts {
let opts = PutMultipartOptions {
attributes: self.attributes.take().unwrap_or_default(),
tags: self.tags.take().unwrap_or_default(),
extensions: self.extensions.take().unwrap_or_default(),
Expand Down Expand Up @@ -397,7 +397,7 @@ impl AsyncWrite for BufWriter {
if b.content_length().saturating_add(buf.len()) >= cap {
let buffer = std::mem::take(b);
let path = std::mem::take(path);
let opts = PutMultipartOpts {
let opts = PutMultipartOptions {
attributes: self.attributes.take().unwrap_or_default(),
tags: self.tags.take().unwrap_or_default(),
extensions: self.extensions.take().unwrap_or_default(),
Expand Down
4 changes: 2 additions & 2 deletions src/chunked.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ use futures::StreamExt;
use crate::path::Path;
use crate::{
GetOptions, GetResult, GetResultPayload, ListResult, MultipartUpload, ObjectMeta, ObjectStore,
PutMultipartOpts, PutOptions, PutResult,
PutMultipartOptions, PutOptions, PutResult,
};
use crate::{PutPayload, Result};

Expand Down Expand Up @@ -78,7 +78,7 @@ impl ObjectStore for ChunkedStore {
async fn put_multipart_opts(
&self,
location: &Path,
opts: PutMultipartOpts,
opts: PutMultipartOptions,
) -> Result<Box<dyn MultipartUpload>> {
self.inner.put_multipart_opts(location, opts).await
}
Expand Down
2 changes: 1 addition & 1 deletion src/client/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ impl HttpRequestBuilder {

#[cfg(feature = "gcp")]
pub(crate) fn bearer_auth(mut self, token: &str) -> Self {
let value = HeaderValue::try_from(format!("Bearer {}", token));
let value = HeaderValue::try_from(format!("Bearer {token}"));
match (value, &mut self.request) {
(Ok(mut v), Ok(r)) => {
v.set_sensitive(true);
Expand Down
Loading