-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
{Compute} az sig image-version create
: Change --virtual-machine
parameter map to new VM backend field
#28627
Conversation
️✔️AzureCLI-FullTest
|
Hi @Jing-song, |
️✔️AzureCLI-BreakingChangeTest
|
Compute |
az sig image-version create
: Change managed-image parameter map to new VM backend fieldaz sig image-version create
: Change --virtual-machine
parameter map to new VM backend field
@ReaNAiveD Could you please help review this PR? |
if managed_image is not None: | ||
source = GalleryArtifactVersionFullSource(id=managed_image) | ||
if virtual_machine is not None: | ||
source = GalleryArtifactVersionFullSource(virtual_machine_id=virtual_machine) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Accord to the L2425-L2434
in file vm/_validators.py
, the virtual_machine
value is also assigned to managed_image
. Consequently, the line source = GalleryArtifactVersionFullSource(id=managed_image)
will be executed even when a --virtual-machine
argument is provided. This overlap could introduce potential risks.
@@ -4782,6 +4782,8 @@ def create_image_version(cmd, resource_group_name, gallery_name, gallery_image_n | |||
source = os_disk_image = data_disk_images = None | |||
if managed_image is not None: | |||
source = GalleryArtifactVersionFullSource(id=managed_image) | |||
if virtual_machine is not None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes,added.
/azp run |
Azure Pipelines successfully started running 3 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 3 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 3 pipeline(s). |
az sig image-version create
: Change --virtual-machine
parameter map to new VM backend fieldaz sig image-version create
: Change --virtual-machine
parameter map to new VM backend field
Related command
az sig image-version create
Description
close #28488
Testing Guide
History Notes
[Component Name 1] BREAKING CHANGE:
az command a
: Make some customer-facing breaking change[Component Name 2]
az command b
: Add some customer-facing featureThis checklist is used to make sure that common guidelines for a pull request are followed.
The PR title and description has followed the guideline in Submitting Pull Requests.
I adhere to the Command Guidelines.
I adhere to the Error Handling Guidelines.