From 04a78981bc89c793ea00a7b908e708dd0e78ec4b Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 20 Aug 2024 09:47:11 +0000 Subject: [PATCH] fix(deps): update github.com/grafana/dskit digest to f96e399 --- go.mod | 2 +- go.sum | 4 ++-- tools/lambda-promtail/go.mod | 2 +- tools/lambda-promtail/go.sum | 4 ++-- .../github.com/grafana/dskit/httpgrpc/httpgrpc.go | 13 ++++++++++--- .../grafana/dskit/ring/replication_set.go | 2 +- vendor/modules.txt | 2 +- 7 files changed, 18 insertions(+), 11 deletions(-) diff --git a/go.mod b/go.mod index fc2a4e8005ff9..2b8c26228c4b3 100644 --- a/go.mod +++ b/go.mod @@ -50,7 +50,7 @@ require ( github.com/gorilla/mux v1.8.1 github.com/gorilla/websocket v1.5.0 github.com/grafana/cloudflare-go v0.0.0-20230110200409-c627cf6792f2 - github.com/grafana/dskit v0.0.0-20240819131358-463219e80ea0 + github.com/grafana/dskit v0.0.0-20240820081259-f96e399400b1 github.com/grafana/go-gelf/v2 v2.0.1 github.com/grafana/gomemcache v0.0.0-20240229205252-cd6a66d6fb56 github.com/grafana/regexp v0.0.0-20240518133315-a468a5bfb3bc diff --git a/go.sum b/go.sum index 3e4a97d154698..fc736690dd58c 100644 --- a/go.sum +++ b/go.sum @@ -1043,8 +1043,8 @@ github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWm github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/grafana/cloudflare-go v0.0.0-20230110200409-c627cf6792f2 h1:qhugDMdQ4Vp68H0tp/0iN17DM2ehRo1rLEdOFe/gB8I= github.com/grafana/cloudflare-go v0.0.0-20230110200409-c627cf6792f2/go.mod h1:w/aiO1POVIeXUQyl0VQSZjl5OAGDTL5aX+4v0RA1tcw= -github.com/grafana/dskit v0.0.0-20240819131358-463219e80ea0 h1:iMShjkEYATnBMbEa2wV4QiK5PU2trw24FOCON3v7+K4= -github.com/grafana/dskit v0.0.0-20240819131358-463219e80ea0/go.mod h1:c4ASJAo1QFmXGydDzNed2o0+Fncx+x4YmQ1r9HfYU3c= +github.com/grafana/dskit v0.0.0-20240820081259-f96e399400b1 h1:D5AcH0HuwL2qQRoJZuUXarCGDQSUWTX0sanhmkJQPAs= +github.com/grafana/dskit v0.0.0-20240820081259-f96e399400b1/go.mod h1:c4ASJAo1QFmXGydDzNed2o0+Fncx+x4YmQ1r9HfYU3c= github.com/grafana/go-gelf/v2 v2.0.1 h1:BOChP0h/jLeD+7F9mL7tq10xVkDG15he3T1zHuQaWak= github.com/grafana/go-gelf/v2 v2.0.1/go.mod h1:lexHie0xzYGwCgiRGcvZ723bSNyNI8ZRD4s0CLobh90= github.com/grafana/gocql v0.0.0-20200605141915-ba5dc39ece85 h1:xLuzPoOzdfNb/RF/IENCw+oLVdZB4G21VPhkHBgwSHY= diff --git a/tools/lambda-promtail/go.mod b/tools/lambda-promtail/go.mod index fb35609574b72..22426609b204b 100644 --- a/tools/lambda-promtail/go.mod +++ b/tools/lambda-promtail/go.mod @@ -10,7 +10,7 @@ require ( github.com/go-kit/log v0.2.1 github.com/gogo/protobuf v1.3.2 github.com/golang/snappy v0.0.4 - github.com/grafana/dskit v0.0.0-20240814201308-442170dfed1b + github.com/grafana/dskit v0.0.0-20240820081259-f96e399400b1 github.com/grafana/loki/v3 v3.0.0-20240809103847-9315b3d03d79 github.com/prometheus/common v0.55.0 github.com/stretchr/testify v1.9.0 diff --git a/tools/lambda-promtail/go.sum b/tools/lambda-promtail/go.sum index 2627682cc9454..4357bb5eed0ec 100644 --- a/tools/lambda-promtail/go.sum +++ b/tools/lambda-promtail/go.sum @@ -216,8 +216,8 @@ github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/gorilla/mux v1.8.1 h1:TuBL49tXwgrFYWhqrNgrUNEY92u81SPhu7sTdzQEiWY= github.com/gorilla/mux v1.8.1/go.mod h1:AKf9I4AEqPTmMytcMc0KkNouC66V3BtZ4qD5fmWSiMQ= -github.com/grafana/dskit v0.0.0-20240814201308-442170dfed1b h1:w3iQfdftNWfmU86f3Y4Cjzjx/+3AnKfpXzzq2cV8H/Y= -github.com/grafana/dskit v0.0.0-20240814201308-442170dfed1b/go.mod h1:c4ASJAo1QFmXGydDzNed2o0+Fncx+x4YmQ1r9HfYU3c= +github.com/grafana/dskit v0.0.0-20240820081259-f96e399400b1 h1:D5AcH0HuwL2qQRoJZuUXarCGDQSUWTX0sanhmkJQPAs= +github.com/grafana/dskit v0.0.0-20240820081259-f96e399400b1/go.mod h1:c4ASJAo1QFmXGydDzNed2o0+Fncx+x4YmQ1r9HfYU3c= github.com/grafana/gomemcache v0.0.0-20240229205252-cd6a66d6fb56 h1:X8IKQ0wu40wpvYcKfBcc5T4QnhdQjUhtUtB/1CY89lE= github.com/grafana/gomemcache v0.0.0-20240229205252-cd6a66d6fb56/go.mod h1:PGk3RjYHpxMM8HFPhKKo+vve3DdlPUELZLSDEFehPuU= github.com/grafana/jsonparser v0.0.0-20240425183733-ea80629e1a32 h1:NznuPwItog+rwdVg8hAuGKP29ndRSzJAwhxKldkP8oQ= diff --git a/vendor/github.com/grafana/dskit/httpgrpc/httpgrpc.go b/vendor/github.com/grafana/dskit/httpgrpc/httpgrpc.go index 02e6e493736b4..616023899b7ec 100644 --- a/vendor/github.com/grafana/dskit/httpgrpc/httpgrpc.go +++ b/vendor/github.com/grafana/dskit/httpgrpc/httpgrpc.go @@ -106,16 +106,23 @@ func FromHeader(hs http.Header) []*Header { return result } -// Errorf returns a HTTP gRPC error than is correctly forwarded over +// Error returns a HTTP gRPC error that is correctly forwarded over // gRPC, and can eventually be converted back to a HTTP response with // HTTPResponseFromError. -func Errorf(code int, tmpl string, args ...interface{}) error { +func Error(code int, msg string) error { return ErrorFromHTTPResponse(&HTTPResponse{ Code: int32(code), - Body: []byte(fmt.Sprintf(tmpl, args...)), + Body: []byte(msg), }) } +// Errorf returns a HTTP gRPC error that is correctly forwarded over +// gRPC, and can eventually be converted back to a HTTP response with +// HTTPResponseFromError. +func Errorf(code int, tmpl string, args ...interface{}) error { + return Error(code, fmt.Sprintf(tmpl, args...)) +} + // ErrorFromHTTPResponse converts an HTTP response into a grpc error, and uses HTTP response body as an error message. // Note that if HTTP response body contains non-utf8 string, then returned error cannot be marshalled by protobuf. func ErrorFromHTTPResponse(resp *HTTPResponse) error { diff --git a/vendor/github.com/grafana/dskit/ring/replication_set.go b/vendor/github.com/grafana/dskit/ring/replication_set.go index ffdcf80ab5268..ae37820202561 100644 --- a/vendor/github.com/grafana/dskit/ring/replication_set.go +++ b/vendor/github.com/grafana/dskit/ring/replication_set.go @@ -316,7 +316,7 @@ func DoUntilQuorumWithoutSuccessfulContextCancellation[T any](ctx context.Contex ext.Error.Set(cfg.Logger.Span, true) } - contextTracker.cancelAllContexts(cancellation.NewErrorf(cause)) + contextTracker.cancelAllContexts(cancellation.NewError(errors.New(cause))) cleanupResultsAlreadyReceived() return nil, err } diff --git a/vendor/modules.txt b/vendor/modules.txt index 8e3c23db1be01..d045944beb743 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -971,7 +971,7 @@ github.com/gorilla/websocket # github.com/grafana/cloudflare-go v0.0.0-20230110200409-c627cf6792f2 ## explicit; go 1.17 github.com/grafana/cloudflare-go -# github.com/grafana/dskit v0.0.0-20240819131358-463219e80ea0 +# github.com/grafana/dskit v0.0.0-20240820081259-f96e399400b1 ## explicit; go 1.21 github.com/grafana/dskit/aws github.com/grafana/dskit/backoff