Skip to content

'az storage file list' not returning extended file info since updating to 2.79.0 #32399

@symology-ajames

Description

@symology-ajames

Describe the bug

Since updating to Azure CLI 2.79.0, the 'az storage file list' command has not been returning extended info (e.g. last modified time) for any of the files. It seems to return the same results as if the --exclude-extended-info flag was set.

We have been using this command to query file details from a file share in an Azure storage account (Standard performance, ZRS redundancy, StorageV2 account kind).

On rolling back to version 2.78.0 of the CLI the command works as expected.

Related command

az storage file list --account-name $StorageAccount --account-key $StorageKey --share-name $ShareName

Errors

No error is returned, just not the expected data. Most of the properties for a file are coming back as null, except for fileId, name and contentLength, for example:

{
"changeTime": null,
"contentLength": null,
"creationTime": null,
"fileAttributes": null,
"fileId": "111111111111111111111",
"fileMode": null,
"fileType": null,
"group": null,
"isDirectory": false,
"lastAccessTime": null,
"lastWriteTime": null,
"lease": {
"duration": null,
"state": null,
"status": null
},
"linkCount": null,
"metadata": null,
"name": "myfile.log",
"nfsFileType": null,
"owner": null,
"parentId": null,
"path": null,
"permissionKey": null,
"properties": {
"contentLength": 55555,
"contentRange": null,
"contentSettings": {
"cacheControl": null,
"contentDisposition": null,
"contentEncoding": null,
"contentLanguage": null,
"contentMd5": null,
"contentType": null
},
"copy": {
"completionTime": null,
"destinationSnapshot": null,
"id": null,
"incrementalCopy": null,
"progress": null,
"source": null,
"status": null,
"statusDescription": null
},
"etag": null,
"lastModified": null,
"serverEncrypted": null
},
"share": null,
"snapshot": null,
"type": "file"
}

Issue script & Debug output

Running with --debug doesn't give any additional information. The extended data fields are just returned as null.

Expected behavior

I expected the extended info information to be returned by default, as documented for the command. For example the creation time and last modified timestamps.

Environment Summary

azure-cli: 2.79.0

Additional context

The output of the 'az storage share show' command returns 'null' for the protocols property. This seems to be the case for the file shares in the Azure Storage Accounts that I have access to.

Looking at the code for list_file_shares (line 96 in file.py), it looks as though values other than 'NFS' or 'SMB' will drop through and default to 'None' for the set of extended info properties to include, whereas in previous versions it would have defaulted to all of them.

Metadata

Metadata

Labels

Auto-AssignAuto assign by botAzure CLI TeamThe command of the issue is owned by Azure CLI teamStorageaz storagecustomer-reportedIssues that are reported by GitHub users external to the Azure organization.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions