{CI} enforce WinPS 5.1 AutoGen module validation and failure propagation#29545
Draft
YangAn-microsoft wants to merge 2 commits intoAzure:mainfrom
Draft
{CI} enforce WinPS 5.1 AutoGen module validation and failure propagation#29545YangAn-microsoft wants to merge 2 commits intoAzure:mainfrom
YangAn-microsoft wants to merge 2 commits intoAzure:mainfrom
Conversation
| Thanks for your contribution! The pull request validation has started. Please revisit this comment for updated status. |
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a standalone PowerShell script intended to validate that Az.DataProtection can be loaded and to surface parsing failures (specifically the en-dash U+2013 vs hyphen U+002D operator issue that can break Windows PowerShell 5.1).
Changes:
- Introduces
TEST_MODULE_LOAD.ps1to validate presence of the builtAz.DataProtectionmanifest and runTest-ModuleManifestagainst it.
YangAn-microsoft
added a commit
to YangAn-microsoft/azure-powershell
that referenced
this pull request
May 10, 2026
- Add WinPS 5.1 test step to test-steps.yml and test-steps.ps1 - Tests run on Windows agents alongside PowerShell Core tests - Catches Unicode and parsing errors that only occur in legacy PowerShell - Fixes CI gap where PR Azure#29545 (with en-dash issue) passed all checks - Implements Option 2: dual-runtime per-module test coverage - Estimated pipeline time impact: +2 min (acceptable for comprehensive coverage)
- Run AutoGen module tests under Windows PowerShell 5.1 on Windows agents\n- Keep existing PowerShell Core coverage\n- Use explicit WinPS 5.1 executable path in test steps\n- Exclude experimental TEST_MODULE_LOAD.ps1
1124ce3 to
19c7b46
Compare
- Add succeeded() to AutoGen step conditions\n- Use PathSeparator in Windows PowerShell step\n- Remove continueOnError from WinPS AutoGen step\n- Propagate non-zero exit code from WinPS child process
Collaborator
|
/azp run |
Contributor
|
Azure Pipelines successfully started running 3 pipeline(s). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This change hardens AutoGen module validation in CI so Windows PowerShell 5.1 parse/import issues are detected reliably and fail the job when appropriate.
Problem
A previous issue with non-ASCII operator characters passed CI even though it failed in Windows PowerShell 5.1.
The pipeline behavior allowed gaps where validation steps could still run incorrectly or not propagate failure clearly.
What changed
Why this is safe
Validation
Notes
If you want, I can also give you a shorter version in the exact Azure PowerShell PR template style.