From 8ced86f797c201c069cfcf753398c353ff1560f1 Mon Sep 17 00:00:00 2001 From: Maria Ines Parnisari Date: Mon, 19 Feb 2024 19:22:39 -0300 Subject: [PATCH] update versions and run buf mod update and make proto --- buf.gen.yaml | 4 ++-- buf.lock | 9 +++++++-- buf.yaml | 1 + gubernator.pb.go | 2 +- gubernator.pb.gw.go | 14 +++----------- peers.pb.go | 2 +- 6 files changed, 15 insertions(+), 17 deletions(-) diff --git a/buf.gen.yaml b/buf.gen.yaml index a3c4a178..e33825e3 100755 --- a/buf.gen.yaml +++ b/buf.gen.yaml @@ -2,7 +2,7 @@ --- version: v1 plugins: - - plugin: buf.build/protocolbuffers/go:v1.28.1 + - plugin: buf.build/protocolbuffers/go:v1.32.0 out: ./ opt: paths=source_relative - plugin: buf.build/grpc/go:v1.3.0 @@ -10,7 +10,7 @@ plugins: opt: - paths=source_relative - require_unimplemented_servers=false - - plugin: buf.build/grpc-ecosystem/gateway:v2.15.0 + - plugin: buf.build/grpc-ecosystem/gateway:v2.19.1 out: ./ opt: - paths=source_relative diff --git a/buf.lock b/buf.lock index 4144ecf5..ac0a444b 100644 --- a/buf.lock +++ b/buf.lock @@ -4,5 +4,10 @@ deps: - remote: buf.build owner: googleapis repository: googleapis - commit: a86849a25cc04f4dbe9b15ddddfbc488 - digest: shake256:e19143328f8cbfe13fc226aeee5e63773ca494693a72740a7560664270039a380d94a1344234b88c7691311460df9a9b1c2982190d0a2612eae80368718e1943 + commit: 7e6f6e774e29406da95bd61cdcdbc8bc + digest: shake256:fe43dd2265ea0c07d76bd925eeba612667cf4c948d2ce53d6e367e1b4b3cb5fa69a51e6acb1a6a50d32f894f054a35e6c0406f6808a483f2752e10c866ffbf73 + - remote: buf.build + owner: grpc-ecosystem + repository: grpc-gateway + commit: 3f42134f4c564983838425bc43c7a65f + digest: shake256:3d11d4c0fe5e05fda0131afefbce233940e27f0c31c5d4e385686aea58ccd30f72053f61af432fa83f1fc11cda57f5f18ca3da26a29064f73c5a0d076bba8d92 diff --git a/buf.yaml b/buf.yaml index b6d13510..ab338221 100644 --- a/buf.yaml +++ b/buf.yaml @@ -1,6 +1,7 @@ version: v1 deps: - buf.build/googleapis/googleapis + - buf.build/grpc-ecosystem/grpc-gateway build: excludes: [] breaking: diff --git a/gubernator.pb.go b/gubernator.pb.go index 310635f6..808a8814 100644 --- a/gubernator.pb.go +++ b/gubernator.pb.go @@ -15,7 +15,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 +// protoc-gen-go v1.32.0 // protoc (unknown) // source: gubernator.proto diff --git a/gubernator.pb.gw.go b/gubernator.pb.gw.go index 1c67924b..19c0ddab 100644 --- a/gubernator.pb.gw.go +++ b/gubernator.pb.gw.go @@ -35,11 +35,7 @@ func request_V1_GetRateLimits_0(ctx context.Context, marshaler runtime.Marshaler var protoReq GetRateLimitsReq var metadata runtime.ServerMetadata - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } @@ -52,11 +48,7 @@ func local_request_V1_GetRateLimits_0(ctx context.Context, marshaler runtime.Mar var protoReq GetRateLimitsReq var metadata runtime.ServerMetadata - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } @@ -145,7 +137,7 @@ func RegisterV1HandlerServer(ctx context.Context, mux *runtime.ServeMux, server // RegisterV1HandlerFromEndpoint is same as RegisterV1Handler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterV1HandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.Dial(endpoint, opts...) + conn, err := grpc.DialContext(ctx, endpoint, opts...) if err != nil { return err } diff --git a/peers.pb.go b/peers.pb.go index c46650b7..a805b29a 100644 --- a/peers.pb.go +++ b/peers.pb.go @@ -15,7 +15,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 +// protoc-gen-go v1.32.0 // protoc (unknown) // source: peers.proto