Skip to content

Commit

Permalink
Bump google.golang.org/grpc from 1.42.0 to 1.43.0 (#2643)
Browse files Browse the repository at this point in the history
* Bump google.golang.org/grpc from 1.42.0 to 1.43.0

Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.42.0 to 1.43.0.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](grpc/grpc-go@v1.42.0...v1.43.0)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* Updated usages to non-deprecated forms

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Martin Hutchinson <[email protected]>
  • Loading branch information
dependabot[bot] and mhutchinson authored Dec 21, 2021
1 parent 5498685 commit 111e936
Show file tree
Hide file tree
Showing 12 changed files with 23 additions and 14 deletions.
3 changes: 2 additions & 1 deletion client/rpcflags/rpcflags.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import (
"github.com/golang/glog"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials"
"google.golang.org/grpc/credentials/insecure"
)

// tlsCertFile is the flag-assigned value for the path to the Trillian server's TLS certificate.
Expand All @@ -32,7 +33,7 @@ func NewClientDialOptionsFromFlags() ([]grpc.DialOption, error) {

if *tlsCertFile == "" {
glog.Warning("Using an insecure gRPC connection to Trillian")
dialOpts = append(dialOpts, grpc.WithInsecure())
dialOpts = append(dialOpts, grpc.WithTransportCredentials(insecure.NewCredentials()))
} else {
creds, err := credentials.NewClientTLSFromFile(*tlsCertFile, "")
if err != nil {
Expand Down
3 changes: 2 additions & 1 deletion client/rpcflags/rpcflags_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,14 @@ import (
"github.com/google/trillian/testonly/setup"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials"
"google.golang.org/grpc/credentials/insecure"
)

func TestNewClientDialOptionsFromFlagsWithTLSCertFileNotSet(t *testing.T) {
// Set up Trillian servers
const numSequencers = 2
serverOpts := []grpc.ServerOption{}
clientOpts := []grpc.DialOption{grpc.WithInsecure()}
clientOpts := []grpc.DialOption{grpc.WithTransportCredentials(insecure.NewCredentials())}
logEnv, err := integration.NewLogEnvWithGRPCOptions(context.Background(), numSequencers, serverOpts, clientOpts)
if err != nil {
t.Fatal(err)
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ require (
golang.org/x/tools v0.1.8
google.golang.org/api v0.63.0
google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa
google.golang.org/grpc v1.42.0
google.golang.org/grpc v1.43.0
google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0
google.golang.org/protobuf v1.27.1
)
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1384,8 +1384,8 @@ google.golang.org/grpc v1.39.0/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnD
google.golang.org/grpc v1.39.1/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE=
google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34=
google.golang.org/grpc v1.40.1/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34=
google.golang.org/grpc v1.42.0 h1:XT2/MFpuPFsEX2fWh3YQtHkZ+WYZFQRfaUgLZYj/p6A=
google.golang.org/grpc v1.42.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU=
google.golang.org/grpc v1.43.0 h1:Eeu7bZtDZ2DpRCsLhUlcrLnvYaMK1Gz86a+hMVvELmM=
google.golang.org/grpc v1.43.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU=
google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0 h1:M1YKkFIboKNieVO5DLUEVzQfGwJD30Nv2jfUgzb5UcE=
google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw=
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
Expand Down
3 changes: 2 additions & 1 deletion integration/admin/admin_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import (
"google.golang.org/genproto/protobuf/field_mask"
"google.golang.org/grpc"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/credentials/insecure"
"google.golang.org/grpc/status"
"google.golang.org/protobuf/proto"
"google.golang.org/protobuf/types/known/timestamppb"
Expand Down Expand Up @@ -604,7 +605,7 @@ func setupAdminServer(ctx context.Context, t *testing.T) (*testServer, error) {
}
}()

ts.conn, err = grpc.Dial(ts.lis.Addr().String(), grpc.WithInsecure())
ts.conn, err = grpc.Dial(ts.lis.Addr().String(), grpc.WithTransportCredentials(insecure.NewCredentials()))
if err != nil {
ts.closeAll()
return nil, err
Expand Down
3 changes: 2 additions & 1 deletion integration/log_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import (
"time"

"google.golang.org/grpc"
"google.golang.org/grpc/credentials/insecure"

"github.com/google/trillian"
"github.com/google/trillian/client"
Expand Down Expand Up @@ -80,7 +81,7 @@ func TestLiveLogIntegration(t *testing.T) {
defer cancel()

// TODO: Other options apart from insecure connections
conn, err := grpc.DialContext(ctx, *serverFlag, grpc.WithInsecure())
conn, err := grpc.DialContext(ctx, *serverFlag, grpc.WithTransportCredentials(insecure.NewCredentials()))
if err != nil {
t.Fatalf("Failed to connect to log server: %v", err)
}
Expand Down
4 changes: 2 additions & 2 deletions integration/quota/quota_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ import (
"github.com/google/trillian/util/clock"
"google.golang.org/grpc"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/credentials/insecure"
"google.golang.org/grpc/status"

grpc_middleware "github.com/grpc-ecosystem/go-grpc-middleware"
Expand Down Expand Up @@ -240,8 +241,7 @@ func newTestServer(registry extension.Registry) (*testServer, error) {
s.close()
return nil, err
}

s.conn, err = grpc.Dial(s.lis.Addr().String(), grpc.WithInsecure())
s.conn, err = grpc.Dial(s.lis.Addr().String(), grpc.WithTransportCredentials(insecure.NewCredentials()))
if err != nil {
s.close()
return nil, err
Expand Down
3 changes: 2 additions & 1 deletion quota/etcd/quotaapi/quota_server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ import (
"google.golang.org/genproto/protobuf/field_mask"
"google.golang.org/grpc"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/credentials/insecure"
"google.golang.org/grpc/status"
"google.golang.org/protobuf/proto"
)
Expand Down Expand Up @@ -805,7 +806,7 @@ func startServer(etcdClient *clientv3.Client) (quotapb.QuotaClient, func(), erro
quotapb.RegisterQuotaServer(s, NewServer(etcdClient))
go s.Serve(lis)

conn, err = grpc.Dial(lis.Addr().String(), grpc.WithInsecure())
conn, err = grpc.Dial(lis.Addr().String(), grpc.WithTransportCredentials(insecure.NewCredentials()))
if err != nil {
cleanup()
return nil, nil, err
Expand Down
3 changes: 2 additions & 1 deletion storage/cloudspanner/getdb_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import (
"cloud.google.com/go/spanner/spannertest"
"google.golang.org/api/option"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials/insecure"

database "cloud.google.com/go/spanner/admin/database/apiv1"
databasepb "google.golang.org/genproto/googleapis/spanner/admin/database/v1"
Expand Down Expand Up @@ -94,7 +95,7 @@ func inMemClient(ctx context.Context, t testing.TB, dbName string, statements []
srv.SetLogger(t.Logf)
dialCtx, cancel := context.WithTimeout(ctx, 1*time.Second)
defer cancel()
conn, err := grpc.DialContext(dialCtx, srv.Addr, grpc.WithInsecure())
conn, err := grpc.DialContext(dialCtx, srv.Addr, grpc.WithTransportCredentials(insecure.NewCredentials()))
if err != nil {
t.Fatalf("Dialing in-memory fake: %v", err)
}
Expand Down
3 changes: 2 additions & 1 deletion testonly/integration/logenv.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import (

"github.com/golang/glog"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials/insecure"

"github.com/google/trillian"
"github.com/google/trillian/extension"
Expand Down Expand Up @@ -164,7 +165,7 @@ func NewLogEnvWithRegistryAndGRPCOptions(ctx context.Context, numSequencers int,

// Connect to the server.
if clientOpts == nil {
clientOpts = []grpc.DialOption{grpc.WithInsecure()}
clientOpts = []grpc.DialOption{grpc.WithTransportCredentials(insecure.NewCredentials())}
}

cc, err := grpc.Dial(addr, clientOpts...)
Expand Down
3 changes: 2 additions & 1 deletion testonly/mdm/mdmtest/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import (
"github.com/google/trillian/util"
"github.com/prometheus/client_golang/prometheus/promhttp"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials/insecure"
"google.golang.org/protobuf/types/known/durationpb"
)

Expand Down Expand Up @@ -68,7 +69,7 @@ func innerMain(ctx context.Context) error {
}()
}

dialOpts := []grpc.DialOption{grpc.WithInsecure()}
dialOpts := []grpc.DialOption{grpc.WithTransportCredentials(insecure.NewCredentials())}
c, err := grpc.Dial(*rpcServer, dialOpts...)
if err != nil {
glog.Exitf("Failed to create log client conn: %v", err)
Expand Down
3 changes: 2 additions & 1 deletion testonly/mock_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import (
"github.com/google/trillian"
"github.com/google/trillian/testonly/tmock"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials/insecure"
)

// MockServer implements the TrillianAdminServer, and TrillianLogServer.
Expand Down Expand Up @@ -49,7 +50,7 @@ func NewMockServer(ctrl *gomock.Controller) (*MockServer, func(), error) {
}
go grpcServer.Serve(lis)

cc, err := grpc.Dial(lis.Addr().String(), grpc.WithInsecure())
cc, err := grpc.Dial(lis.Addr().String(), grpc.WithTransportCredentials(insecure.NewCredentials()))
if err != nil {
grpcServer.Stop()
lis.Close()
Expand Down

0 comments on commit 111e936

Please sign in to comment.