Skip to content

Conversation

ankitbaluni123
Copy link
Contributor

Description

Mandatory Checklist

  • SHOULD update ChangeLog.md file(s) appropriately
    • Update src/{{SERVICE}}/{{SERVICE}}/ChangeLog.md.
      • A snippet outlining the change(s) made in the PR should be written under the ## Upcoming Release header in the past tense.
    • Should not change ChangeLog.md if no new release is required, such as fixing test case only.
  • SHOULD regenerate markdown help files if there is cmdlet API change. Instruction
  • SHOULD have proper test coverage for changes in pull request.
  • SHOULD NOT adjust version of module manually in pull request

Ankit Baluni (from Dev Box) added 3 commits September 8, 2025 15:53
…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.
@Copilot Copilot AI review requested due to automatic review settings September 8, 2025 11:07
Copy link

Thanks for your contribution! The pull request validation has started. Please revisit this comment for updated status.

Copy link
Contributor

Thank you for your contribution @ankitbaluni123! We will review the pull request and get back to you soon.

Copy link
Contributor

@Copilot Copilot AI left a 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 Get-AzMigrateServerMigrationStatus cmdlet by adding support for the -Expedite parameter, which provides detailed resource utilization information and recommendations for optimizing server migration performance.

Key changes:

  • Added a new GetByPrioritiseServer parameter set with the -Expedite switch parameter
  • Enhanced output to include resource sharing analysis and utilization recommendations
  • Updated documentation and examples to demonstrate the new expedite functionality

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, examples, and parameter descriptions for the -Expedite feature
src/Migrate/Migrate/ChangeLog.md Added changelog entry documenting the enhancement to support the -Expedite parameter
src/Migrate/Migrate.Autorest/test/Get-AzMigrateServerMigrationStatus.Tests.ps1 Added test stub for the new GetByPrioritiseServer parameter set
src/Migrate/Migrate.Autorest/custom/Get-AzMigrateServerMigrationStatus.ps1 Implemented the core expedite functionality with resource analysis and recommendations logic
Multiple documentation files Updated path references from ..\ to ../ for consistency
Comments suppressed due to low confidence (1)

Comment on lines +193 to 202
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
}
Copy link

Copilot AI Sep 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The logic flow has been altered in a way that could cause incorrect behavior. The original commented-out logic handled multiple migration states, but the new implementation only checks for specific failure states before falling back to the raw migration state. This could result in incomplete state mapping for non-failure scenarios.

Copilot uses AI. Check for mistakes.

Comment on lines +23 to +24
[assembly: System.Reflection.AssemblyFileVersionAttribute("0.1.0.0")]
[assembly: System.Reflection.AssemblyVersionAttribute("0.1.0.0")]
Copy link

Copilot AI Sep 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The assembly version has been downgraded from "2.8.0" to "0.1.0.0", which would be a breaking change and inconsistent with the versioning strategy. This appears to be an unintended change that should be reverted.

Suggested change
[assembly: System.Reflection.AssemblyFileVersionAttribute("0.1.0.0")]
[assembly: System.Reflection.AssemblyVersionAttribute("0.1.0.0")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("2.8.0.0")]
[assembly: System.Reflection.AssemblyVersionAttribute("2.8.0.0")]

Copilot uses AI. Check for mistakes.

Comment on lines +255 to +259
if ($null -ne $Value) {
return "$Value %"
} else {
return "-"
}
Copy link

Copilot AI Sep 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The condition has been changed from checking both $Value -ne $null -and $Value -ne 0 to only $null -ne $Value. This means that zero values will now display as "0 %" instead of "-", which may not be the intended behavior for percentage displays where zero might be considered as "no data".

Copilot uses AI. Check for mistakes.

@ankitbaluni123 ankitbaluni123 deleted the MonitoringExpediteChangesV2 branch September 8, 2025 11:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant