Skip PSResourceGet install on Windows in build-validation workflow#1813
Draft
Copilot wants to merge 2 commits into
Draft
Skip PSResourceGet install on Windows in build-validation workflow#1813Copilot wants to merge 2 commits into
Copilot wants to merge 2 commits into
Conversation
Up to standards ✅🟢 Issues
|
Deploying maester with
|
| Latest commit: |
6fc7147
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://126af613.maester.pages.dev |
| Branch Preview URL: | https://copilot-fix-build-validation-cza8.maester.pages.dev |
Copilot
AI
changed the title
[WIP] Fix build-validation job failure on Windows runner
Skip PSResourceGet install on Windows in build-validation workflow
Jun 1, 2026
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.
📑 Description
build-validationwas failing on the Windows runner becauseInstall-Module Microsoft.PowerShell.PSResourceGetterminated the PowerShell process (-1073741502) beforetry/catchcould handle it. This change makes that install non-Windows-only while leaving all other dependency installs unchanged.Microsoft.PowerShell.PSResourceGetinstallation behind a Windows OS check.try/catch)..github/workflows/build-validation.yaml.✅ Checks
/powershell/tests/pester.ps1locally.ℹ️ Additional Information
No functional changes outside the
Install PowerShell dependenciesstep logic forMicrosoft.PowerShell.PSResourceGet.How to Contribute
🏗️ Read our full contributing guide for the Maester project.
🧪 We also have additional instructions and a checklist for creating tests.
Join us at the Maester repository discussions or Entra Discord for more help and conversations!
While you wait for a review, why not spread some Maester love on social media? Thank you! 💖
Original prompt
The GitHub Actions job
build-validationis failing on the Windows runner in workflow.github/workflows/build-validation.yaml.Observed failure:
maester365/maesterb27f3a2817968c90d208b02e9801379e4d35b21aInstall PowerShell dependenciesstep.Install-Module Microsoft.PowerShell.PSResourceGet -Force -SkipPublisherCheck -Scope CurrentUser -AllowClobber -ErrorAction Stop-1073741502, which indicates a shell/process-level failure rather than a catchable PowerShell exception.Relevant file:
.github/workflows/build-validation.yamlCurrent behavior:
Microsoft.PowerShell.PSResourceGetinstall is wrapped intry/catch, but the process appears to terminate before PowerShell can catch the exception.Requested change:
Microsoft.PowerShell.PSResourceGetinstallation is skipped on Windows runners.Acceptance criteria:
Microsoft.PowerShell.PSResourceGet.The following is the prior conversation context from the user's chat exploration (may be truncated):
User: Please find a solution for this failing job. Use the logs, job definition, and any referenced files where the failure occurred. Keep your response focused on the solution and include code suggestions when appropriate.
Assistant: The failure is in the Windows leg during Install PowerShell dependencies in
.github/workflows/build-validation.yamlatlines 40-55.What failed
The log shows the step died immediately after running:
but instead of throwing a catchable PowerShell exception, the process exited with:
That means the shell crashed/terminated at process level, so the
try/catchcannot handle it. Since this happens in the generic dependency install step for all matrix legs, the most likely fix is to avoid installingMicrosoft.PowerShell.PSResourceGeton the Windows runner in this workflow unless it is strictly required.Recommended fix
Gate that install to non-Windows runners, or make it optional by OS. Based on the workflow, nothing later in this job appears to require
PSResourceGetspecifically.Update
.github/workflows/build-validation.yaml:Why this is the best targeted solution
PSResourceGetinstall block.try/catchis not enough.PSResourceGet.If
PSResourceGetis actually needed on WindowsA safer variant is to isolate it in its own step so a crash does not mask which dependency caused the issue: