Skip to content

Commit aa3ad43

Browse files
authored
deps: Bump github.com/avast/retry-go to v5.0.0 (#7673)
* Bump github.com/avast/retry-go to v5.0.0 Signed-off-by: Matthieu MOREL <[email protected]> * Bump github.com/avast/retry-go to v5.0.0 Signed-off-by: Matthieu MOREL <[email protected]> --------- Signed-off-by: Matthieu MOREL <[email protected]>
1 parent 2a0c5a6 commit aa3ad43

File tree

3 files changed

+17
-18
lines changed

3 files changed

+17
-18
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ require (
77
fortio.org/log v1.18.1
88
github.com/Masterminds/semver/v3 v3.4.0
99
github.com/andybalholm/brotli v1.2.0
10-
github.com/avast/retry-go v3.0.0+incompatible
10+
github.com/avast/retry-go/v5 v5.0.0
1111
github.com/cenkalti/backoff/v4 v4.3.0
1212
github.com/cncf/xds/go v0.0.0-20250501225837-2ac532fd4443
1313
github.com/containers/image/v5 v5.36.2

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@ github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPd
7474
github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs=
7575
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 h1:DklsrG3dyBCFEj5IhUbnKptjxatkF07cF2ak3yi77so=
7676
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw=
77-
github.com/avast/retry-go v3.0.0+incompatible h1:4SOWQ7Qs+oroOTQOYnAHqelpCO0biHSxpiH9JdtuBj0=
78-
github.com/avast/retry-go v3.0.0+incompatible/go.mod h1:XtSnn+n/sHqQIpZ10K1qAevBhOOCWBLXXy3hyiqqBrY=
77+
github.com/avast/retry-go/v5 v5.0.0 h1:kf1Qc2UsTZ4qq8elDymqfbISvkyMuhgRxuJqX2NHP7k=
78+
github.com/avast/retry-go/v5 v5.0.0/go.mod h1://d+usmKWio1agtZfS1H/ltTqwtIfBnRq9zEwjc3eH8=
7979
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
8080
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
8181
github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM=

internal/wasm/premissioncache.go

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ import (
2929
"sync"
3030
"time"
3131

32-
"github.com/avast/retry-go"
32+
"github.com/avast/retry-go/v5"
3333
"github.com/google/go-containerregistry/pkg/v1/remote/transport"
3434

3535
"github.com/envoyproxy/gateway/internal/logging"
@@ -158,24 +158,23 @@ func (p *permissionCache) Start(ctx context.Context) {
158158
const retryAttempts = 3
159159
const retryDelay = 1 * time.Second
160160
p.logger.Info("rechecking permission for image", "image", e.image.String())
161-
err := retry.Do(
162-
func() error {
163-
err := p.checkAndUpdatePermission(ctx, e)
164-
if err != nil && isRetriableError(err) {
165-
p.logger.Error(
166-
err,
167-
"failed to check permission for image, will retry again",
168-
"image",
169-
e.image.String())
170-
return err
171-
}
172-
return nil
173-
},
161+
err := retry.New(
174162
retry.Attempts(retryAttempts),
175163
retry.DelayType(retry.BackOffDelay),
176164
retry.Delay(retryDelay),
177165
retry.Context(ctx),
178-
)
166+
).Do(func() error {
167+
err := p.checkAndUpdatePermission(ctx, e)
168+
if err != nil && isRetriableError(err) {
169+
p.logger.Error(
170+
err,
171+
"failed to check permission for image, will retry again",
172+
"image",
173+
e.image.String())
174+
return err
175+
}
176+
return nil
177+
})
179178
if err != nil {
180179
p.logger.Error(
181180
err,

0 commit comments

Comments
 (0)