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

A couple of small fixes in the recently-added Azure blob storage support #910

Merged
merged 1 commit into from
Nov 12, 2024
Merged
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
5 changes: 3 additions & 2 deletions crates/store/src/backend/azure/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ impl AzureStore {
let container = config.value_require((&prefix, "container"))?.to_string();

let credentials = match (
config.value((&prefix, "access-key")),
config.value((&prefix, "azure-access-key")),
config.value((&prefix, "sas-token")),
) {
(Some(access_key), None) => {
Expand All @@ -53,7 +53,7 @@ impl AzureStore {
prefix.as_str(),
concat!(
"Failed to create credentials: exactly one of ",
"'access-key' and 'sas-token' must be specified"
"'azure-access-key' and 'sas-token' must be specified"
),
);
return None;
Expand Down Expand Up @@ -126,6 +126,7 @@ impl AzureStore {
}
Err(e) => {
err = Some(e);
break;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was something I noticed after I submitted my previous PR; if we get an error, we don't have to keep consuming from the stream, we can just break out right away and return the error to the caller.

The code would be correct either way, but it seems more efficient to do it this way and break out as soon as we know for sure we have an error.

}
}
}
Expand Down