You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe what should be investigated or refactored
We have a couple of ways to implement retry logic in Zarf. The most common are use of timers or the retry function form the helpers package. The former respects contexts while the latter does not. It would be better if we could decide on a single retry package to use in this function to simplify things.
Small note that there is a helpers.RetryWithContext function we use, though from a glance at the retry-go package it seems like a reasonable substitute for both.
Describe what should be investigated or refactored
We have a couple of ways to implement retry logic in Zarf. The most common are use of timers or the retry function form the helpers package. The former respects contexts while the latter does not. It would be better if we could decide on a single retry package to use in this function to simplify things.
A suggestion is to switch to using retry-go. This project has been around for a while and is pretty stable.
https://github.com/avast/retry-go
Links to any relevant code
zarf/src/pkg/cluster/cluster.go
Lines 82 to 120 in 5e77e38
zarf/src/internal/packager/images/push.go
Line 57 in 5e77e38
zarf/src/pkg/cluster/namespace.go
Lines 30 to 46 in 5e77e38
zarf/src/pkg/cluster/state.go
Lines 132 to 154 in 5e77e38
Additional context
N/A
The text was updated successfully, but these errors were encountered: