Repository navigation
ci: retry the powershell-yaml install when it fails - #5819
Merged
Merged
Conversation
generate-solution-filters.ps1 tries to install powershell-yaml up to 5 times, 10 seconds apart, but it sets $ErrorActionPreference to Stop, so the first failed download ended the script. The PowerShell Gallery failed that download twice in two days, failing test-solution-filters on #5810 and #5808. A failed attempt now prints a warning and the loop tries again. If every attempt fails, Import-Module still stops the script. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5819 +/- ##
==========================================
+ Coverage 76.09% 76.13% +0.03%
==========================================
Files 528 528
Lines 19579 19579
Branches 3829 3829
==========================================
+ Hits 14899 14906 +7
+ Misses 3794 3791 -3
+ Partials 886 882 -4 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
jamescrosswell
approved these changes
Oct 29, 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.
test-solution-filtersfailed twice in two days because the PowerShell Gallery couldn't servepowershell-yaml: "Package 'powershell-yaml' failed to download". That happened on #5810 yesterday and on #5808 today, and the earlier one passed on a rerun.generate-solution-filters.ps1already tries the install up to 5 times, 10 seconds apart. But it sets$ErrorActionPreference = "Stop", so the first failure ended the script, and the job logs show a single attempt. Now a failed attempt prints a warning and the loop tries again. If all 5 fail,Import-Modulestill fails the step.I checked the loop with a stubbed
Install-Modulethat fails a given number of times. Before, 1 failure ended the script. Now 1 or 4 failures still end with the module installed, and 5 leave it missing forImport-Moduleto report.#skip-changelog