-
Notifications
You must be signed in to change notification settings - Fork 4.1k
[Az.Migrate] Stabilize command internals & update policy defaults #28869
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
base: main
Are you sure you want to change the base?
[Az.Migrate] Stabilize command internals & update policy defaults #28869
Conversation
| Thanks for your contribution! The pull request validation has started. Please revisit this comment for updated status. |
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
There was a problem hiding this 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 pull request stabilizes command internals for the Azure Migrate module and updates replication policy defaults to align with the Azure Portal user experience. The changes primarily focus on refactoring error handling, improving code organization, and updating default frequency values for replication policies.
Key Changes
- Updated default crash-consistent and app-consistent frequency values in replication policy defaults
- Consolidated test cases into an end-to-end test suite
- Refactored error handling to use standardized exception helper functions
- Updated test environment configuration with new resource identifiers
- Reorganized solution file structure to reference generated AutoRest code from the
/generated/directory
Reviewed Changes
Copilot reviewed 22 out of 24 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/Migrate/Migrate/ChangeLog.md | Added changelog entry documenting policy default updates for New-AzMigrateLocalServerReplication |
| src/Migrate/Migrate.sln | Reorganized solution structure to reference AutoRest-generated project from /generated/ directory |
| src/Migrate/Migrate.Autorest/test/utils.ps1 | Updated test environment variables with new subscription IDs and resource identifiers |
| src/Migrate/Migrate.Autorest/test/localEnv.json | Updated test configuration with new resource IDs and reorganized property ordering |
| src/Migrate/Migrate.Autorest/test/env.json | Updated test environment with new subscription and resource identifiers |
| src/Migrate/Migrate.Autorest/test/Test-AzMigrateLocalEndToEnd.Tests.ps1 | Added comprehensive end-to-end test suite covering default and power user scenarios |
| src/Migrate/Migrate.Autorest/test/Remove-AzMigrateLocalServerReplication.Tests.ps1 | Consolidated tests to reference end-to-end suite and skipped individual test cases |
| src/Migrate/Migrate.Autorest/test/New-AzMigrateLocalServerReplication.Tests.ps1 | Consolidated tests to reference end-to-end suite and skipped individual test cases |
| src/Migrate/Migrate.Autorest/test/Get-AzMigrateLocalServerReplication.Tests.ps1 | Added skip flags to tests and reference to end-to-end suite |
| src/Migrate/Migrate.Autorest/test/Get-AzMigrateLocalReplicationFabric.Recording.json | Updated test recording with new subscription and resource data |
| src/Migrate/Migrate.Autorest/test/Get-AzMigrateLocalServerReplication.Recording.json | Deleted obsolete test recording file |
| src/Migrate/Migrate.Autorest/test/Get-AzMigrateLocalJob.Tests.ps1 | Consolidated tests to reference end-to-end suite with skip flags |
| src/Migrate/Migrate.Autorest/generate-info.json | Updated AutoRest generation ID |
| src/Migrate/Migrate.Autorest/docs/Az.Migrate.md | Updated module GUID |
| src/Migrate/Migrate.Autorest/custom/Set-AzMigrateLocalServerReplication.ps1 | Refactored error handling to use helper functions and improved code organization |
| src/Migrate/Migrate.Autorest/custom/Remove-AzMigrateLocalServerReplication.ps1 | Improved error handling with standardized exception messages |
| src/Migrate/Migrate.Autorest/custom/Helper/AzLocalCommonSettings.ps1 | Swapped default crash-consistent and app-consistent frequency values; added new constants |
| src/Migrate/Migrate.Autorest/custom/Helper/AzLocalCommonHelper.ps1 | Added standardized exception helper functions and refactored validation logic |
| src/Migrate/Migrate.Autorest/custom/Get-AzMigrateLocalServerReplication.ps1 | Improved error handling and removed retry logic in favor of direct calls with validation |
|
Replication policy now aligns with Portal UX for default config. Passing dev test with private module 3.0.17: https://dev.azure.com/msazure/One/_build/results?buildId=143763316&view=results
|


Description
Mandatory Checklist
Please choose the target release of Azure PowerShell. (⚠️ Target release is a different concept from API readiness. Please click below links for details.)
Check this box to confirm: I have read the Submitting Changes section of
CONTRIBUTING.mdand reviewed the following information:ChangeLog.mdfile(s) appropriatelysrc/{{SERVICE}}/{{SERVICE}}/ChangeLog.md.## Upcoming Releaseheader in the past tense.ChangeLog.mdif no new release is required, such as fixing test case only.