From dbdd3601eb398fa94aff8dd10c6ae9a5b1a24e5e Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Tue, 25 Jun 2024 22:59:01 +0200 Subject: [PATCH] vendor: github.com/containerd/ttrpc v1.2.5 full diff: https://github.com/containerd/ttrpc/compare/v1.2.4...v1.2.5 Signed-off-by: Sebastiaan van Stijn --- go.mod | 2 +- go.sum | 4 ++-- vendor/github.com/containerd/ttrpc/README.md | 2 +- vendor/github.com/containerd/ttrpc/client.go | 6 +++--- vendor/github.com/containerd/ttrpc/server.go | 16 ++++++++-------- vendor/modules.txt | 2 +- 6 files changed, 16 insertions(+), 16 deletions(-) diff --git a/go.mod b/go.mod index a8309079..685c5259 100644 --- a/go.mod +++ b/go.mod @@ -82,7 +82,7 @@ require ( github.com/beorn7/perks v1.0.1 // indirect github.com/cenkalti/backoff/v4 v4.2.1 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect - github.com/containerd/ttrpc v1.2.4 // indirect + github.com/containerd/ttrpc v1.2.5 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/docker/distribution v2.8.2+incompatible // indirect github.com/docker/docker-credential-helpers v0.8.2 // indirect diff --git a/go.sum b/go.sum index 2dff1241..5810d633 100644 --- a/go.sum +++ b/go.sum @@ -105,8 +105,8 @@ github.com/containerd/nydus-snapshotter v0.13.7/go.mod h1:VPVKQ3jmHFIcUIV2yiQ1kI github.com/containerd/stargz-snapshotter v0.15.1 h1:fpsP4kf/Z4n2EYnU0WT8ZCE3eiKDwikDhL6VwxIlgeA= github.com/containerd/stargz-snapshotter/estargz v0.15.1 h1:eXJjw9RbkLFgioVaTG+G/ZW/0kEe2oEKCdS/ZxIyoCU= github.com/containerd/stargz-snapshotter/estargz v0.15.1/go.mod h1:gr2RNwukQ/S9Nv33Lt6UC7xEx58C+LHRdoqbEKjz1Kk= -github.com/containerd/ttrpc v1.2.4 h1:eQCQK4h9dxDmpOb9QOOMh2NHTfzroH1IkmHiKZi05Oo= -github.com/containerd/ttrpc v1.2.4/go.mod h1:ojvb8SJBSch0XkqNO0L0YX/5NxR3UnVk2LzFKBK0upc= +github.com/containerd/ttrpc v1.2.5 h1:IFckT1EFQoFBMG4c3sMdT8EP3/aKfumK1msY+Ze4oLU= +github.com/containerd/ttrpc v1.2.5/go.mod h1:YCXHsb32f+Sq5/72xHubdiJRQY9inL4a4ZQrAbN1q9o= github.com/containerd/typeurl/v2 v2.1.1 h1:3Q4Pt7i8nYwy2KmQWIw2+1hTvwTE/6w9FqcttATPO/4= github.com/containerd/typeurl/v2 v2.1.1/go.mod h1:IDp2JFvbwZ31H8dQbEIY7sDl2L3o3HZj1hsSQlywkQ0= github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= diff --git a/vendor/github.com/containerd/ttrpc/README.md b/vendor/github.com/containerd/ttrpc/README.md index 675a5179..ce95f63b 100644 --- a/vendor/github.com/containerd/ttrpc/README.md +++ b/vendor/github.com/containerd/ttrpc/README.md @@ -1,6 +1,6 @@ # ttrpc -[![Build Status](https://github.com/containerd/ttrpc/workflows/CI/badge.svg)](https://github.com/containerd/ttrpc/actions?query=workflow%3ACI) +[![Build Status](https://github.com/containerd/ttrpc/actions/workflows/ci.yml/badge.svg)](https://github.com/containerd/ttrpc/actions/workflows/ci.yml) GRPC for low-memory environments. diff --git a/vendor/github.com/containerd/ttrpc/client.go b/vendor/github.com/containerd/ttrpc/client.go index 685a00a9..b1bc7a3f 100644 --- a/vendor/github.com/containerd/ttrpc/client.go +++ b/vendor/github.com/containerd/ttrpc/client.go @@ -27,7 +27,7 @@ import ( "syscall" "time" - "github.com/sirupsen/logrus" + "github.com/containerd/log" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" "google.golang.org/protobuf/proto" @@ -368,7 +368,7 @@ func (c *Client) receiveLoop() error { sid := streamID(msg.header.StreamID) s := c.getStream(sid) if s == nil { - logrus.WithField("stream", sid).Errorf("ttrpc: received message on inactive stream") + log.G(c.ctx).WithField("stream", sid).Error("ttrpc: received message on inactive stream") continue } @@ -376,7 +376,7 @@ func (c *Client) receiveLoop() error { s.closeWithError(err) } else { if err := s.receive(c.ctx, msg); err != nil { - logrus.WithError(err).WithField("stream", sid).Errorf("ttrpc: failed to handle message") + log.G(c.ctx).WithFields(log.Fields{"error": err, "stream": sid}).Error("ttrpc: failed to handle message") } } } diff --git a/vendor/github.com/containerd/ttrpc/server.go b/vendor/github.com/containerd/ttrpc/server.go index 7af59f82..26419831 100644 --- a/vendor/github.com/containerd/ttrpc/server.go +++ b/vendor/github.com/containerd/ttrpc/server.go @@ -27,7 +27,7 @@ import ( "syscall" "time" - "github.com/sirupsen/logrus" + "github.com/containerd/log" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" ) @@ -109,7 +109,7 @@ func (s *Server) Serve(ctx context.Context, l net.Listener) error { } sleep := time.Duration(rand.Int63n(int64(backoff))) - logrus.WithError(err).Errorf("ttrpc: failed accept; backoff %v", sleep) + log.G(ctx).WithError(err).Errorf("ttrpc: failed accept; backoff %v", sleep) time.Sleep(sleep) continue } @@ -121,14 +121,14 @@ func (s *Server) Serve(ctx context.Context, l net.Listener) error { approved, handshake, err := handshaker.Handshake(ctx, conn) if err != nil { - logrus.WithError(err).Error("ttrpc: refusing connection after handshake") + log.G(ctx).WithError(err).Error("ttrpc: refusing connection after handshake") conn.Close() continue } sc, err := s.newConn(approved, handshake) if err != nil { - logrus.WithError(err).Error("ttrpc: create connection failed") + log.G(ctx).WithError(err).Error("ttrpc: create connection failed") conn.Close() continue } @@ -513,12 +513,12 @@ func (c *serverConn) run(sctx context.Context) { Payload: response.data, }) if err != nil { - logrus.WithError(err).Error("failed marshaling response") + log.G(ctx).WithError(err).Error("failed marshaling response") return } if err := ch.send(response.id, messageTypeResponse, 0, p); err != nil { - logrus.WithError(err).Error("failed sending message on channel") + log.G(ctx).WithError(err).Error("failed sending message on channel") return } } else { @@ -530,7 +530,7 @@ func (c *serverConn) run(sctx context.Context) { flags = flags | flagNoData } if err := ch.send(response.id, messageTypeData, flags, response.data); err != nil { - logrus.WithError(err).Error("failed sending message on channel") + log.G(ctx).WithError(err).Error("failed sending message on channel") return } } @@ -552,7 +552,7 @@ func (c *serverConn) run(sctx context.Context) { // requests, so that the client connection is closed return } - logrus.WithError(err).Error("error receiving message") + log.G(ctx).WithError(err).Error("error receiving message") // else, initiate shutdown case <-shutdown: return diff --git a/vendor/modules.txt b/vendor/modules.txt index 22690ddc..5ded6687 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -201,7 +201,7 @@ github.com/containerd/errdefs # github.com/containerd/log v0.1.0 ## explicit; go 1.20 github.com/containerd/log -# github.com/containerd/ttrpc v1.2.4 +# github.com/containerd/ttrpc v1.2.5 ## explicit; go 1.19 github.com/containerd/ttrpc # github.com/containerd/typeurl/v2 v2.1.1