Skip to content

Commit

Permalink
chore: replace retry lib with avast/retry-go
Browse files Browse the repository at this point in the history
giantswarm/retry-go has been archived for quite a while
  • Loading branch information
nvloff-f3 committed Mar 7, 2024
1 parent 796fde1 commit 0e6d39e
Show file tree
Hide file tree
Showing 24 changed files with 1,256 additions and 1,120 deletions.
2 changes: 2 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ linters-settings:
deny:
- pkg: "github.com/pkg/errors"
desc: "Please use go built-in error wrapping and handling via `fmt` and `errors` packages"
- pkg: "github.com/giantswarm/retry-go"
desc: "Please use https://github.com/avast/retry-go/v4"
gci:
sections:
- standard
Expand Down
3 changes: 1 addition & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ go 1.20
require (
github.com/aholic/ggtimer v0.0.0-20150905131044-5d7b30837a52
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2
github.com/avast/retry-go/v4 v4.5.1
github.com/chobie/go-gaussian v0.0.0-20150107165016-53c09d90eeaf
github.com/evalphobia/logrus_fluent v0.5.4
github.com/giantswarm/retry-go v0.0.0-20151203102909-d78cea247d5e
github.com/google/uuid v1.6.0
github.com/guptarohit/asciigraph v0.5.6
github.com/hako/durafmt v0.0.0-20210608085754-5c1018a4e16b
Expand All @@ -34,7 +34,6 @@ require (
github.com/fluent/fluent-logger-golang v1.9.0 // indirect
github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/juju/errgo v0.0.0-20140925100237-08cceb5d0b53 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect
github.com/philhofer/fwd v1.1.2 // indirect
Expand Down
6 changes: 2 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ github.com/aholic/ggtimer v0.0.0-20150905131044-5d7b30837a52 h1:PuAAatjhSeWL+ybY
github.com/aholic/ggtimer v0.0.0-20150905131044-5d7b30837a52/go.mod h1:dn/mVOaud2SCQOekwuqMOnheqP2Cu3cCYe/pN3TWNPA=
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 h1:DklsrG3dyBCFEj5IhUbnKptjxatkF07cF2ak3yi77so=
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw=
github.com/avast/retry-go/v4 v4.5.1 h1:AxIx0HGi4VZ3I02jr78j5lZ3M6x1E0Ivxa6b0pUUh7o=
github.com/avast/retry-go/v4 v4.5.1/go.mod h1:/sipNsvNB3RRuT5iNcb6h73nw3IBmXJ/H3XrCQYSOpc=
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
github.com/blend/go-sdk v1.20220411.3 h1:GFV4/FQX5UzXLPwWV03gP811pj7B8J2sbuq+GJQofXc=
Expand All @@ -21,8 +23,6 @@ github.com/evalphobia/logrus_fluent v0.5.4 h1:G4BSBTm7+L+oanWfFtA/A5Y3pvL2OMxvic
github.com/evalphobia/logrus_fluent v0.5.4/go.mod h1:hasyj+CXm3BDP1YhFk/rnTcjlegyqvkokV9A25cQsaA=
github.com/fluent/fluent-logger-golang v1.9.0 h1:zUdY44CHX2oIUc7VTNZc+4m+ORuO/mldQDA7czhWXEg=
github.com/fluent/fluent-logger-golang v1.9.0/go.mod h1:2/HCT/jTy78yGyeNGQLGQsjF3zzzAuy6Xlk6FCMV5eU=
github.com/giantswarm/retry-go v0.0.0-20151203102909-d78cea247d5e h1:i3Ox1mmSokDZD9HM8qwUf93IBRURPJK4AA/zsIDyD+E=
github.com/giantswarm/retry-go v0.0.0-20151203102909-d78cea247d5e/go.mod h1:xX0P+GaW6CQzfQGVtHV1wE7cOFkXaHFpDDa1jxr94YE=
github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 h1:DACJavvAHhabrF08vX0COfcOBJRhZ8lUbR+ZWIs0Y5g=
github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k=
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
Expand All @@ -36,8 +36,6 @@ github.com/hako/durafmt v0.0.0-20210608085754-5c1018a4e16b h1:wDUNC2eKiL35DbLvsD
github.com/hako/durafmt v0.0.0-20210608085754-5c1018a4e16b/go.mod h1:VzxiSdG6j1pi7rwGm/xYI5RbtpBgM8sARDXlvEvxlu0=
github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8=
github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw=
github.com/juju/errgo v0.0.0-20140925100237-08cceb5d0b53 h1:tGpfbOOO0SV3qtMUx8O9RbJeei6VDBwnpQQ0JYIFaVg=
github.com/juju/errgo v0.0.0-20140925100237-08cceb5d0b53/go.mod h1:ZtgUe3RyZisw/AlQjgU9DeO3hqUH9E/bkreI2FLg/QY=
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
Expand Down
4 changes: 2 additions & 2 deletions internal/run/run_stage_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"testing"
"time"

"github.com/giantswarm/retry-go"
"github.com/avast/retry-go/v4"
"github.com/google/uuid"
io_prometheus_client "github.com/prometheus/client_model/go"
"github.com/prometheus/common/expfmt"
Expand Down Expand Up @@ -452,7 +452,7 @@ func (s *RunTestStage) setup_teardown_is_called_within_50ms() *RunTestStage {
return errors.New("no teardown yet")
}
return nil
}, retry.Sleep(10*time.Millisecond), retry.MaxTries(5))
}, retry.Delay(10*time.Millisecond), retry.Attempts(5))
s.require.NoError(err)
s.assert.GreaterOrEqual(atomic.LoadInt32(s.setupTeardownCount), int32(1))
return s
Expand Down
21 changes: 21 additions & 0 deletions vendor/github.com/avast/retry-go/v4/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

38 changes: 38 additions & 0 deletions vendor/github.com/avast/retry-go/v4/.godocdown.tmpl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 21 additions & 0 deletions vendor/github.com/avast/retry-go/v4/LICENSE

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

59 changes: 59 additions & 0 deletions vendor/github.com/avast/retry-go/v4/Makefile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 0e6d39e

Please sign in to comment.