Skip to content

Enhance Az.Migrate to prep for service release #28020

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

Merged
merged 3 commits into from
Jul 3, 2025

Conversation

minhsuanlee
Copy link
Contributor

@minhsuanlee minhsuanlee commented Jun 24, 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 Copilot AI review requested due to automatic review settings June 24, 2025 18:46
Copy link

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

Copilot

This comment was marked as outdated.

@minhsuanlee minhsuanlee added this to the Az 14.3.0 (08/05/2025) milestone Jun 24, 2025
@minhsuanlee minhsuanlee added the Breaking Change Release This PR contains breaking change label Jun 24, 2025
Copy link

To the author of the pull request,
This PR was labeled "Breaking Change Release" because it contains breaking changes.

  • According to our policy, breaking changes can only take place during major release and they must be preannounced.
  • Please follow our guide on the detailed steps.
  • Required: Please fill in the task below to facilitate our contact,you will receive notifications related to breaking changes.

@YanaXu
Copy link
Contributor

YanaXu commented Jun 25, 2025

Hi @minhsuanlee, if it's a breaking change PR, we'll leave this PR open till the breaking change release sprint.

@minhsuanlee minhsuanlee removed the Breaking Change Release This PR contains breaking change label Jun 25, 2025
@minhsuanlee
Copy link
Contributor Author

Hi @minhsuanlee, if it's a breaking change PR, we'll leave this PR open till the breaking change release sprint.

The modified commands are all in preview which I believe breaking changes are allowed. Let me know if that is not the case. If not, please help me get pass the above failing checks.

@YanaXu
Copy link
Contributor

YanaXu commented Jun 26, 2025

Hi @minhsuanlee, if it's a breaking change PR, we'll leave this PR open till the breaking change release sprint.

The modified commands are all in preview which I believe breaking changes are allowed. Let me know if that is not the case. If not, please help me get pass the above failing checks.

Hi @minhsuanlee, it's not allowed to merge breaking change PRs to a GAed module. Az.Migrate is GAed (major version number is over 1). Thus, breaking changes will only be allowed in major release, and next major release is 15.0.0.

@minhsuanlee minhsuanlee changed the title Enhance Az.Migrate to prep for GA Enhance Az.Migrate to prep for service release Jun 26, 2025
@YanaXu
Copy link
Contributor

YanaXu commented Jun 30, 2025

/azp run

Copy link
Contributor

Azure Pipelines successfully started running 3 pipeline(s).

@YanaXu
Copy link
Contributor

YanaXu commented Jun 30, 2025

jor release

For record: New-AzMigrateLocalDiskMappingObject was added in PR #27207 with "Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.PreviewMessageAttribute". It means breaking changes are allowed to this cmdlet.

@YanaXu YanaXu self-assigned this Jun 30, 2025
@minhsuanlee minhsuanlee force-pushed the user/samlee3/azure-migrate-ps-bugfix branch from 9aa7397 to 32d17e1 Compare July 1, 2025 18:03
@YanaXu
Copy link
Contributor

YanaXu commented Jul 2, 2025

/azp run

Copy link
Contributor

Azure Pipelines successfully started running 3 pipeline(s).

@vidai-msft vidai-msft requested a review from Copilot July 2, 2025 09:03
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 Az.Migrate module by updating help docs, adjusting solution/project references, bumping versioning, and adding new appliance parameters and validations for local server replication.

  • Updated ChangeLog and module/project versions for the upcoming 2.8.0 release
  • Added -SourceApplianceName and -TargetApplianceName parameters and improved validation logic in New-AzMigrateLocalServerReplication
  • Refactored PowerShell helper and init scripts to use hashtables for parameter invocation and added new input validations

Reviewed Changes

Copilot reviewed 19 out of 19 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/Migrate/Migrate/ChangeLog.md Documented removal/addition of parameters and validations
src/Migrate/Migrate.sln Updated project path and GUID, fixed BOM at solution start
src/Migrate/Migrate.Autorest/docs/README.md Normalized path separators in docs
src/Migrate/Migrate.Autorest/docs/New-AzMigrateLocal*.md Added docs for new appliance-name parameters and removed stale
src/Migrate/Migrate.Autorest/custom/New-AzMigrateLocal*.ps1 Updated PreviewMessageAttribute, added params & validations
src/Migrate/Migrate.Autorest/custom/Initialize-AzMigrateLocalReplicationInfrastructure.ps1 Enforced provisioning-state checks and refactored calls
src/Migrate/Migrate.Autorest/custom/Helper/*.ps1 Enhanced OS/VMware-tools validations and added comments
src/Migrate/Migrate.Autorest/custom/AzLocalDiskInput.cs Removed deprecated storageContainerId property
src/Migrate/Migrate.Autorest/README.md Bumped auto-rest module-version
src/Migrate/Migrate.Autorest/Properties/AssemblyInfo.cs Updated assembly and file versions to 2.8.0
Comments suppressed due to low confidence (2)

src/Migrate/Migrate.Autorest/custom/New-AzMigrateLocalServerReplication.ps1:104

  • [nitpick] New mandatory parameters lack explicit ParameterSetName assignments. Consider specifying ParameterSetName for clarity and to avoid unintentionally impacting other parameter sets.
        [Parameter(Mandatory)]

src/Migrate/Migrate.Autorest/custom/New-AzMigrateLocalDiskMappingObject.ps1:78

  • New validation logic for VHD physical sector size was added; please ensure unit tests cover both passing and failing scenarios for this check.
        if ($Format -eq "VHD" -and $PhysicalSectorSize -ne 512) {

if ($null -eq $targetDra)
{
throw $targetDraErrorMessage
}
$targetDra = $targetDras[0]
Copy link
Preview

Copilot AI Jul 2, 2025

Choose a reason for hiding this comment

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

This reassigns $targetDra from the full $targetDras list rather than the filtered $targetDra array. It should be \$targetDra = \$targetDra[0] to use the previously validated, filtered result.

Suggested change
$targetDra = $targetDras[0]
$targetDra = $targetDra[0]

Copilot uses AI. Check for mistakes.

@YanaXu
Copy link
Contributor

YanaXu commented Jul 3, 2025

/azp run azure-powershell - security-tools

Copy link
Contributor

Azure Pipelines successfully started running 1 pipeline(s).

@YanaXu YanaXu merged commit df74141 into Azure:main Jul 3, 2025
12 checks passed
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.

2 participants