Skip to content

Commit 65d1d79

Browse files
authored
chore(backend): updated deprecated grpc func (kubeflow#11603)
Signed-off-by: Daniel Dowler <[email protected]>
1 parent 6a13f4b commit 65d1d79

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

backend/src/v2/cacheutils/cache.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import (
99
"os"
1010

1111
"google.golang.org/grpc"
12+
"google.golang.org/grpc/credentials/insecure"
1213
"google.golang.org/protobuf/encoding/protojson"
1314
"google.golang.org/protobuf/types/known/structpb"
1415

@@ -114,7 +115,9 @@ type Client struct {
114115
func NewClient() (*Client, error) {
115116
cacheEndPoint := cacheDefaultEndpoint()
116117
glog.Infof("Connecting to cache endpoint %s", cacheEndPoint)
117-
conn, err := grpc.Dial(cacheEndPoint, grpc.WithDefaultCallOptions(grpc.MaxCallRecvMsgSize(MaxClientGRPCMessageSize)), grpc.WithInsecure())
118+
conn, err := grpc.Dial(cacheEndPoint,
119+
grpc.WithDefaultCallOptions(grpc.MaxCallRecvMsgSize(MaxClientGRPCMessageSize)),
120+
grpc.WithTransportCredentials(insecure.NewCredentials()))
118121
if err != nil {
119122
return nil, fmt.Errorf("metadata.NewClient() failed: %w", err)
120123
}

0 commit comments

Comments
 (0)