puppetlabs / ruby-pwsh

A ruby gem for interacting with PowerShell
MIT License
15 stars 21 forks source link

(feat) - add retries on failed dsc invocation #282

Closed jordanbreen28 closed 5 months ago

jordanbreen28 commented 5 months ago

Summary

Before, if the dsc_base_provider encountered a collision of two Invoke-DscResource runs it would error out. Now, we will retry the execution up to a sensible number of times (up to max of 5 times in 5 mins to allow larger configurations to fully apply) before attempting to run again.

If 5 minutes surpass and we are still experiencing collisions, error out as before.

Additional Context

Marked as a feature and not bugfix as this is not a bug with ruby-pwsh, and is a limitation of DSC. So, we can only try negate this as best as we can on the puppet side.

Related Issues (if any)

Mention any related issues or pull requests.

Checklist

codecov[bot] commented 5 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (36ed427) 91.55% compared to head (3e97cbf) 91.83%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #282 +/- ## ========================================== + Coverage 91.55% 91.83% +0.27% ========================================== Files 6 6 Lines 675 698 +23 ========================================== + Hits 618 641 +23 Misses 57 57 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.