-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Enhance Az.Migrate module with new features and documentation updates #28534
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
Conversation
- Updated README.md in custom directory to clarify usage of custom cmdlets. - Changed Module Guid in Az.Migrate.md for versioning consistency. - Added new parameter '-Expedite' to Get-AzMigrateServerMigrationStatus cmdlet for expedited server operations. - Updated examples and help documentation for Get-AzMigrateServerMigrationStatus to include new '-Expedite' functionality. - Modified test scripts to include new test cases for the '-Expedite' parameter. - Adjusted ChangeLog to reflect enhancements made to Get-AzMigrateServerMigrationStatus. - Corrected directory paths in various README files for consistency.
Thanks for your contribution! The pull request validation has started. Please revisit this comment for updated status. |
Thank you for your contribution @ankitbaluni123! We will review the pull request and get back to you soon. |
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 enhances the Azure Migrate PowerShell module by adding a new -Expedite
parameter to the Get-AzMigrateServerMigrationStatus
cmdlet. The enhancement provides expedited server migration functionality with detailed resource utilization analysis and recommendations for optimization.
Key changes:
- Added
-Expedite
parameter to provide resource sharing analysis and optimization recommendations - Updated examples and documentation across multiple files to demonstrate the new functionality
- Enhanced the cmdlet output to include ESXiHost information and improved formatting
- Added test coverage for the new parameter set
Reviewed Changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 3 comments.
Show a summary per file
File | Description |
---|---|
src/Migrate/Migrate/help/Get-AzMigrateServerMigrationStatus.md | Updated help documentation with new parameter syntax and comprehensive examples for -Expedite functionality |
src/Migrate/Migrate/ChangeLog.md | Added changelog entry documenting the -Expedite parameter enhancement |
src/Migrate/Migrate.Autorest/test/README.md | Fixed directory path reference from ..\custom to ../custom |
src/Migrate/Migrate.Autorest/test/Get-AzMigrateServerMigrationStatus.Tests.ps1 | Added test case for GetByPrioritiseServer parameter set |
src/Migrate/Migrate.Autorest/resources/README.md | Fixed directory path reference from ..\custom to ../custom |
src/Migrate/Migrate.Autorest/examples/Get-AzMigrateServerMigrationStatus.md | Updated examples with new output format and added Example 4 for -Expedite functionality |
src/Migrate/Migrate.Autorest/docs/Get-AzMigrateServerMigrationStatus.md | Updated documentation with new parameter syntax and examples |
src/Migrate/Migrate.Autorest/docs/Az.Migrate.md | Changed Module Guid for versioning consistency |
src/Migrate/Migrate.Autorest/custom/README.md | Fixed multiple directory path references from ..\ to ../ |
src/Migrate/Migrate.Autorest/custom/Get-AzMigrateServerMigrationStatus.ps1 | Implemented -Expedite parameter functionality with resource analysis and recommendations |
src/Migrate/Migrate.Autorest/custom/Az.Migrate.custom.psm1 | Fixed directory path references from ..\ to ../ |
src/Migrate/Migrate.Autorest/Properties/AssemblyInfo.cs | Reverted assembly version from 2.8.0 to 0.1.0.0 |
[assembly: System.Reflection.AssemblyFileVersionAttribute("0.1.0.0")] | ||
[assembly: System.Reflection.AssemblyVersionAttribute("0.1.0.0")] |
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.
According to Azure PowerShell guidelines, module versions should not be adjusted manually in pull requests. The version should remain at 2.8.0 or be managed through the automated release process.
Copilot generated this review using guidance from repository custom instructions.
if ($ReplicationMigrationItem.MigrationState -eq "MigrationFailed") { | ||
return "Migration Failed" | ||
} | ||
|
||
if ($ReplicationMigrationItem.MigrationState -match "MigrationInProgress" -and $ReplicationMigrationItem.migrationProgressPercentage -eq $null) { | ||
return "FinalDeltaReplication Queued" | ||
elseif ($ReplicationMigrationItem.MigrationState -match "InitialSeedingFailed") { | ||
return "InitialReplication Failed" | ||
} | ||
|
||
if ($ReplicationMigrationItem.MigrationState -eq "MigrationSucceeded") { | ||
return "Migration Completed" | ||
if ([string]::IsNullOrEmpty($State)) { | ||
return $ReplicationMigrationItem.MigrationState | ||
} |
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.
The logic flow in the GetState function has been restructured but the control flow is unclear. The function should have a consistent structure with clear conditions and a single return path pattern to improve readability and maintainability.
Copilot uses AI. Check for mistakes.
if ($null -ne $Value) { | ||
return "$Value %" | ||
} else { | ||
return "-" | ||
} |
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.
The Add-Percent function uses inconsistent null checking compared to other similar helper functions. Consider using consistent null checking patterns across all helper functions (Add-MBps, Add-MB, Add-Percent) for better maintainability.
Copilot uses AI. Check for mistakes.
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.