Skip to content
New issue

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

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

Already on GitHub? # to your account

DEPS: upgrade grpc to v1.68.0 #136278

Closed
wants to merge 15 commits into from
Closed
Changes from 1 commit
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
Prev Previous commit
Next Next commit
*: silence deprecation warnings
These will fire after the gRPC bump in the subsequent commits.
  • Loading branch information
tbg committed Dec 2, 2024
commit 11aed7d0745760a691cccc8dee1f2dda76ed7331
1 change: 1 addition & 0 deletions pkg/ccl/changefeedccl/sink_pubsub_v2.go
Original file line number Diff line number Diff line change
@@ -328,6 +328,7 @@ func makePublisherClient(
// See https://pkg.go.dev/cloud.google.com/go/pubsub#hdr-Emulator for emulator information.
if addr, _ := envutil.ExternalEnvString("PUBSUB_EMULATOR_HOST", 1); addr != "" {
log.Infof(ctx, "Establishing connection to pubsub emulator at %s", addr)
//lint:ignore SA1019 grpc.Dial is deprecated
conn, err := grpc.Dial(addr, grpc.WithTransportCredentials(insecure.NewCredentials()))
if err != nil {
return nil, errors.Newf("grpc.Dial: %w", err)
1 change: 1 addition & 0 deletions pkg/ccl/changefeedccl/testfeed_test.go
Original file line number Diff line number Diff line change
@@ -2465,6 +2465,7 @@ func (s *fakePubsubServer) NotifyMessage() chan struct{} {
}

func (ps *fakePubsubServer) Dial() (*grpc.ClientConn, error) {
//lint:ignore SA1019 grpc.Dial is deprecated
return grpc.Dial(ps.srv.Addr, grpc.WithTransportCredentials(insecure.NewCredentials()))
}

5 changes: 5 additions & 0 deletions pkg/ccl/sqlproxyccl/proxy_handler.go
Original file line number Diff line number Diff line change
@@ -228,6 +228,8 @@ func newProxyHandler(
if !ok {
return nil, errors.New("unsupported test directory server")
}

//lint:ignore SA1019 grpc.DialContext is deprecated
conn, err = grpc.DialContext(
ctx,
"",
@@ -238,6 +240,7 @@ func newProxyHandler(
return nil, err
}
} else if handler.DirectoryAddr != "" {
//lint:ignore SA1019 grpc.Dial is deprecated
conn, err = grpc.Dial(
handler.DirectoryAddr,
grpc.WithTransportCredentials(insecure.NewCredentials()),
@@ -258,6 +261,8 @@ func newProxyHandler(
dialerFunc := func(ctx context.Context, addr string) (net.Conn, error) {
return ln.DialContext(ctx)
}

//lint:ignore SA1019 grpc.DialContext is deprecated
conn, err = grpc.DialContext(
ctx,
"",
1 change: 1 addition & 0 deletions pkg/ccl/sqlproxyccl/tenantdirsvr/testutils.go
Original file line number Diff line number Diff line change
@@ -34,6 +34,7 @@ func SetupTestDirectory(
require.NoError(t, directoryServer.Start(ctx))

// Dial the test directory server.
//lint:ignore SA1019 grpc.DialContext is deprecated
conn, err := grpc.DialContext(
ctx,
"",
3 changes: 3 additions & 0 deletions pkg/rpc/context.go
Original file line number Diff line number Diff line change
@@ -1602,6 +1602,7 @@ func (rpcCtx *Context) dialOptsNetwork(

// Don't retry on dial errors either, otherwise the onlyOnceDialer will get
// into a bad state for connection errors.
//lint:ignore SA1019 grpc.FailOnNonTempDialError is deprecated
dialOpts = append(dialOpts, grpc.FailOnNonTempDialError(true))

return dialOpts, nil
@@ -1951,6 +1952,7 @@ func (rpcCtx *Context) grpcDialRaw(

dialOpts = append(dialOpts, additionalOpts...)

//lint:ignore SA1019 grpc.DialContext is deprecated
return grpc.DialContext(ctx, target, dialOpts...)
}

@@ -2146,6 +2148,7 @@ func VerifyDialback(
// A throwaway connection keeps it simple.
ctx := rpcCtx.wrapCtx(ctx, target, request.OriginNodeID, SystemClass)
ctx = logtags.AddTag(ctx, "dialback", nil)
//lint:ignore SA1019 grpc.WithBlock is deprecated
conn, err := rpcCtx.grpcDialRaw(ctx, target, SystemClass, grpc.WithBlock())
if conn != nil { // NB: the nil check simplifies mocking in TestVerifyDialback
_ = conn.Close() // nolint:grpcconnclose
2 changes: 2 additions & 0 deletions pkg/server/authserver/authentication_test.go
Original file line number Diff line number Diff line change
@@ -900,6 +900,7 @@ func TestGRPCAuthentication(t *testing.T) {
}, false},
}

//lint:ignore SA1019 grpc.DialContext is deprecated
conn, err := grpc.DialContext(ctx, ts.RPCAddr(),
grpc.WithTransportCredentials(credentials.NewTLS(&tls.Config{
InsecureSkipVerify: true,
@@ -931,6 +932,7 @@ func TestGRPCAuthentication(t *testing.T) {
if err != nil {
t.Fatal(err)
}
//lint:ignore SA1019 grpc.DialContext is deprecated
conn, err = grpc.DialContext(ctx, ts.RPCAddr(),
grpc.WithTransportCredentials(credentials.NewTLS(tlsConfig)))
if err != nil {
1 change: 1 addition & 0 deletions pkg/server/connectivity_test.go
Original file line number Diff line number Diff line change
@@ -208,6 +208,7 @@ func TestClusterConnectivity(t *testing.T) {
return err
}

//lint:ignore SA1019 grpc.DialContext is deprecated
conn, err := grpc.DialContext(ctx, target, dialOpts...)
if err != nil {
return err
1 change: 1 addition & 0 deletions pkg/server/grpc_gateway.go
Original file line number Diff line number Diff line change
@@ -91,6 +91,7 @@ func configureGRPCGateway(
telemetry.Inc(getServerEndpointCounter(method))
return invoker(ctx, method, req, reply, cc, opts...)
}
//lint:ignore SA1019 grpc.DialContext is deprecated
conn, err := grpc.DialContext(ctx, GRPCAddr, append(
dialOpts,
grpc.WithUnaryInterceptor(callCountInterceptor),
2 changes: 2 additions & 0 deletions pkg/server/init.go
Original file line number Diff line number Diff line change
@@ -479,6 +479,8 @@ func (s *initServer) attemptJoinTo(
if err != nil {
return nil, err
}

//lint:ignore SA1019 grpc.DialContext is deprecated
conn, err := grpc.DialContext(ctx, addr, dialOpts...)
if err != nil {
return nil, err
Original file line number Diff line number Diff line change
@@ -226,6 +226,7 @@ func TestGRPCInterceptors(t *testing.T) {
t.Error(err)
}
}))
//lint:ignore SA1019 grpc.DialContext is deprecated
conn, err := grpc.DialContext(bgCtx, ln.Addr().String(),
//lint:ignore SA1019 grpc.WithInsecure is deprecated
grpc.WithInsecure(),