Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Bump google.golang.org/grpc & google.golang.org/protobuf #705

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 5 additions & 10 deletions client/rate_limit_interceptor.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ import (

grpc_retry "github.com/grpc-ecosystem/go-grpc-middleware/retry"
"github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
"github.com/milvus-io/milvus-proto/go-api/v2/milvuspb"
)

// ref: https://github.com/grpc-ecosystem/go-grpc-middleware
Expand Down Expand Up @@ -68,20 +67,16 @@ func retryOnRateLimit(ctx context.Context) bool {
return retry
}

type withStatus interface {
GetStatus() *commonpb.Status
}

// getResultStatus returns status of response.
func getResultStatus(reply interface{}) *commonpb.Status {
switch r := reply.(type) {
case *commonpb.Status:
return r
case *milvuspb.MutationResult:
return r.GetStatus()
case *milvuspb.BoolResponse:
return r.GetStatus()
case *milvuspb.SearchResults:
return r.GetStatus()
case *milvuspb.QueryResults:
return r.GetStatus()
case *milvuspb.FlushResponse:
case withStatus:
return r.GetStatus()
default:
return nil
Expand Down
19 changes: 10 additions & 9 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ go 1.17
require (
github.com/cockroachdb/errors v1.9.1
github.com/go-faker/faker/v4 v4.1.0
github.com/golang/protobuf v1.5.2
github.com/golang/protobuf v1.5.4
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0
github.com/milvus-io/milvus-proto/go-api/v2 v2.4.0-rc.1
github.com/stretchr/testify v1.8.1
github.com/stretchr/testify v1.8.3
github.com/tidwall/gjson v1.14.4
google.golang.org/grpc v1.48.0
google.golang.org/grpc v1.57.1
google.golang.org/grpc/examples v0.0.0-20220617181431-3e7b97febc7f
)

Expand All @@ -24,14 +24,15 @@ require (
github.com/kr/text v0.2.0 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/rogpeppe/go-internal v1.8.1 // indirect
github.com/rogpeppe/go-internal v1.9.0 // indirect
github.com/stretchr/objx v0.5.0 // indirect
github.com/tidwall/match v1.1.1 // indirect
github.com/tidwall/pretty v1.2.0 // indirect
golang.org/x/net v0.17.0 // indirect
golang.org/x/sys v0.13.0 // indirect
golang.org/x/text v0.13.0 // indirect
google.golang.org/genproto v0.0.0-20220503193339-ba3ae3f07e29 // indirect
google.golang.org/protobuf v1.30.0 // indirect
golang.org/x/net v0.24.0 // indirect
golang.org/x/sys v0.19.0 // indirect
golang.org/x/text v0.14.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda // indirect
google.golang.org/protobuf v1.33.0 // indirect
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
Loading
Loading