From 283ed048dceff25757d80648f3bce29c2c69d68c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 9 Apr 2024 06:56:05 -0400 Subject: [PATCH] build(deps): Bump google.golang.org/grpc from 1.62.1 to 1.63.0 (#2072) * build(deps): Bump google.golang.org/grpc from 1.62.1 to 1.63.0 Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.62.1 to 1.63.0. - [Release notes](https://github.com/grpc/grpc-go/releases) - [Commits](https://github.com/grpc/grpc-go/compare/v1.62.1...v1.63.0) --- updated-dependencies: - dependency-name: google.golang.org/grpc dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * update deprecated method Signed-off-by: cpanato * fix lints Signed-off-by: cpanato --------- Signed-off-by: dependabot[bot] Signed-off-by: cpanato Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: cpanato --- go.mod | 2 +- go.sum | 4 ++-- pkg/api/api.go | 11 ++++------- 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/go.mod b/go.mod index b5343cc85..ad46b1836 100644 --- a/go.mod +++ b/go.mod @@ -42,7 +42,7 @@ require ( golang.org/x/net v0.24.0 golang.org/x/sync v0.6.0 google.golang.org/genproto v0.0.0-20240311173647-c811ad7063a7 // indirect - google.golang.org/grpc v1.62.1 + google.golang.org/grpc v1.63.0 google.golang.org/protobuf v1.33.0 gopkg.in/ini.v1 v1.67.0 sigs.k8s.io/release-utils v0.8.1 diff --git a/go.sum b/go.sum index 36e92663f..a722e26f2 100644 --- a/go.sum +++ b/go.sum @@ -588,8 +588,8 @@ google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyac google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= -google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= +google.golang.org/grpc v1.63.0 h1:WjKe+dnvABXyPJMD7KDNLxtoGk5tgk+YFWN6cBWjZE8= +google.golang.org/grpc v1.63.0/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= diff --git a/pkg/api/api.go b/pkg/api/api.go index adee58105..aba59b25e 100644 --- a/pkg/api/api.go +++ b/pkg/api/api.go @@ -22,7 +22,6 @@ import ( "crypto/x509" "encoding/hex" "fmt" - "time" "github.com/google/trillian" "github.com/redis/go-redis/v9" @@ -46,16 +45,14 @@ import ( _ "github.com/sigstore/rekor/pkg/pubsub/gcp" // Load GCP pubsub implementation ) -func dial(ctx context.Context, rpcServer string) (*grpc.ClientConn, error) { - ctx, cancel := context.WithTimeout(ctx, 5*time.Second) - defer cancel() - +func dial(rpcServer string) (*grpc.ClientConn, error) { // Set up and test connection to rpc server creds := insecure.NewCredentials() - conn, err := grpc.DialContext(ctx, rpcServer, grpc.WithTransportCredentials(creds)) + conn, err := grpc.NewClient(rpcServer, grpc.WithTransportCredentials(creds)) if err != nil { log.Logger.Fatalf("Failed to connect to RPC server:", err) } + return conn, nil } @@ -78,7 +75,7 @@ func NewAPI(treeID uint) (*API, error) { viper.GetString("trillian_log_server.address"), viper.GetUint("trillian_log_server.port")) ctx := context.Background() - tConn, err := dial(ctx, logRPCServer) + tConn, err := dial(logRPCServer) if err != nil { return nil, fmt.Errorf("dial: %w", err) }