alamb commented on code in PR #552:
URL:
https://github.com/apache/arrow-rs-object-store/pull/552#discussion_r2683053095
##########
src/azure/builder.rs:
##########
@@ -671,36 +673,86 @@ impl MicrosoftAzureBuilder {
self.container_name = Some(validate(parsed.username())?);
self.account_name = Some(validate(a)?);
self.use_fabric_endpoint = true.into();
+ } else if let Some(a) =
host.strip_suffix(".blob.core.windows.net") {
+ self.container_name = Some(validate(parsed.username())?);
+ self.account_name = Some(validate(a)?);
+ } else if let Some(a) =
host.strip_suffix(".blob.fabric.microsoft.com") {
+ self.container_name = Some(validate(parsed.username())?);
+ self.account_name = Some(validate(a)?);
+ self.use_fabric_endpoint = true.into();
+ } else if let Some(a) =
host.strip_suffix("-api.onelake.fabric.microsoft.com") {
+ self.container_name = Some(validate(parsed.username())?);
+ self.account_name = Some(validate(a)?);
+ self.use_fabric_endpoint = true.into();
} else {
return Err(Error::UrlNotRecognised { url: url.into()
}.into());
}
}
- "https" => match host.split_once('.') {
- Some((a, "dfs.core.windows.net")) | Some((a,
"blob.core.windows.net")) => {
- self.account_name = Some(validate(a)?);
- let container =
parsed.path_segments().unwrap().next().expect(
- "iterator always contains at least one string (which
may be empty)",
- );
- if !container.is_empty() {
- self.container_name = Some(validate(container)?);
- }
+ "https" => {
+ // Regex to match WS-PL FQDN:
+ // "{workspaceid}.z??.(onelake|dfs|blob).fabric.microsoft.com"
Review Comment:
Can you please also add an example URL for each of the APIs you are adding
support for?
##########
src/azure/builder.rs:
##########
@@ -671,36 +673,86 @@ impl MicrosoftAzureBuilder {
self.container_name = Some(validate(parsed.username())?);
self.account_name = Some(validate(a)?);
self.use_fabric_endpoint = true.into();
+ } else if let Some(a) =
host.strip_suffix(".blob.core.windows.net") {
+ self.container_name = Some(validate(parsed.username())?);
+ self.account_name = Some(validate(a)?);
+ } else if let Some(a) =
host.strip_suffix(".blob.fabric.microsoft.com") {
+ self.container_name = Some(validate(parsed.username())?);
+ self.account_name = Some(validate(a)?);
+ self.use_fabric_endpoint = true.into();
+ } else if let Some(a) =
host.strip_suffix("-api.onelake.fabric.microsoft.com") {
Review Comment:
- Is *-api.onelake.fabric.microsoft.com a publicly documented endpoint? If
yes, can you point to the Microsoft doc so we can cite it in code/tests?
I don't see it in
https://learn.microsoft.com/en-us/fabric/onelake/onelake-access-api
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]