-
Notifications
You must be signed in to change notification settings - Fork 4k
Enhance Az.Migrate to prep for GA #28020
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?
Enhance Az.Migrate to prep for GA #28020
Conversation
Thanks for your contribution! The pull request validation has started. Please revisit this comment for updated status. |
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 pull request enhances the Az.Migrate module in preparation for GA by updating command parameters, validation logic, documentation, and version references. Key changes include:
- Removal of the –TargetStoragePathId parameter and addition of appliance names to improve user control.
- Updates to cmdlet implementation (parameter handling, disk format validation, and replication infrastructure) and solution file/project reference changes.
- Version bumps across assembly, changelogs, and module documentation.
Reviewed Changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
src/Migrate/Migrate/ChangeLog.md | Changelog updated with customer-friendly release notes. |
src/Migrate/Migrate.sln | Updated project reference for Az.Migrate reflecting new directory structure. |
src/Migrate/Migrate.Autorest/docs/*.md | Updated documentation examples and parameter descriptions for new appliance names. |
src/Migrate/Migrate.Autorest/custom/New-AzMigrateLocalServerReplication.ps1 | Refactored parameter handling and enhanced disk format validation for Gen2 VMs. |
src/Migrate/Migrate.Autorest/custom/Initialize-AzMigrateLocalReplicationInfrastructure.ps1 | Updated parameter passing and stricter validation for replication infrastructure. |
src/Migrate/Migrate.Autorest/custom/Helper/*.ps1 | Improved OS type and VMware tools validation in replication helper functions. |
src/Migrate/Migrate.Autorest/custom/AzLocalDiskInput.cs | Removed the target storage container property to align with parameter removals. |
src/Migrate/Migrate.Autorest/README.md and AssemblyInfo.cs | Bumped module and assembly versions in line with GA prep changes. |
Comments suppressed due to low confidence (3)
src/Migrate/Migrate.sln:24
- The project reference for 'Az.Migrate' has been updated. Please verify that the new relative path aligns with the intended build configuration and dependency structure.
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Az.Migrate", "Migrate.Autorest\Az.Migrate.csproj", "{86C9DC86-DAB8-4269-B3F4-30E002CD9869}"
src/Migrate/Migrate.Autorest/custom/Initialize-AzMigrateLocalReplicationInfrastructure.ps1:181
- The updated use of dictionary parameters when invoking 'InvokeAzMigrateGetCommandWithRetries' improves clarity; please ensure that the parameter keys exactly match the target cmdlet's expected input.
-Parameters @{
src/Migrate/Migrate.Autorest/custom/Helper/CommonHelper.ps1:287
- [nitpick] The enhanced OS type validation is more robust now; please verify that this condition does not inadvertently block valid OS scenarios where additional guest OS details could be provided.
($Machine.OperatingSystemDetailOSType -eq $OsType.OtherGuestFamily -and [string]::IsNullOrEmpty($Machine.GuestOSDetailOsname))) {
if ($customProperties.HyperVGeneration -eq "2" -and $disk.DiskFileFormat -eq "VHD") { | ||
throw "VHD disks are not supported in Hyper-V Generation 2 VMs. Please replace disk with id '$($disk.DiskId)' in -DiskToInclude by re-running New-AzMigrateLocalDiskMappingObject with 'VHDX' as Format." |
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.
[nitpick] The disk format validation correctly restricts 'VHD' disks for Hyper-V Generation 2 VMs; ensure that this logic is revisited if future releases extend support to VHD formats on Gen2.
if ($customProperties.HyperVGeneration -eq "2" -and $disk.DiskFileFormat -eq "VHD") { | |
throw "VHD disks are not supported in Hyper-V Generation 2 VMs. Please replace disk with id '$($disk.DiskId)' in -DiskToInclude by re-running New-AzMigrateLocalDiskMappingObject with 'VHDX' as Format." | |
$supportedFormats = GetSupportedDiskFormatsForHyperVGeneration($customProperties.HyperVGeneration) | |
if (-not $supportedFormats.Contains($disk.DiskFileFormat)) { | |
throw "The disk format '$($disk.DiskFileFormat)' is not supported in Hyper-V Generation $($customProperties.HyperVGeneration) VMs. Please replace disk with id '$($disk.DiskId)' in -DiskToInclude by re-running New-AzMigrateLocalDiskMappingObject with a supported format: $($supportedFormats -join ', ')." |
Copilot uses AI. Check for mistakes.
To the author of the pull request, |
Hi @minhsuanlee, if it's a breaking change PR, we'll leave this PR open till the breaking change release sprint. |
The modified commands are all in preview which I believe breaking changes are allowed. Let me know if that is not the case. If not, please help me get pass the above failing checks. |
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.md
and reviewed the following information:ChangeLog.md
file(s) appropriatelysrc/{{SERVICE}}/{{SERVICE}}/ChangeLog.md
.## Upcoming Release
header in the past tense.ChangeLog.md
if no new release is required, such as fixing test case only.