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

[Storage] Name properties on clients should support parsing more types of URLs - storage-blob #6753

Merged
merged 7 commits into from
Jan 8, 2020

Conversation

HarshaNalluru
Copy link
Member

@HarshaNalluru HarshaNalluru commented Jan 3, 2020

Followup of #6694 for storage-blob package

Fixes #5604

@HarshaNalluru HarshaNalluru added Client This issue points to a problem in the data-plane of the library. Storage Storage Service (Queues, Blobs, Files) labels Jan 3, 2020
@HarshaNalluru HarshaNalluru self-assigned this Jan 3, 2020
Copy link
Contributor

@jeremymeng jeremymeng left a comment

Choose a reason for hiding this comment

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

:shipit:

* 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 {
Copy link
Member Author

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.

Copy link
Member

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") {
Copy link
Member

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

Copy link
Member Author

Choose a reason for hiding this comment

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

older code
image
https://github.com/Azure/azure-sdk-for-js/pull/6753/files#diff-8a3fb6bd43cf327cd8768b7848f84d3fL551-L557

Updated accordingly, haven't introduced any new changes.

@HarshaNalluru HarshaNalluru merged commit ef519c3 into Azure:master Jan 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Client This issue points to a problem in the data-plane of the library. Storage Storage Service (Queues, Blobs, Files)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Storage] Name properties on clients should support parsing more types of URLs
3 participants