Skip to content

ci: retry the Pester installs from PSGallery - #2171

Merged
Benoît Cortier (CBenoit) merged 1 commit into
masterfrom
ci/retry-pester-install
Oct 28, 2026
Merged

Benoît Cortier (CBenoit) merged 1 commit into
masterfrom
ci/retry-pester-install

Conversation

@irvingoujAtDevolution

Copy link
Copy Markdown
Contributor

PSGallery intermittently answers that no module named Pester matches, which fails CI for a reason that has nothing to do with the change. #2167 stopped the oracle marker check tests from installing Pester when the check is unchanged, but the PowerShell module job and the Windows service account tests still install it on every run, and the oracle marker check tests still install it when the check changes.

Each Pester install now makes up to four attempts, waiting 30, 60 and 90 seconds between them, and fails with PSGallery's error once all four fail, like the Chocolatey installs (#2115). The loop is inline in each step because these jobs may check out an older commit than the workflow's own.

Co-authored-by: Claude Opus 5.5 noreply@anthropic.com

PSGallery intermittently answers that no module named Pester matches, which fails CI for a reason that has nothing to do with the change. #2167 stopped the oracle marker check tests from installing Pester when the check is unchanged, but the PowerShell module job and the Windows service account tests still install it on every run, and the oracle marker check tests still install it when the check changes.

Each Pester install now makes up to four attempts, waiting 30, 60 and 90 seconds between them, and fails with PSGallery's error once all four fail, like the Chocolatey installs (#2115). The loop is inline in each step because these jobs may check out an older commit than the workflow's own.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
@irvingoujAtDevolution

Copy link
Copy Markdown
Contributor Author

Lines changed, against master:

Added Removed
Production code 0 0
Tests 0 0
Other (CI) 52 4

The whole change is in .github/workflows/ci.yml: the same retry loop around each of the four Install-Module Pester calls.

Note

LLM-assisted content (no human feedback).

@github-actions

Copy link
Copy Markdown

Let maintainers know that an action is required on their side

  • Add the label release-required Please cut a new release (Devolutions Gateway, Devolutions Agent, Jetsocat, PowerShell module) when you request a maintainer to cut a new release (Devolutions Gateway, Devolutions Agent, Jetsocat, PowerShell module)

  • Add the label release-blocker Follow-up is required before cutting a new release if a follow-up is required before cutting a new release

  • Add the label publish-required Please publish libraries (`Devolutions.Gateway.Utils`, OpenAPI clients, etc) when you request a maintainer to publish libraries (Devolutions.Gateway.Utils, OpenAPI clients, etc.)

  • Add the label publish-blocker Follow-up is required before publishing libraries if a follow-up is required before publishing libraries

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The Pester installation retry changes have no active review issues blocking approval.

No open issues 🎉

What changed in this PR

This PR makes CI more resilient to intermittent PSGallery failures by retrying Pester installation in the oracle marker, PowerShell module, and Windows service account test jobs.

Changes:

  • Allows up to four installation attempts, with waits of 30, 60, and 90 seconds.
  • Logs failed attempts and rethrows the final installation error.
  • Keeps retry logic inline so jobs can check out older commits without requiring a shared helper.
File Description
.github/​workflows/​ci.yml Adds bounded retries to all four Pester installation steps while preserving their existing versions, scopes, and shells.

Review effort: Balanced

@CBenoit
Benoît Cortier (CBenoit) merged commit af202be into master Oct 28, 2026
55 checks passed
@CBenoit
Benoît Cortier (CBenoit) deleted the ci/retry-pester-install branch October 28, 2026 03:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants