azure-sdk-for-net icon indicating copy to clipboard operation
azure-sdk-for-net copied to clipboard

[BUG] Blob container's metadata is always empty when listed

Open GalPillar opened this issue 4 years ago • 15 comments

Describe the bug I'm using the Azure.ResourceManager.Storage sdk and the StorageManagementClient client, and calling client.BlobContainers.ListAsync. The returned list of ListContainerItem has a property called Metadata, which is basically the same as tags. The issue is that the Metadata I see on the blob container in the azure portal isn't in the returned ListContainerItem, instead it is always an empty IDictionary. On the contrary, when I fetch the blob container with client.BlobContainers.GetAsync, the Metadata is returned correctly.

Expected behavior The Metadata will be present in the returned ListContainerItem.

Actual behavior (include Exception or Stack Trace) The Metadata property is an empty IDictionary.

To Reproduce

  1. Create a StorageManagementClient client.
  2. Call client.BlobContainers.ListAsync.
  3. See that the Metadata is always empty

Environment:

  • Azure.ResourceManager.Storage - 1.0.0-preview.2
  • Windows 10, .NET Framework 5
  • e.g. Visual Studio 16.8.3

GalPillar avatar Dec 29 '20 19:12 GalPillar

Thank you for your feedback. Tagging and routing to the team member best able to assist.

AlexGhiondea avatar Dec 29 '20 21:12 AlexGhiondea

Just tested it, and this also happens for client.FileShares.ListAsync

GalPillar avatar Dec 30 '20 08:12 GalPillar

@GalPillar Could you please provide HTTP request and response?

nisha-bhatia avatar Dec 30 '20 19:12 nisha-bhatia

list request: request: GET https://management.azure.com/subscriptions/<subscriptionId>/resourceGroups/<resourceGroupName>/providers/Microsoft.Storage/storageAccounts/<storageAccountName>/blobServices/default/containers?api-version=2019-04-01 Authorization: Bearer <Token>

response is attached response.txt

get request: request: GET https://management.azure.com/subscriptions/<subscriptionId>/resourceGroups/<resourceGroupName>/providers/Microsoft.Storage/storageAccounts/<storageAccountName>/blobServices/default/containers/<containerName>?api-version=2019-06-01 Authorization: Bearer <Token>

response is attached getResponse.txt

GalPillar avatar Jan 03 '21 12:01 GalPillar

@zfchen95

This looks a server issue: List container from SRP won't return container meta data ( But get single container from SRP will return meta data; list container from dataplane will also return meta data)

Would you please help to look?

blueww avatar Jan 04 '21 04:01 blueww

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @xgithubtriage.

Issue Details

Describe the bug I'm using the Azure.ResourceManager.Storage sdk and the StorageManagementClient client, and calling client.BlobContainers.ListAsync. The returned list of ListContainerItem has a property called Metadata, which is basically the same as tags. The issue is that the Metadata I see on the blob container in the azure portal isn't in the returned ListContainerItem, instead it is always an empty IDictionary. On the contrary, when I fetch the blob container with client.BlobContainers.GetAsync, the Metadata is returned correctly.

Expected behavior The Metadata will be present in the returned ListContainerItem.

Actual behavior (include Exception or Stack Trace) The Metadata property is an empty IDictionary.

To Reproduce

  1. Create a StorageManagementClient client.
  2. Call client.BlobContainers.ListAsync.
  3. See that the Metadata is always empty

Environment:

  • Azure.ResourceManager.Storage - 1.0.0-preview.2
  • Windows 10, .NET Framework 5
  • e.g. Visual Studio 16.8.3
Author: GalPillar
Assignees: JonathanCrd, nisha-bhatia
Labels:

Mgmt, Service Attention, Storage, customer-reported, needs-team-attention, question

Milestone: -

ghost avatar Jan 05 '21 01:01 ghost

We currently don't include metadata in list blob containers in management plane API. We will add it in a future release. For list file shares, we will need to update the swagger. The feature is available at the server level.

zfchen95 avatar Jan 05 '21 18:01 zfchen95

Hi @GalPillar. Thank you, for your interest in helping to improve the Azure SDK experience and for your contribution. We've noticed that there hasn't been recent engagement on this pull request. If this is still an active work stream, please let us know by pushing some changes or leaving a comment. Otherwise, we'll close this out in 7 days.

ghost avatar Mar 12 '21 10:03 ghost

Hi @GalPillar. There was a mistake and this issue was unintentionally flagged as a stale pull request. The label has been removed and the issue will remain active; no action is needed on your part. Apologies for the inconvenience.

ghost avatar Mar 13 '21 16:03 ghost

@blueww, any updates?

seanmcc-msft avatar Mar 26 '21 18:03 seanmcc-msft

@seankane-msft This is SRP server issue, not SRP .net SDK issue. So only SRP team can fix it.

You can see @zfchen95 comments above. @zfchen95, will SRP team fix the issue from SRP server?

blueww avatar Mar 29 '21 02:03 blueww

@zfchen95 can you please answer the above query?

amnguye avatar Jul 08 '21 21:07 amnguye

Hi! any update on this issue ? @amnguye @zfchen95

dorki avatar Jul 18 '21 22:07 dorki

@blueww can you help to check with service team if there has any updates?

ArthurMa1978 avatar Jan 10 '23 05:01 ArthurMa1978

@ArthurMa1978 I have pinged service team again and included you.

blueww avatar Jan 10 '23 06:01 blueww

@blueww @ArthurMa1978 Anything? :(

ghost avatar Mar 27 '23 12:03 ghost

@omri-muszkal Actually, the issue is on server side instead of Client (SDK) side. (Both Arthur and me works on client side.) So we will need server team to update server by return the container metadata to fix this issue?

We have contact server team, and a bug is already opened. However, it looks the issue is still not fixed on server side.

To make server team understand the importance and priority of this issue, you might can also try to connect to Server team with your channel, such like open a help request from Azure portal. image

blueww avatar Mar 28 '23 02:03 blueww

Close as this is not client-side issue, please file ticket to ask service team to fix it.

ArthurMa1978 avatar May 22 '23 06:05 ArthurMa1978