-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Add -EnableAutomaticUpgrade And -TreatFailureAsDeploymentFailure to New-AzVm/VmssGalleryApplication #28732
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
base: main
Are you sure you want to change the base?
Conversation
| Thanks for your contribution! The pull request validation has started. Please revisit this comment for updated status. |
582807f to
1ef67da
Compare
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.
Pull Request Overview
This PR adds support for two new boolean flags (EnableAutomaticUpgrade and TreatFailureAsDeploymentFailure) to Gallery Application cmdlets for both Virtual Machines and Virtual Machine Scale Sets. These flags control automatic updates and deployment failure handling for gallery applications.
- Added
EnableAutomaticUpgradeandTreatFailureAsDeploymentFailureas boolean parameters toNew-AzVmGalleryApplicationandNew-AzVmssGalleryApplicationcmdlets - Added the same flags as switch parameters to
Add-AzVmGalleryApplicationandAdd-AzVmssGalleryApplicationcmdlets - Comprehensive test coverage for both VM and VMSS scenarios with multiple test cases
Reviewed Changes
Copilot reviewed 7 out of 13 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| NewAzureVmGalleryApplicationCommand.cs | Added two new boolean parameters for enabling automatic upgrades and treating failures as deployment failures |
| NewAzureVmssGalleryApplicationCommand.cs | Added the same two boolean parameters for VMSS gallery applications |
| AddAzureVmGalleryApplicationCommand.cs | Added switch parameters for the two flags with logic to set them when present |
| AddAzureVmssGalleryApplicationCommand.cs | Added switch parameters for the two flags with logic to set them when present |
| New-AzVmGalleryApplication.md | Updated help documentation with parameter descriptions and usage examples |
| New-AzVmssGalleryApplication.md | Updated help documentation with parameter descriptions and usage examples |
| ChangeLog.md | Documented the new parameters for both cmdlet types |
| VirtualMachineTests.ps1 | Added comprehensive test for the new flags with multiple scenarios |
| VirtualMachineTests.cs | Added test method registration |
| VirtualMachineScaleSetTests.ps1 | Added comprehensive test for VMSS gallery application flags |
| VirtualMachineScaleSetTests.cs | Added test method registration |
Added -EnableAutomaticUpgrade and -TreatFailureAsDeploymentFailure to New-AzVmGalleryApplication as well as New Az-VmssGalleryApplication cmdlts
Description
Mandatory Checklist
Please choose the target release of Azure PowerShell. (⚠️ Target release is a different concept from API readiness. Please click below links for details.)
Check this box to confirm: I have read the Submitting Changes section of
CONTRIBUTING.mdand reviewed the following information:ChangeLog.mdfile(s) appropriatelysrc/{{SERVICE}}/{{SERVICE}}/ChangeLog.md.## Upcoming Releaseheader in the past tense.ChangeLog.mdif no new release is required, such as fixing test case only.