Azure / azure-sdk-for-python

This repository is for active development of the Azure SDK for Python. For consumers of the SDK we recommend visiting our public developer docs at https://docs.microsoft.com/python/azure/ or our versioned developer docs at https://azure.github.io/azure-sdk-for-python.
MIT License
4.38k stars 2.71k forks source link

Permission failure error messages should include storage account name #34572

Open stewartadam opened 4 months ago

stewartadam commented 4 months ago

Describe the bug Error messages for storage account access failures when interacting with Azure ML do not include the storage account in question, leaving to confusion.

For example, when the SDK is consumed via PromptFlow the error message says "this storage account" but the end-user doesn't know what "this" is.

To Reproduce Steps to reproduce the behavior:

  1. Deploy a fresh Azure Machine Learning workspace with managed identity connection to storage account
  2. pfazure run create <...>

Expected behavior Error message either references the storage account that was failed to be accessed, or it provides that context via the Exception object raised

Additional context

https://github.com/Azure/azure-sdk-for-python/blob/fb60783c782bbb57f3c8e055bf4793bd1473bf52/sdk/ml/azure-ai-ml/azure/ai/ml/_artifacts/_blob_storage_helper.py#L202

https://github.com/Azure/azure-sdk-for-python/blob/fb60783c782bbb57f3c8e055bf4793bd1473bf52/sdk/ml/azure-ai-ml/azure/ai/ml/_artifacts/_gen2_storage_helper.py#L171

github-actions[bot] commented 4 months ago

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @Azure/azure-ml-sdk @azureml-github.

diondrapeck commented 4 months ago

@stewartadam Thanks for bringing this to our attention. This suggestion makes sense as a way to improve error message clarity. I'll create a work item to track this and close the Issue when it's completed.