-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Monitoring expedite changes v3 #28532
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
Monitoring expedite changes v3 #28532
Conversation
…e parameter - Added new parameter -Expedite to expedite the operation of a replicating server. - Updated documentation to include usage examples for the -Expedite parameter. - Modified existing examples to reflect new project and resource group names. - Enhanced output formatting in examples to provide clearer information. - Added tests for the new -Expedite functionality. - Updated ChangeLog to document the addition of the -Expedite feature.
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 adds support for a new -Expedite
parameter to the Get-AzMigrateServerMigrationStatus
cmdlet in the Azure PowerShell Migrate module. The enhancement provides migration teams with resource utilization analysis and prioritization recommendations for Azure migration operations.
Key changes include:
- Added new
-Expedite
parameter withGetByPrioritiseServer
parameter set - Enhanced documentation with new Example 4 showing expedite functionality
- Added comprehensive resource sharing and utilization analysis logic
Reviewed Changes
Copilot reviewed 13 out of 13 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 set and expedite example |
src/Migrate/Migrate/ChangeLog.md |
Added changelog entry for the expedite parameter enhancement |
src/Migrate/Migrate.Autorest/test/Get-AzMigrateServerMigrationStatus.Tests.ps1 |
Added test stub for new GetByPrioritiseServer parameter set |
src/Migrate/Migrate.Autorest/custom/Get-AzMigrateServerMigrationStatus.ps1 |
Implemented expedite functionality with resource analysis and recommendations |
src/Migrate/Migrate.Autorest/examples/Get-AzMigrateServerMigrationStatus.md |
Updated examples documentation with expedite use case |
src/Migrate/Migrate.Autorest/docs/Get-AzMigrateServerMigrationStatus.md |
Updated cmdlet documentation with new parameter and examples |
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 GetFormattedMigrationState function has become unclear with nested conditions. The function should use consistent if-elseif-else structure or early returns 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 should validate that $Value is a numeric type and within reasonable percentage bounds (0-100) before formatting to prevent unexpected output.
Copilot uses AI. Check for mistakes.
$recommendations += "`nResource `"$resource`" is $status. Recommendations:" | ||
$recommendations += "Stop other processes running on the appliance that are consuming RAM." | ||
$recommendations += "Stop initial replication (IR) or pause delta replication (DR) for other low-priority VMs migrating under this appliance to free up RAM." |
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 recommendation strings are hardcoded and duplicated across different resource types. Consider extracting these into a centralized recommendation configuration or lookup table to improve maintainability and consistency.
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.