[vme] Update vme list table format#8873
Conversation
️✔️Azure CLI Extensions Breaking Change Test
|
|
Thank you for your contribution! We will review the pull request and get back to you soon. |
|
The git hooks are available for azure-cli and azure-cli-extensions repos. They could help you run required checks before creating the PR. Please sync the latest code with latest dev branch (for azure-cli) or main branch (for azure-cli-extensions). pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>
|
There was a problem hiding this comment.
Pull Request Overview
This PR updates the Azure CLI vme extension to show the correct versions in table output, adds conditional summary messages for multiple installs/uninstalls, bumps the package version, and updates the changelog.
- Bump extension version from 1.0.0b2 to 1.0.0b3
- Use
currentVersionfor the table’s version column - Only print “All extensions … successfully” when multiple types are processed
- Update HISTORY.rst with the 1.0.0b3 entry
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/vme/setup.py | Bumped package VERSION to '1.0.0b3' |
| src/vme/azext_vme/custom.py | Wrapped summary prints in if len(include_extension_types) > 1 |
| src/vme/azext_vme/_format.py | Replaced .get('version') with .get('currentVersion') |
| src/vme/HISTORY.rst | Added 1.0.0b3 release notes |
Comments suppressed due to low confidence (2)
src/vme/azext_vme/custom.py:76
- Add unit tests to cover both single and multiple
include_extension_typesscenarios, verifying that the summary message only prints when more than one type is provided.
if len(include_extension_types) > 1:
src/vme/azext_vme/custom.py:76
- The
printstatement under thisifmay not be indented correctly, causing it to execute unconditionally or produce an indentation error. Ensure theprintis nested by an extra indentation level under theif.
if len(include_extension_types) > 1:
| print(result) | ||
|
|
||
| print("All extensions installed successfully.") | ||
| if len(include_extension_types) > 1: |
There was a problem hiding this comment.
[nitpick] Consider extracting the conditional summary logic into a helper function to eliminate duplicated code between install and uninstall flows.
| ('name', result['name']), | ||
| ('extensionType', result.get('properties', {}).get('extensionType', '')), | ||
| ('version', result.get('properties', {}).get('version', '')), | ||
| ('version', result.get('properties', {}).get('currentVersion', '')), |
There was a problem hiding this comment.
To maintain compatibility with resources that use the old version property, consider falling back to it: e.g., get('currentVersion', result.get('version', '')).
| ('version', result.get('properties', {}).get('currentVersion', '')), | |
| ('version', result.get('properties', {}).get('currentVersion', result.get('version', ''))), |
|
|
[Release] Update index.json for extension [ vme-1.0.0b3 ] : https://dev.azure.com/msazure/One/_build/results?buildId=127871680&view=results |
This checklist is used to make sure that common guidelines for a pull request are followed.
Related command
General Guidelines
azdev style <YOUR_EXT>locally? (pip install azdevrequired)python scripts/ci/test_index.py -qlocally? (pip install wheel==0.30.0required)For new extensions:
About Extension Publish
There is a pipeline to automatically build, upload and publish extension wheels.
Once your pull request is merged into main branch, a new pull request will be created to update
src/index.jsonautomatically.You only need to update the version information in file setup.py and historical information in file HISTORY.rst in your PR but do not modify
src/index.json.