Skip to content

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

@v-xuto

Description

@v-xuto

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.

Metadata

Metadata

Assignees

Labels

ClientThis issue points to a problem in the data-plane of the library.TablesbugThis issue requires a change to an existing behavior in the product in order to be resolved.needs-team-triageWorkflow: This issue needs the team to triage.test-manual-pass

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions