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

In the StorageAccountHostsMixin class of the python sdk, there is no correct way to handle the endpoints of the azurite storage table #17417

Closed
v-xuto opened this issue Mar 18, 2021 · 1 comment · Fixed by #17944
Assignees
Labels
bug This issue requires a change to an existing behavior in the product in order to be resolved. Client This issue points to a problem in the data-plane of the library. needs-team-triage Workflow: This issue needs the team to triage. Tables test-manual-pass
Milestone

Comments

@v-xuto
Copy link
Member

v-xuto commented Mar 18, 2021

Error Description:

Azurite is an Azure Storage emulator.
In the StorageAccountHostsMixin class of the python sdk, there is no correct way to handle the endpoints of the azurite storage table.
ValueError: Unable to determine account name for shared key credential.
The reason is the storage tables endpoint for Azurite is different from the one of an Azure storage account.

In Azurite, storage tables endpoint constructed is shown as following:
https://127.0.0.1:10002/<account-name>/<resource-path>
In Azure SDK for python, storage tables endpoint constructed is shown as following:
https://<account-name>.table.core.windows.net/<resource-path>

Error Track:

The code is about processing the azurite storage tables endpoint in azure sdk for python is here:
image
image

To Reproduce:

A demo code is shown as following:

from azure.data.tables import TableServiceClient

account_url = '<Azurite_tables_account_url>'
access_key = '<Azurite_tables_access_key>'
table_service_client = TableServiceClient(account_url=account_url, credential=access_key)

table_item = table_service_client.create_table(table_name="myTable")
print("Created table {}!".format(table_item.table_name))

Expected Behavior

There is a correct way to handle azurite storage table endpoints in python SDK. Finally, able to successfully access azurite.

@jongio for notification.

@ghost ghost added the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label Mar 18, 2021
@xiangyan99 xiangyan99 added bug This issue requires a change to an existing behavior in the product in order to be resolved. Client This issue points to a problem in the data-plane of the library. Tables labels Mar 18, 2021
@ghost ghost removed the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label Mar 18, 2021
@xiangyan99 xiangyan99 added this to the [2021] April milestone Mar 18, 2021
@tzhanl tzhanl added needs-team-triage Workflow: This issue needs the team to triage. test-manual-pass labels Mar 19, 2021
@seankane-msft seankane-msft linked a pull request Apr 12, 2021 that will close this issue
@ghost ghost closed this as completed in #17944 Apr 19, 2021
ghost pushed a commit that referenced this issue Apr 19, 2021
@v-xuto
Copy link
Member Author

v-xuto commented May 17, 2021

azsdk-azurite

@github-actions github-actions bot locked and limited conversation to collaborators Apr 12, 2023
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug This issue requires a change to an existing behavior in the product in order to be resolved. Client This issue points to a problem in the data-plane of the library. needs-team-triage Workflow: This issue needs the team to triage. Tables test-manual-pass
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants