Repository navigation
[Compute] Add Flow VM (FlexProfile) support and recorded tests - #30351
Conversation
…n updates Co-authored-by: audreyttt <225061541+audreyttt@users.noreply.github.com>
Co-authored-by: audreyttt <225061541+audreyttt@users.noreply.github.com>
Record the targeted FlexProfile lifecycle and independent validation scenarios. Correct null and service-error expectations, stabilize playback DNS labels, complete the Flexible VMSS setup, add post-resize start/readback checks, and fix the help image alias. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
Thank you for your contribution Sri Harsha Varma Varma Uppalapati (@suppalapati-microsoft)! We will review the pull request and get back to you soon. |
There was a problem hiding this comment.
🔵 Needs a closer look
The comparison includes an unmerged runtime dependency, and final human review should confirm the coordinated diff and validation of the recording-independent tests.
No open issues 🎉
What changed in this PR
This follow-up to #30323 strengthens Az.Compute FlexProfile scenario validation and corrects a help example. The current comparison also includes the dependency’s runtime implementation; the follow-up itself adds no runtime cmdlet changes.
Changes:
- Corrects assertions, expected errors, deterministic DNS labels, and validation prerequisites across ten recorded scenarios.
- Adds restart/readback coverage after preferred-size updates and isolates nine validation cases.
- Includes inherited FlexProfile model, cmdlet, preservation, and help changes pending dependency coordination.
| File | Description |
|---|---|
| src/Compute/Compute/VirtualMachine/Operation/UpdateAzureVMCommand.cs | Supports preferred-size updates while preserving input profiles. |
| src/Compute/Compute/VirtualMachine/Operation/NewAzureVMCommand.cs | Supports preferred-size creation and forwards FlexProfile. |
| src/Compute/Compute/VirtualMachine/Config/NewAzureVMConfigCommand.cs | Requires either fixed or preferred size in VM configurations. |
| src/Compute/Compute/Strategies/ComputeRp/VirtualMachineStrategy.cs | Omits fixed size when creating with FlexProfile. |
| src/Compute/Compute/Models/PSVirtualMachine.cs | Exposes FlexProfile on the PowerShell VM model. |
| src/Compute/Compute/help/Update-AzVM.md | Documents preferred-size updates, round trips, and opt-out. |
| src/Compute/Compute/help/New-AzVMConfig.md | Documents preferred-size configuration and deployment. |
| src/Compute/Compute/help/New-AzVM.md | Documents preferred-size creation and corrects the image alias. |
| src/Compute/Compute/help/Get-AzVM.md | Explains preferred and service-selected size output. |
| src/Compute/Compute/Extension/AzureDiskEncryption/SetAzureDiskEncryptionExtension.cs | Preserves FlexProfile during encryption-related VM rebuilds. |
| src/Compute/Compute/Extension/AzureDiskEncryption/DisableAzureDiskEncryption.cs | Preserves FlexProfile when disabling disk encryption. |
| src/Compute/Compute/ChangeLog.md | Announces preview FlexProfile support and prerequisites. |
| src/Compute/Compute.Test/ScenarioTests/VirtualMachineTests.ps1 | Adds lifecycle coverage and isolated placement/input validation scenarios. |
| src/Compute/Compute.Test/ScenarioTests/VirtualMachineTests.cs | Adds scenario entry points and request/model preservation tests. |
Review effort: Balanced
Resolve the changelog conflict by retaining both release entries. The integrated tree passed all 62 targeted cases in Playback mode after preparing the required modules. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
/azp run |
|
Azure Pipelines: Successfully started running 3 pipeline(s). |
There was a problem hiding this comment.
🔵 Needs a closer look
The reported merge conflict remains unresolved on the published branch, and all ten main-integration scenarios were blocked by module-loading failures before reaching feature assertions.
No open issues 🎉
Review effort: Balanced
|
Azure Pipelines: Successfully started running 2 pipeline(s). There may be pipelines that require an authorized user to comment /azp run to run. |
|
/azp run |
|
Azure Pipelines: Successfully started running 3 pipeline(s). |
|
/azp run |
|
Azure Pipelines: Successfully started running 3 pipeline(s). |
The base branch was changed.
|
/azp run |
|
Azure Pipelines: Successfully started running 3 pipeline(s). |
🤖 PR Validation —⚠️ Review suggested
️✔️Az.Accounts
️✔️Az.KeyVault
️✔️Az.Maintenance
️✔️Az.ManagedServiceIdentity
️✔️Az.Monitor
️✔️Az.Network
️✔️Az.OperationalInsights
️✔️Az.PrivateDns
️✔️Az.RecoveryServices
️✔️Az.ResourceGraph
️✔️Az.Security
️✔️Az.Sql
️✔️Az.Ssh
️✔️Az.Storage
Description
Adds Flow VM (FlexProfile) support to Az.Compute, including preferred-size configuration, VM creation and updates, profile-preserving VM output, documentation, and recorded test coverage.
This is a standalone feature PR targeting
main. Its complete implementation, changelog, help updates, and tests are included in this branch.The test coverage includes the preferred-size lifecycle, fixed-size conversion, invalid-input handling, unsupported placement combinations, serialization, and preservation of VM profiles.
Changes
Add
PreferredVMSizesupport toNew-AzVMConfig,New-AzVM, andUpdate-AzVM, expose FlexProfile in VM output, and preserve preferred/actual size profiles across the affected operations.Correct null-object assertions and expected service/SDK errors.
Supply deterministic DNS labels for reliable playback.
Add start/readback after changing the preferred size while deallocated.
Isolate nine placement/input validation cases from the lifecycle test.
Complete the managed-disk, image, OS and network configuration for the zero-instance Flexible VMSS prerequisite.
Check capacity-reservation association rejection with a real empty group instead of depending on allocating reservation capacity.
Correct the help example's unsupported image alias.
Add all ten complete recordings from feature-enabled East Asia.
Validation
Historical local validation was performed on October 23, 2026. The repository workflow is documented in
.github/instructions/compute-test-debugging.instructions.mdanddocumentation/testing-docs/using-azure-test-framework.md.Current main integration, October 26: Commit
5396af94401590069e576d978e04a2bdfbbec6c8incorporates maine9feb37fa42fec0d878f3e544a5b00ce8fa256dfand preserves both Compute changelog entries. GitHub now reports the PR is conflict-free. CI status, October 26: Both builds, all Linux/macOS/Windows test jobs, Windows PowerShell analysis, and security-tools passed. The PowerShell Core Analyze job failed while downloading PSScriptAnalyzer 1.25.0 from PowerShell Gallery (run 366277). An attempted failed-job-only retry was denied by Azure DevOps permissions, so an authorized pipeline maintainer must retry Analyze. No source fix or additional recording was made for this download failure. Required CI is not fully green yet.Latest local validation
The published merge commit has tree
a35f30a5482eaef7736ea1672360446259548255, exactly matching the integration validated before publication.Commands executed:
$selection.filteris an exact-name OR filter for all 29 added Fact/Theory methods, yielding 62 cases. The recorded result isartifacts\CombinedFlexProfileValidation\20261026-131306-module-prepared\CombinedFlexProfile.Playback.trxin the isolated validation checkout. The build used the previously working package-feed proxy configuration without changing repository configuration.Historical live recording generation, October 23
All ten scenarios also have passing live recordings. These were accumulated across corrected recording runs, not a single final ten-case live invocation. The historical recording and replay commands/results follow.
The commands used were:
$repowas the local Azure PowerShell checkout. TestFx was explicitly set to Record or Playback before the corresponding invocation.TestFlexProfileTestFlexProfileHostGroupValidation,TestFlexProfileNullPreferredSizeValidation,TestFlexProfileVmssValidation,TestFlexProfileCapacityReservationValidationTestFlexProfile,TestFlexProfileHostGroupValidation,TestFlexProfileNullPreferredSizeValidationTestFlexProfileFor the subset invocations,
$filterwas($remaining | ForEach-Object { 'FullyQualifiedName=' + $prefix + $_ }) -join '|', using the method lists above. The$rundirectories underartifacts\FlexProfileValidationwere20261023-133255-isolated,20261023-150922-record-playback, and20261023-152423-dns-record-playback.All ten scenarios have passing live recordings across the corrected runs. This does not claim a single final ten-case live invocation. Final Playback evidence is
20261023-152423-dns-record-playback\FlexProfile.Playback.trx. No test resource groups remained after cleanup.Coverage limits
The complete PR includes the implementation's public cmdlet additions, help and changelog changes together with the recorded tests. The latest test/help commit does not adjust module versions or add further public cmdlet APIs.
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.