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
6 changes: 3 additions & 3 deletions src/azure/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -670,13 +670,13 @@ impl MicrosoftAzureBuilder {
self.account_name = Some(validate(a)?);
self.container_name = Some(validate(parsed.username())?);
}
Some((a, "dfs.fabric.microsoft.com")) | Some((a, "blob.fabric.microsoft.net")) => {
Some((a, "dfs.fabric.microsoft.com"))
| Some((a, "blob.fabric.microsoft.net")) => {
self.account_name = Some(validate(a)?);
self.container_name = Some(validate(parsed.username())?);
self.use_fabric_endpoint = true.into();
}
_ => return Err(Error::UrlNotRecognised { url: url.into() }.into())

_ => return Err(Error::UrlNotRecognised { url: url.into() }.into()),
}
}
}
Expand Down
37 changes: 31 additions & 6 deletions src/parse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ impl From<Error> for super::Error {
/// - `memory:///` -> [`InMemory`]
/// - `s3://bucket/path` -> [`AmazonS3`](crate::aws::AmazonS3) (also supports `s3a`)
/// - `gs://bucket/path` -> [`GoogleCloudStorage`](crate::gcp::GoogleCloudStorage)
/// - `az://account/container/path` -> [`MicrosoftAzure`](crate::azure::MicrosoftAzure) (also supports `adl`, `azure`, `abfs`, `abfss`)
/// - `[az|abfs[s]]://container[@<account>.<host>]/path` -> [`MicrosoftAzure`](crate::azure::MicrosoftAzure)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I opted to drop azure as it is a custom format AFAICT, and adl as it is deprecated by azure.

Whilst still supported for compatibility, people shouldn't be using them.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

to be clear, you stopped documenting that azure is supported, but the code still supports it

/// - `http://mydomain/path` -> [`HttpStore`](crate::http::HttpStore)
/// - `https://mydomain/path` -> [`HttpStore`](crate::http::HttpStore)
///
Expand Down Expand Up @@ -110,8 +110,9 @@ impl ObjectStoreScheme {
("memory", None) => (Self::Memory, url.path()),
("s3" | "s3a", Some(_)) => (Self::AmazonS3, url.path()),
("gs", Some(_)) => (Self::GoogleCloudStorage, url.path()),
("az", Some(_)) => (Self::MicrosoftAzure, strip_bucket().unwrap_or_default()),
("adl" | "azure" | "abfs" | "abfss", Some(_)) => (Self::MicrosoftAzure, url.path()),
("az" | "adl" | "azure" | "abfs" | "abfss", Some(_)) => {
(Self::MicrosoftAzure, url.path())
}
("http", Some(_)) => (Self::Http, url.path()),
("https", Some(host)) => {
if host.ends_with("dfs.core.windows.net")
Expand Down Expand Up @@ -299,11 +300,35 @@ mod tests {
(ObjectStoreScheme::MicrosoftAzure, "path"),
),
(
"az://account/container",
(ObjectStoreScheme::MicrosoftAzure, ""),
"az://container/path",
(ObjectStoreScheme::MicrosoftAzure, "path"),

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

),
(
"az://container@account/path",
(ObjectStoreScheme::MicrosoftAzure, "path"),
),
(
"abfs://container/path",
(ObjectStoreScheme::MicrosoftAzure, "path"),
),
(
"abfs://container@account/path",
(ObjectStoreScheme::MicrosoftAzure, "path"),
),
(
"abfss://container/path",
(ObjectStoreScheme::MicrosoftAzure, "path"),
),
(
"abfss://container@account/path",
(ObjectStoreScheme::MicrosoftAzure, "path"),
),
(
"adl://container/path",
(ObjectStoreScheme::MicrosoftAzure, "path"),
),
(
"az://account/container/path",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can we please keep this test so it is clearer what is the difference in behavior? I am not sure what this URL will parse to now

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It is here #604 (comment)

Just renamed

"adl://container@account/path",
(ObjectStoreScheme::MicrosoftAzure, "path"),
),
(
Expand Down