From 5e325d598fd34559b8e5eb1bb394bb20148cbccc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 7 Jul 2023 16:10:03 +0000 Subject: [PATCH] Bump google.golang.org/grpc from 1.56.1 to 1.56.2 in /src Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.56.1 to 1.56.2. - [Release notes](https://github.com/grpc/grpc-go/releases) - [Commits](https://github.com/grpc/grpc-go/compare/v1.56.1...v1.56.2) --- updated-dependencies: - dependency-name: google.golang.org/grpc dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- src/go.mod | 2 +- src/go.sum | 4 +-- .../google.golang.org/grpc/status/status.go | 29 ++++++++++++++++--- src/vendor/google.golang.org/grpc/version.go | 2 +- src/vendor/modules.txt | 2 +- 5 files changed, 30 insertions(+), 9 deletions(-) diff --git a/src/go.mod b/src/go.mod index 637edabda..71a0079ba 100644 --- a/src/go.mod +++ b/src/go.mod @@ -15,7 +15,7 @@ require ( github.com/prometheus/common v0.44.0 github.com/valyala/fasthttp v1.48.0 golang.org/x/net v0.11.0 - google.golang.org/grpc v1.56.1 + google.golang.org/grpc v1.56.2 gopkg.in/yaml.v2 v2.4.0 ) diff --git a/src/go.sum b/src/go.sum index 587fc93fa..f92f2561d 100644 --- a/src/go.sum +++ b/src/go.sum @@ -250,8 +250,8 @@ google.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc h1: google.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:66JfowdXAEgad5O9NnYcsNPLCPZJD++2L9X0PCMODrA= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= -google.golang.org/grpc v1.56.1 h1:z0dNfjIl0VpaZ9iSVjA6daGatAYwPGstTjt5vkRMFkQ= -google.golang.org/grpc v1.56.1/go.mod h1:I9bI3vqKfayGqPUAwGdOSu7kt6oIJLixfffKrpXqQ9s= +google.golang.org/grpc v1.56.2 h1:fVRFRnXvU+x6C4IlHZewvJOVHoOv1TUuQyoRsYnB4bI= +google.golang.org/grpc v1.56.2/go.mod h1:I9bI3vqKfayGqPUAwGdOSu7kt6oIJLixfffKrpXqQ9s= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= diff --git a/src/vendor/google.golang.org/grpc/status/status.go b/src/vendor/google.golang.org/grpc/status/status.go index 53910fb7c..bcf2e4d81 100644 --- a/src/vendor/google.golang.org/grpc/status/status.go +++ b/src/vendor/google.golang.org/grpc/status/status.go @@ -77,11 +77,18 @@ func FromProto(s *spb.Status) *Status { // FromError returns a Status representation of err. // // - If err was produced by this package or implements the method `GRPCStatus() -// *Status`, or if err wraps a type satisfying this, the appropriate Status is -// returned. For wrapped errors, the message returned contains the entire -// err.Error() text and not just the wrapped status. +// *Status` and `GRPCStatus()` does not return nil, or if err wraps a type +// satisfying this, the Status from `GRPCStatus()` is returned. For wrapped +// errors, the message returned contains the entire err.Error() text and not +// just the wrapped status. In that case, ok is true. // -// - If err is nil, a Status is returned with codes.OK and no message. +// - If err is nil, a Status is returned with codes.OK and no message, and ok +// is true. +// +// - If err implements the method `GRPCStatus() *Status` and `GRPCStatus()` +// returns nil (which maps to Codes.OK), or if err wraps a type +// satisfying this, a Status is returned with codes.Unknown and err's +// Error() message, and ok is false. // // - Otherwise, err is an error not compatible with this package. In this // case, a Status is returned with codes.Unknown and err's Error() message, @@ -92,10 +99,24 @@ func FromError(err error) (s *Status, ok bool) { } type grpcstatus interface{ GRPCStatus() *Status } if gs, ok := err.(grpcstatus); ok { + if gs.GRPCStatus() == nil { + // Error has status nil, which maps to codes.OK. There + // is no sensible behavior for this, so we turn it into + // an error with codes.Unknown and discard the existing + // status. + return New(codes.Unknown, err.Error()), false + } return gs.GRPCStatus(), true } var gs grpcstatus if errors.As(err, &gs) { + if gs.GRPCStatus() == nil { + // Error wraps an error that has status nil, which maps + // to codes.OK. There is no sensible behavior for this, + // so we turn it into an error with codes.Unknown and + // discard the existing status. + return New(codes.Unknown, err.Error()), false + } p := gs.GRPCStatus().Proto() p.Message = err.Error() return status.FromProto(p), true diff --git a/src/vendor/google.golang.org/grpc/version.go b/src/vendor/google.golang.org/grpc/version.go index 0f1f8b9b3..59b513585 100644 --- a/src/vendor/google.golang.org/grpc/version.go +++ b/src/vendor/google.golang.org/grpc/version.go @@ -19,4 +19,4 @@ package grpc // Version is the current grpc version. -const Version = "1.56.1" +const Version = "1.56.2" diff --git a/src/vendor/modules.txt b/src/vendor/modules.txt index 1fec68107..e4b292488 100644 --- a/src/vendor/modules.txt +++ b/src/vendor/modules.txt @@ -251,7 +251,7 @@ golang.org/x/tools/internal/typesinternal # google.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc ## explicit; go 1.19 google.golang.org/genproto/googleapis/rpc/status -# google.golang.org/grpc v1.56.1 +# google.golang.org/grpc v1.56.2 ## explicit; go 1.17 google.golang.org/grpc google.golang.org/grpc/attributes