Skip to content

ci: retry the powershell-yaml install when it fails - #5819

Merged
jamescrosswell merged 1 commit into
mainfrom
ci/retry-powershell-yaml-install
Oct 29, 2026
Merged

jamescrosswell merged 1 commit into
mainfrom
ci/retry-powershell-yaml-install

Conversation

@ric-oliv

Copy link
Copy Markdown
Member

test-solution-filters failed twice in two days because the PowerShell Gallery couldn't serve powershell-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.ps1 already 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-Module still fails the step.

I checked the loop with a stubbed Install-Module that 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 for Import-Module to report.

#skip-changelog

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

codecov Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 76.13%. Comparing base (14c086d) to head (e7e2d46).

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ric-oliv
ric-oliv marked this pull request as ready for review October 27, 2026 09:47
@github-actions github-actions Bot added the risk: low PR risk score: low label Oct 27, 2026
@jamescrosswell
jamescrosswell merged commit 4b89b2f into main Oct 29, 2026
39 checks passed
@jamescrosswell
jamescrosswell deleted the ci/retry-powershell-yaml-install branch October 29, 2026 05:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: low PR risk score: low

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants