-
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
Use Create Table Operation with Azure SDK for JS doesn't access Azurite #12753
Comments
@zzhxiaofeng thanks for reporting this issue. Is this happening for all operations or only for create table? Also, would you mind sharing a snippet of your test code which reproduces this issue please? |
@joheredi Ok, I just find this issue when use create table operation in Azurite.
|
I've filed an issue in core-http #13159 to track the fundamental issue. Meanwhile, I'm currently investigating a way to work around this limitation in the SDK side |
Thanks for reporting this issue, a fix has been merged and a new version released. Please install the latest version of @azure/data-tables and let me know if you see any issues.
Sample to create a client to test with Azurite: const tableService = TableClient.fromConnectionString('UseDevelopmentStorage=true', 'testTable'); |
@joheredi Thank you for resolve the issue. But the latest version of @azure/data-tables just support use http connection string to access Azurite. Can you update the code and make @azure/data-tables to support use https connection string of Azurite? |
@zzhxiaofeng, const credentials = new TablesSharedKeyCredential("devstoreaccount1", "Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==")
const client = new TableClient("https://localhost:10002/devstoreaccount1", "testTable", credentials) Please let me know if this works for you |
@joheredi Yes, it works. I'm sorry to waste your time. |
No waste at all, thanks for reporting the issue! I'm happy to hear that your problem got resolved! |
mgmt compute update readme.java.md (Azure#12753)
azsdk-azurite |
Error Description:
When use Create Table Operation, request URL which is constructed in Azure SDK for JS can not access Azurite. The reason is the request URL for Azurite is different from the one of an Azure storage account.
In Azurite, request URL of Create Table Operation constructed is shown as following:
In Azure SDK for JS, request URL which is used to access azurite in create table operation is shown as following:
It use
<account-name>
as path and doesn't use Tables which is the path of Create Table Operation.Error Track:
The code for storage table request URL constructed in Azure SDK for JS as following:
https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/tables/data-tables/src/generated/operations/table.ts#L81
When using Create Table operation with Azurite endpoint(https://127.0.0.1:10002/devstoreaccount1), the handler method in Azure SDK for JS put
127.0.0.1
as host,10002
as port,/devstoreaccount1
as path.https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/core/core-http/src/url.ts#L368
Expected Behavior
When using Create Table Operation, the request URL which is constructed in Azure SDK for JS can access azurite.
@jongio for notification.
The text was updated successfully, but these errors were encountered: