Skip to content

Conversation

ankitbaluni123
Copy link
Contributor

  • 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.

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

- 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.
@Copilot Copilot AI review requested due to automatic review settings September 8, 2025 12: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 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

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

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.

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.

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
Preview

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 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.

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

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 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.

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