Skip to content

[Az.Migrate] Bug fixes related to disk validations #28309

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

minhsuanlee
Copy link
Contributor

@minhsuanlee minhsuanlee commented Jul 30, 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

Copy link

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

@minhsuanlee minhsuanlee added this to the Az 14.3.0 (08/05/2025) milestone Jul 30, 2025
@minhsuanlee minhsuanlee force-pushed the user/samlee3/quick-fix branch from 3e5a926 to b7bb89a Compare July 30, 2025 17:22
@minhsuanlee minhsuanlee reopened this Jul 30, 2025
@minhsuanlee minhsuanlee marked this pull request as ready for review July 30, 2025 17:23
@minhsuanlee minhsuanlee requested review from Copilot and mayada83 July 30, 2025 17:23
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 fixes a bug in the New-AzMigrateLocalDiskMappingObject function where the validation logic for PhysicalSectorSize was incorrectly triggering when the parameter wasn't explicitly provided by the user.

  • Modified validation logic to only check PhysicalSectorSize when explicitly provided
  • Enhanced error message to include the actual value that was provided
  • Added parameter existence check using $PSBoundParameters.ContainsKey()

@minhsuanlee minhsuanlee removed this from the Az 14.3.0 (08/05/2025) milestone Jul 31, 2025
@YanaXu
Copy link
Contributor

YanaXu commented Jul 31, 2025

/azp run azure-powershell - security-tools

Copy link
Contributor

Azure Pipelines successfully started running 1 pipeline(s).

@NoriZC
Copy link
Contributor

NoriZC commented Aug 4, 2025

Hi @minhsuanlee, please update the Changelog accordingly. And I also wondering if this need a test case

@NoriZC NoriZC self-assigned this Aug 4, 2025
Copy link

github-actions bot commented Aug 4, 2025

This PR was labeled "needs-revision" because it has unresolved review comments or CI failures.
Please resolve all open review comments and make sure all CI checks are green. Refer to our guide to troubleshoot common CI failures.

Copy link

github-actions bot commented Aug 4, 2025

‼️ DO NOT MERGE THIS PR ‼️
This PR was labeled "Do Not Merge" because it contains code change that cannot be merged. Please contact the reviewer for more information.

@minhsuanlee minhsuanlee force-pushed the user/samlee3/quick-fix branch from 89517c7 to f08893a Compare August 13, 2025 00:56
@minhsuanlee minhsuanlee changed the title [Az.Migrate] Bug fix for new default param PhysicalSectorSize in New-AzMigrateLocalDiskMappingObject [Az.Migrate] Bug fixes related to disk validations Aug 13, 2025
@minhsuanlee minhsuanlee added this to the Az 14.4.0 (09/02/2025) milestone Aug 13, 2025
@minhsuanlee
Copy link
Contributor Author

Hi @minhsuanlee, please update the Changelog accordingly. And I also wondering if this need a test case

I've updated the Changelog. As for test case, we are testing PS module change with our dev test pipelines. I will keep the DoNotMerge tag for now but please continue with the review. Thank you.

@NoriZC
Copy link
Contributor

NoriZC commented Aug 13, 2025

/azp run azure-powershell - security-tools

Copy link
Contributor

Azure Pipelines successfully started running 1 pipeline(s).

@NoriZC
Copy link
Contributor

NoriZC commented Aug 13, 2025

@minhsuanlee can I ask why the do not merge tag is here? Are you expecting another reviewer from your owne team?

@minhsuanlee
Copy link
Contributor Author

@minhsuanlee can I ask why the do not merge tag is here? Are you expecting another reviewer from your own team?

Yes, and also we may push more changes if new bugs come up before Code Complete for this iteration.

@NoriZC
Copy link
Contributor

NoriZC commented Aug 19, 2025

@minhsuanlee Please keep me updated if you have other updates. Or you can choose to merge this first and raise another PR for further review & merge

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.

4 participants