Skip to content

🩹 [Patch]: Add retry on Install-PSResource #12

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 9, 2025
Merged

Conversation

MariusStorhaug
Copy link
Member

@MariusStorhaug MariusStorhaug commented Mar 9, 2025

Description

This pull request includes changes to the .github/workflows/Action-Test.yml file to improve the reliability of module installation by adding retry logic.

Improvements to module installation:

  • .github/workflows/Action-Test.yml: Added a retry mechanism for the Install-PSResource command to handle potential installation failures more gracefully. This includes retrying the installation up to 5 times with a 10-second delay between attempts and logging appropriate messages.

Type of change

  • 📖 [Docs]
  • 🪲 [Fix]
  • 🩹 [Patch]
  • ⚠️ [Security fix]
  • 🚀 [Feature]
  • 🌟 [Breaking change]

Checklist

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas

@MariusStorhaug MariusStorhaug self-assigned this Mar 9, 2025
@Copilot Copilot AI review requested due to automatic review settings March 9, 2025 14:47
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

PR Overview

This patch adds retry logic to the module installation process in the workflow to improve reliability of the Install-PSResource command.

  • Implements a retry mechanism with up to 5 attempts and a 10-second delay between retries
  • Logs installation attempts and warnings on failure, then imports the module on success

Reviewed Changes

File Description
.github/workflows/Action-Test.yml Added retry mechanism to the Install-PSResource command

Copilot reviewed 1 out of 1 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (2)

.github/workflows/Action-Test.yml:151

  • Consider using a more detailed error message in the catch block by referencing $_.Exception.Message to provide clearer diagnostic information.
Write-Warning "Installation of $name failed with error: $_"

.github/workflows/Action-Test.yml:155

  • [nitpick] Consider including the current retry attempt number in the warning message to provide additional context for debugging.
Write-Warning "Retrying in $retryDelay seconds..."

@MariusStorhaug MariusStorhaug merged commit e2c6e91 into main Mar 9, 2025
17 checks passed
@MariusStorhaug MariusStorhaug deleted the retryinstall branch March 9, 2025 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant