-
Notifications
You must be signed in to change notification settings - Fork 4
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
[EEESUPPORT-11240] Add logging and retries to pull_cmd #62
[EEESUPPORT-11240] Add logging and retries to pull_cmd #62
Conversation
5fef52d
to
69da090
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this change will work to address the specific issue, so 👍🏾 from me. But I'm curious if we considered pulling in one of the retry packages and wrapping the call to image.Dispatch
instead (so we don't have to maintain this patch or care which part of it is failing). Some (but not all) of the retry packages:
- https://pkg.go.dev/github.com/avast/retry-go/v4
- https://pkg.go.dev/github.com/cenkalti/backoff/v4
- https://pkg.go.dev/github.com/matryer/try
- https://pkg.go.dev/github.com/sethvargo/go-retry
We should also be able to use a retry package for other calls we find to be flaky that don't already have a retry mechanism.
Similar to the 💭, this isn't blocking. Something to think about, and do whatever you think is best.
I'm not sure I want to wrap all of image.Dispatch, since I only want to log and retry at the point where we know we're seeing a failure, rather than retrying higher up and risking retrying on failures that we shouldn't retry on. I briefly looked at avast, decided it was too much to add for this one case, and was also put off by the fact I couldn't
...at which point I read about how |
That's also fair (re: not potentially introducing other failures by retrying the whole process). No need to spin your wheels on it! Re: $ go get github.com/avast/[email protected]
go: github.com/avast/[email protected]: invalid version: go.mod has post-v4 module path "github.com/avast/retry-go/v4" at revision v4.6.0
$ go get github.com/avast/retry-go/[email protected]
go: downloading github.com/avast/retry-go/v4 v4.6.0
go: added github.com/avast/retry-go/v4 v4.6.0 |
The retry logic required patching containerd; see guyboltonking/containerd#2 to review the patch. Commits can be reviewed in order.