Skip to content

Conversation

@svishnusivasai
Copy link
Member

@svishnusivasai svishnusivasai commented Oct 27, 2025

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

Copilot AI review requested due to automatic review settings October 27, 2025 17:16
@azure-client-tools-bot-prd
Copy link

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

Copy link
Contributor

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 updates the Az.Migrate module to support Capacity Reservation functionality and upgrades the underlying API version from 2024-01-01 to 2025-08-01. The changes include new cmdlets for replication protection cluster operations, mobility service reinstallation, and location-based operation results, along with updated type references throughout the codebase.

Key Changes

  • Added support for Target Capacity Reservation Group ID parameter in server migration and replication cmdlets
  • Upgraded API version from 2024-01-01 to 2025-08-01 for Recovery Services and updated model references throughout
  • Added new cmdlets for cluster protection operations and mobility service management

Reviewed Changes

Copilot reviewed 74 out of 74 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/Migrate/Migrate.Autorest/README.md Updated API version commit hash and input file paths to reference 2025-08-01 API version
src/Migrate/Migrate.Autorest/Properties/AssemblyInfo.cs Updated assembly version from 2.9.0 to 0.1.0.0
src/Migrate/Migrate.Autorest/generate-info.json Deleted generation metadata file
src/Migrate/Migrate.Autorest/custom/*.ps1 Updated model type references from Api202401 to Api20250801 and added TargetCapacityReservationGroupId parameter support
src/Migrate/Migrate.Autorest/docs/*.md Updated documentation with new cmdlets and model type references to Api20250801
src/Migrate/Migrate.Autorest/test/*.Tests.ps1 Added test scaffolding for new cluster and mobility service cmdlets
src/Migrate/Migrate.Autorest/examples/*.md Added placeholder example files for new cmdlets
src/Migrate/Migrate.Autorest/UX/*.json Updated API versions and added UX metadata for new resource types

``` yaml
skip-semantics-validation: true
commit: 473d98be4cc2fb14db8bddbba8d3184d0aa49636
commit: ca9d05ed67fe556197b01fe795e80e4e2dc41e86
Copy link

Copilot AI Oct 27, 2025

Choose a reason for hiding this comment

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

The commit hash should be documented with a comment explaining why this specific commit was chosen and what API changes it includes. This helps future maintainers understand the reason for the specification update.

Copilot generated this review using guidance from repository custom instructions.
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 Oct 27, 2025

Choose a reason for hiding this comment

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

The assembly version was downgraded from 2.9.0 to 0.1.0.0, which violates semantic versioning principles. Assembly versions should only increase. This change will cause compatibility issues and break existing references to the assembly.

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

Copilot uses AI. Check for mistakes.
$ProviderSpecificDetails.TargetCapacityReservationGroupId = $TargetCapacityReservationGroupId
}
else {
$ProviderSpecificDetails.TargetCapacityReservationGroupId = $ReplicationMigrationItem.ProviderSpecificDetail.TargetCapacityReservationGroupId
Copy link

Copilot AI Oct 27, 2025

Choose a reason for hiding this comment

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

The else block unconditionally sets TargetCapacityReservationGroupId from the existing item, but there's no null check on $ReplicationMigrationItem.ProviderSpecificDetail.TargetCapacityReservationGroupId. Consider adding validation or using a null-coalescing pattern to handle cases where the property might not exist in older API responses.

Suggested change
$ProviderSpecificDetails.TargetCapacityReservationGroupId = $ReplicationMigrationItem.ProviderSpecificDetail.TargetCapacityReservationGroupId
if ($null -ne $ReplicationMigrationItem.ProviderSpecificDetail -and `
$ReplicationMigrationItem.ProviderSpecificDetail.PSObject.Properties['TargetCapacityReservationGroupId'] -and `
$null -ne $ReplicationMigrationItem.ProviderSpecificDetail.TargetCapacityReservationGroupId) {
$ProviderSpecificDetails.TargetCapacityReservationGroupId = $ReplicationMigrationItem.ProviderSpecificDetail.TargetCapacityReservationGroupId
}
else {
$ProviderSpecificDetails.TargetCapacityReservationGroupId = $null
}

Copilot uses AI. Check for mistakes.
```
### -TargetCapacityReservationGroupId
Specifies the Target Capacity Reservation Group Id within the destination Azure subscription.
Copy link

Copilot AI Oct 27, 2025

Choose a reason for hiding this comment

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

The parameter documentation should include the expected format of the Capacity Reservation Group ID (e.g., full resource ID path) and any validation requirements. Consider adding an example value in the parameter description.

Suggested change
Specifies the Target Capacity Reservation Group Id within the destination Azure subscription.
Specifies the Target Capacity Reservation Group ID within the destination Azure subscription.
The value must be the full Azure resource ID path of the Capacity Reservation Group. Example format:
`/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}`
For example: `/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Compute/capacityReservationGroups/myCapacityReservationGroup`
The parameter must be a valid Azure resource ID string.

Copilot uses AI. Check for mistakes.
@isra-fel
Copy link
Member

/azp run

@azure-pipelines
Copy link
Contributor

Azure Pipelines successfully started running 3 pipeline(s).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants