Skip to content

Extensions do not return a version if packaged with the latest version of wheel #6441

@noelbundick

Description

@noelbundick

Describe the bug
Extensions do not return a version if packaged with the latest version of wheel. I noticed that the extension command module was pinned to 0.30.0 in #6164, but the version returns null if extensions were built with the latest wheel

Ex: I build an extension using the VSTS Python build tools, which uses the Build Python wheels task. This appears to use the latest version of wheel, or at least one 0.31.0 or newer. This reproduces locally if using 0.31.1, but my older builds that were 0.30.0 properly return a version

On latest, when the wheel is built, there is no metadata.json in the noelbundick-0.0.x.dist-info folder, and as a result, I get the following output when I run az extension list:

[
  {
    "extensionType": "whl",
    "name": "noelbundick",
    "version": null
  }
]

To Reproduce

  1. Install my extension via
az extension add --source https://github.com/noelbundick/azure-cli-extension-noelbundick/releases/download/v0.0.5/noelbundick-0.0.5-py2.py3-none-any.whl
  1. List the files that were installed, noting that metadata.json is not present
ls ~/.azure/cliextensions/noelbundick/noelbundick-0.0.5.dist-info
  1. List installed extensions
az extension list

observe that the version is null

Expected behavior
I expect the version in the output to match the version contained in my setup.py (in this case, 0.0.5)

Environment summary
apt-get / 2.0.33 / Ubuntu 18.04 / WSL

Metadata

Metadata

Assignees

Labels

Extensions`az extension` commands or extension infrastructurequestionThe 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

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions