Skip to content

[vme] Update vme list table format #8873

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 20, 2025
Merged

[vme] Update vme list table format #8873

merged 2 commits into from
Jun 20, 2025

Conversation

caoyihua
Copy link
Contributor


This checklist is used to make sure that common guidelines for a pull request are followed.

Related command

General Guidelines

  • Have you run azdev style <YOUR_EXT> locally? (pip install azdev required)
  • Have you run python scripts/ci/test_index.py -q locally? (pip install wheel==0.30.0 required)
  • My extension version conforms to the Extension version schema

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.json automatically.
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.

@Copilot Copilot AI review requested due to automatic review settings June 18, 2025 02:08
Copy link

azure-client-tools-bot-prd bot commented Jun 18, 2025

️✔️Azure CLI Extensions Breaking Change Test
️✔️Non Breaking Changes

@yonzhan
Copy link
Collaborator

yonzhan commented Jun 18, 2025

Thank you for your contribution! We will review the pull request and get back to you soon.

Copy link

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).
After that please run the following commands to enable git hooks:

pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 currentVersion for 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_types scenarios, 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 print statement under this if may not be indented correctly, causing it to execute unconditionally or produce an indentation error. Ensure the print is nested by an extra indentation level under the if.
    if len(include_extension_types) > 1:

@@ -73,7 +73,8 @@ def install_vme(
print(f"Installed extension {extension_type} successfully.")
print(result)

print("All extensions installed successfully.")
if len(include_extension_types) > 1:
Copy link
Preview

Copilot AI Jun 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] Consider extracting the conditional summary logic into a helper function to eliminate duplicated code between install and uninstall flows.

Copilot uses AI. Check for mistakes.

@@ -14,7 +14,7 @@ def __get_table_row(result):
return OrderedDict([
('name', result['name']),
('extensionType', result.get('properties', {}).get('extensionType', '')),
('version', result.get('properties', {}).get('version', '')),
('version', result.get('properties', {}).get('currentVersion', '')),
Copy link
Preview

Copilot AI Jun 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To maintain compatibility with resources that use the old version property, consider falling back to it: e.g., get('currentVersion', result.get('version', '')).

Suggested change
('version', result.get('properties', {}).get('currentVersion', '')),
('version', result.get('properties', {}).get('currentVersion', result.get('version', ''))),

Copilot uses AI. Check for mistakes.

Copy link

@kairu-ms kairu-ms merged commit 044f84c into Azure:main Jun 20, 2025
24 checks passed
@azclibot
Copy link
Collaborator

[Release] Update index.json for extension [ vme-1.0.0b3 ] : https://dev.azure.com/msazure/One/_build/results?buildId=127871680&view=results

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants