-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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 - Emulator support #5557
Conversation
After the changes in this PR, storage packages currently support the following
and
@XiaoningLiu mentioned that we need to add support for the following cases
Considering the support to be added is non-breaking, @jeremymeng and @ramya-rao-a suggested that we do the updates after the p.5 release. So, I believe this PR is safe to merge. I'll log an issue for the "TO DO - Add more support" which would be picked up post p.5. Edit - Logged an issue #5604 |
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.
LGTM
let urlWithoutSAS = this.url.split("?")[0]; // removing the sas part of url if present | ||
urlWithoutSAS = urlWithoutSAS.endsWith("/") ? urlWithoutSAS.slice(0, -1) : urlWithoutSAS; // Slicing off '/' at the end if exists | ||
|
||
const partsOfUrl = urlWithoutSAS.match("([^/]*)://([^/]*)/([^/]*)(/(.*))?"); | ||
// http://127.0.0.1:10000/devstoreaccount1 |
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.
IP style URL is not fixed to 127.0.0.1. Besides Azurite, Azure Storage test servers are also using IP style url/endpoints, but IP is not fixed. For example, https://52.132.33.11:81/accountname
. Or even IPv6 style in the future. Alghorithm in SDK should cover these scenarios.
Some non IP style url like http://localhost:10000/accountname
also have account name in the path. Or some devs may define the host file pointing to a local deployed xstore service like http://customized.server:10000/accountname
It's bit complex to come up with an alghorithm to cover all scenarios in the SDK side though.
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.
Yes, logged an issue here #5604.
Since the new changes would only be additional support, we are postponing and will most likely be done after the p.5.
This PR allows parsing the names from a url meant for emulators in storage-blob and storage-queue.