Skip to content

Commit

Permalink
fix(deps): update module github.com/failsafe-go/failsafe-go to v0.4.4
Browse files Browse the repository at this point in the history
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
  • Loading branch information
renovate[bot] authored and aknuds1 committed Feb 6, 2024
1 parent 4ab11c5 commit fbbcdb6
Show file tree
Hide file tree
Showing 10 changed files with 55 additions and 14 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ require (
github.com/alecthomas/units v0.0.0-20231202071711-9a357b53e9c9
github.com/dustin/go-humanize v1.0.1
github.com/edsrzf/mmap-go v1.1.0
github.com/failsafe-go/failsafe-go v0.4.2
github.com/failsafe-go/failsafe-go v0.4.4
github.com/felixge/fgprof v0.9.3
github.com/go-kit/log v0.2.1
github.com/go-openapi/strfmt v0.22.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -272,8 +272,8 @@ github.com/envoyproxy/protoc-gen-validate v1.0.4 h1:gVPz/FMfvh57HdSJQyvBtF00j8JU
github.com/envoyproxy/protoc-gen-validate v1.0.4/go.mod h1:qys6tmnRsYrQqIhm2bvKZH4Blx/1gTIZ2UKVY1M+Yew=
github.com/facette/natsort v0.0.0-20181210072756-2cd4dd1e2dcb h1:IT4JYU7k4ikYg1SCxNI1/Tieq/NFvh6dzLdgi7eu0tM=
github.com/facette/natsort v0.0.0-20181210072756-2cd4dd1e2dcb/go.mod h1:bH6Xx7IW64qjjJq8M2u4dxNaBiDfKK+z/3eGDpXEQhc=
github.com/failsafe-go/failsafe-go v0.4.2 h1:CdIlFeCqXa2Gbd9E6IYQmhAJiLsjAzgbirdXUFOyADI=
github.com/failsafe-go/failsafe-go v0.4.2/go.mod h1:m5us3Ow4Q5S7q6Gg0G2MQ/cEM5CKHeFQtYIUuOB/i3M=
github.com/failsafe-go/failsafe-go v0.4.4 h1:ecYKI68EKSDJt9mAUl4JOj8smFFLn8UbIaXkJ47WrVc=
github.com/failsafe-go/failsafe-go v0.4.4/go.mod h1:m5us3Ow4Q5S7q6Gg0G2MQ/cEM5CKHeFQtYIUuOB/i3M=
github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU=
github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM=
Expand Down
2 changes: 1 addition & 1 deletion pkg/ingester/client/circuitbreaker.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ func NewCircuitBreaker(inst ring.InstanceDesc, cfg CircuitBreakerConfig, metrics
return invoker(ctx, method, req, reply, cc, opts...)
})

if err != nil && errors.Is(err, circuitbreaker.ErrCircuitBreakerOpen) {
if err != nil && errors.Is(err, circuitbreaker.ErrOpen) {
countOpen.Inc()
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/ingester/client/circuitbreaker_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ func TestNewCircuitBreaker(t *testing.T) {

// Subsequent requests should fail with this specific error once "open"
err = breaker(context.Background(), "/cortex.Ingester/Push", "", "", &conn, success)
require.ErrorIs(t, err, circuitbreaker.ErrCircuitBreakerOpen)
require.ErrorIs(t, err, circuitbreaker.ErrOpen)

// Non-ingester methods shouldn't be short-circuited
err = breaker(context.Background(), "Different.Method", "", "", &conn, success)
Expand Down
8 changes: 4 additions & 4 deletions pkg/ingester/ingester_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6686,20 +6686,20 @@ func TestIngester_PushInstanceLimitsWithCircuitBreaker(t *testing.T) {
// We push the last request 2 times.
// The first request causes an instance limit error,
// and which opens the circuit breaker, but no
// circuitbreaker.ErrCircuitBreakerOpen is returned.
// circuitbreaker.ErrOpen is returned.
_, err := client.Push(ctx, req)
require.Error(t, err)
require.NotErrorIs(t, err, circuitbreaker.ErrCircuitBreakerOpen)
require.NotErrorIs(t, err, circuitbreaker.ErrOpen)
s, ok := grpcutil.ErrorToStatus(err)
require.True(t, ok, "expected to be able to convert to gRPC status")
require.Equal(t, codes.Unavailable, s.Code())
require.ErrorContains(t, s.Err(), testData.expectedErr.Error())

// The second request causes a circuitbreaker.ErrCircuitBreakerOpen,
// The second request causes a circuitbreaker.ErrOpen,
// since the circuit breaker is already open.
_, err = client.Push(ctx, req)
require.Error(t, err)
require.ErrorIs(t, err, circuitbreaker.ErrCircuitBreakerOpen)
require.ErrorIs(t, err, circuitbreaker.ErrOpen)
}

// imitate time ticking between each push
Expand Down
16 changes: 16 additions & 0 deletions vendor/github.com/failsafe-go/failsafe-go/CHANGELOG.md

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

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

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

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

2 changes: 1 addition & 1 deletion vendor/modules.txt

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

0 comments on commit fbbcdb6

Please sign in to comment.