Skip to content

Commit

Permalink
fix(deps): update module github.com/cenkalti/backoff/v4 to v5 (#286)
Browse files Browse the repository at this point in the history
This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
|
[github.com/cenkalti/backoff/v4](https://redirect.github.com/cenkalti/backoff)
| `v4.3.0` -> `v5.0.1` |
[![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fcenkalti%2fbackoff%2fv4/v5.0.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fcenkalti%2fbackoff%2fv4/v5.0.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fcenkalti%2fbackoff%2fv4/v4.3.0/v5.0.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fcenkalti%2fbackoff%2fv4/v4.3.0/v5.0.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>cenkalti/backoff (github.com/cenkalti/backoff/v4)</summary>

###
[`v5.0.1`](https://redirect.github.com/cenkalti/backoff/compare/v5.0.0...v5.0.1)

[Compare
Source](https://redirect.github.com/cenkalti/backoff/compare/v5.0.0...v5.0.1)

###
[`v5.0.0`](https://redirect.github.com/cenkalti/backoff/compare/v4.3.0...v5.0.0)

[Compare
Source](https://redirect.github.com/cenkalti/backoff/compare/v4.3.0...v5.0.0)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/infratographer/x).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4xMDcuMCIsInVwZGF0ZWRJblZlciI6IjM5LjEwNy4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

---------

Signed-off-by: Mike Mason <[email protected]>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Mike Mason <[email protected]>
  • Loading branch information
renovate[bot] and mikemrm authored Jan 17, 2025
1 parent 466d978 commit df05355
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 11 deletions.
21 changes: 11 additions & 10 deletions echox/echo_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
"testing"
"time"

"github.com/cenkalti/backoff/v4"
"github.com/cenkalti/backoff/v5"
"github.com/labstack/echo/v4"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
Expand All @@ -28,8 +28,8 @@ import (
)

const (
maxRetries = 10
backoffDuration = 5 * time.Millisecond
maxRetries uint = 10
backoffDuration = 5 * time.Millisecond
)

type testRoute struct {
Expand Down Expand Up @@ -82,27 +82,28 @@ func testServer(t *testing.T, config Config, preRun func(srv *Server)) (*Server,
func waitForServer(t *testing.T, testURL string) {
t.Helper()

err := backoff.Retry(
func() error {
_, err := backoff.Retry(context.Background(),
func() (struct{}, error) {
req, err := http.NewRequestWithContext(context.Background(), http.MethodGet, testURL, nil)
if err != nil {
return err
return struct{}{}, err
}

resp, err := http.DefaultClient.Do(req)
if err != nil {
return err
return struct{}{}, err
}

defer resp.Body.Close() //nolint:errcheck // no need to check error in test

if resp.StatusCode != http.StatusOK {
return fmt.Errorf("unexpected status code: %d", resp.StatusCode) //nolint:err113 // this is fine for a test
return struct{}{}, fmt.Errorf("unexpected status code: %d", resp.StatusCode) //nolint:err113 // this is fine for a test
}

return nil
return struct{}{}, nil
},
backoff.WithMaxRetries(backoff.NewConstantBackOff(backoffDuration), maxRetries),
backoff.WithBackOff(backoff.NewConstantBackOff(backoffDuration)),
backoff.WithMaxTries(maxRetries),
)

require.NoError(t, err, "error waiting for server to be ready")
Expand Down
3 changes: 2 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ require (
github.com/apparentlymart/go-textseg/v15 v15.0.0 // indirect
github.com/bytedance/sonic v1.12.6 // indirect
github.com/bytedance/sonic/loader v0.2.1 // indirect
github.com/cenkalti/backoff/v4 v4.3.0 // indirect
github.com/cloudwego/base64x v0.1.4 // indirect
github.com/cloudwego/iasm v0.2.0 // indirect
github.com/containerd/containerd v1.7.18 // indirect
Expand Down Expand Up @@ -135,7 +136,7 @@ require (

require (
github.com/beorn7/perks v1.0.1 // indirect
github.com/cenkalti/backoff/v4 v4.3.0
github.com/cenkalti/backoff/v5 v5.0.1
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/fsnotify/fsnotify v1.7.0 // indirect
github.com/gin-contrib/sse v0.1.0 // indirect
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ github.com/bytedance/sonic/loader v0.2.1 h1:1GgorWTqf12TA8mma4DDSbaQigE2wOgQo7iC
github.com/bytedance/sonic/loader v0.2.1/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4yY2JpfqGeCtNLU=
github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8=
github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE=
github.com/cenkalti/backoff/v5 v5.0.1 h1:kGZdCHH1+eW+Yd0wftimjMuhg9zidDvNF5aGdnkkb+U=
github.com/cenkalti/backoff/v5 v5.0.1/go.mod h1:rkhZdG3JZukswDf7f0cwqPNk4K0sa+F97BxZthm/crw=
github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs=
github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
github.com/cloudwego/base64x v0.1.4 h1:jwCgWpFanWmN8xoIUHa2rtzmkd5J2plF/dnLS6Xd/0Y=
Expand Down

0 comments on commit df05355

Please sign in to comment.