-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
[Storage] Name properties on clients should support parsing more types of URLs - storage-blob #6753
[Storage] Name properties on clients should support parsing more types of URLs - storage-blob #6753
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* Extracts account name from the blobEndpointUrl | ||
* @param {string} blobEndpointUrl blobEndpointUrl to extract the account name from | ||
* @returns {string} account name | ||
*/ | ||
export function getAccountNameFromUrl(blobEndpointUrl: string): string { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @XiaoningLiu,
I had updated only this one instance of getAccountNameFromUrl
in the storage-file-datalake
related to the name properties, please verify if there are more instances to take care of.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good.
const parsedUrl: URLBuilder = URLBuilder.parse(blobEndpointUrl); | ||
let accountName; | ||
try { | ||
if (parsedUrl.getHost()!.split(".")[1] === "blob") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
blob or dfs
datalake sdk uses 2 endpoints at the same time. Support both scenarios should be safe
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
older code
https://github.com/Azure/azure-sdk-for-js/pull/6753/files#diff-8a3fb6bd43cf327cd8768b7848f84d3fL551-L557
Updated accordingly, haven't introduced any new changes.
Followup of #6694 for storage-blob package
Fixes #5604