Update Azure CLI compute module to use latest API versions from azure-mgmt-compute SDK#32281
Closed
Copilot wants to merge 2 commits into
Closed
Update Azure CLI compute module to use latest API versions from azure-mgmt-compute SDK#32281Copilot wants to merge 2 commits into
Copilot wants to merge 2 commits into
Conversation
|
Validation for Azure CLI Full Test Starting...
Thanks for your contribution! |
|
Validation for Breaking Change Starting...
Thanks for your contribution! |
Co-authored-by: Jing-song <37168047+Jing-song@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Update code for new single API version in compute SDK
Update Azure CLI compute module to use latest API versions from azure-mgmt-compute SDK
Oct 20, 2025
Collaborator
|
Compute |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
This PR updates the Azure CLI compute module configuration to use the latest API versions recommended by the azure-mgmt-compute SDK v34.1.0, ensuring access to the latest features, bug fixes, and improved compatibility.
Problem
The Azure CLI was using outdated API versions for various compute operation groups. For example:
This meant users couldn't access newer features and bug fixes available in recent API versions.
Solution
Updated the
MGMT_COMPUTESDKProfile in/src/azure-cli-core/azure/cli/core/profiles/_shared.pyto align with the SDK's LATEST_PROFILE configuration.API Version Updates
New Operation Groups Added
Added support for new operation groups introduced in recent SDK versions:
disk_restore_point(2024-03-02)gallery_sharing_profile(2023-07-03)shared_gallery_images(2023-07-03)shared_gallery_image_versions(2023-07-03)community_galleries(2023-07-03)community_gallery_images(2023-07-03)community_gallery_image_versions(2023-07-03)Technical Details
The azure-mgmt-compute SDK uses a multi-versioned structure where different operation groups exist in different API version folders (e.g.,
v2024_11_01,v2024_03_02,v2023_07_03). This is intentional - different compute services evolve at different rates.The Azure CLI automatically resolves generic operation paths like
azure.mgmt.compute.operations#DisksOperations.listto the correct versioned path (e.g.,azure.mgmt.compute.v2024_03_02.operations#DisksOperations.list) based on the SDKProfile configuration. This means no changes are required in command definitions or VM module code.Testing
Impact
This change is fully backwards compatible. Users will see:
All existing commands continue to work without any changes to their interface or behavior.
Related
Addresses the need to keep Azure CLI aligned with the latest azure-mgmt-compute SDK recommendations as services evolve.
Original prompt
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.