Azure / azure-cli

Azure Command-Line Interface
MIT License
4.01k stars 2.98k forks source link

az storage fs exists: in case fs does not exist ResourceNotFoundError is returned #15600

Closed dr-dolittle closed 3 years ago

dr-dolittle commented 4 years ago

az feedback auto-generates most of the information requested below, as of CLI version 2.0.62

Describe the bug When checking for the existence of a filesystem in ADLS Gen2 via az storage fs exists (https://docs.microsoft.com/en-us/cli/azure/storage/fs?view=azure-cli-latest#az_storage_fs_exists) I get exists = True as response. In case it does not exist an error is returned

ResourceNotFoundError: The specified container does not exist.
RequestId:xxx-xxx-xxx-xxx-xxx
Time:2020-10-21T14:57:49.5062669Z
ErrorCode:ContainerNotFound

Please change that to return False in case the filesystem does not exist.

To Reproduce Just run the command for both cases.

Expected behavior True respectively False are being returned, not an exception.

Environment summary Windows 10, azure-cli 2.13.0, PowerShell 5.1

yonzhan commented 4 years ago

add to S178

dr-dolittle commented 3 years ago

@yonzhan What is the current status on the issue? Is it already fixed respectively when will the fix be available for usage? Thanks

Juliehzl commented 3 years ago

Hi @dr-dolittle , it is already fixed in azure cli 2.15.0. Please update your version with az upgrade and try again.