Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

update dependencies #40

Merged
merged 7 commits into from
Mar 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
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
354 changes: 318 additions & 36 deletions NOTICE

Large diffs are not rendered by default.

13 changes: 6 additions & 7 deletions containerd/exec.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,18 @@ import (
"bytes"
"context"
"encoding/json"
"errors"
"fmt"
"io"
"os/exec"
"strconv"
"sync"

"github.com/sirupsen/logrus"

"github.com/containerd/console"
"github.com/containerd/containerd/log"
"github.com/containerd/containerd/sys/reaper"
runc "github.com/containerd/go-runc"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
)

// execCreate runs the "create" subcommand for runj
Expand Down Expand Up @@ -56,12 +55,12 @@ func execCreate(ctx context.Context, id, bundle string, stdin io.Reader, stdout
con, err := func() (console.Console, error) {
con, err := socket.ReceiveMaster()
if err != nil {
return nil, errors.Wrap(err, "failed to retrieve console master")
return nil, fmt.Errorf("failed to retrieve console master: %w", err)
}
log.G(ctx).WithField("id", id).Warn("Received console master!")
err = copyConsole(ctx, con, stdin, stdout, stderr)
if err != nil {
return nil, errors.Wrap(err, "failed to start console copy")
return nil, fmt.Errorf("failed to start console copy: %w", err)
}
log.G(ctx).WithField("id", id).Warn("Copying console!")
return con, nil
Expand Down Expand Up @@ -221,12 +220,12 @@ func execExec(ctx context.Context, id, processJSONFilename string, stdin io.Read
if socket != nil {
con, err = socket.ReceiveMaster()
if err != nil {
return pid, nil, errors.Wrap(err, "failed to retrieve console master")
return pid, nil, fmt.Errorf("failed to retrieve console master: %w", err)
}
log.G(ctx).WithField("id", id).Warn("Received exec console master!")
err = copyConsole(ctx, con, stdin, stdout, stderr)
if err != nil {
return pid, nil, errors.Wrap(err, "failed to start console copy")
return pid, nil, fmt.Errorf("failed to start console copy: %w", err)
}
log.G(ctx).WithField("id", id).Warn("Copying exec console!")
}
Expand Down
6 changes: 3 additions & 3 deletions containerd/shim.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package containerd
import (
"context"
"encoding/json"
"errors"
"fmt"
"os"
"os/exec"
Expand Down Expand Up @@ -36,7 +37,6 @@ import (
ptypes "github.com/gogo/protobuf/types"
"github.com/moby/sys/mount"
specs "github.com/opencontainers/runtime-spec/specs-go"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
"golang.org/x/sys/unix"
)
Expand Down Expand Up @@ -220,7 +220,7 @@ func (s *service) StartShim(ctx context.Context, opts shim.StartOpts) (string, e
return "", err
}
if err := shim.RemoveSocket(address); err != nil {
return "", errors.Wrap(err, "remove already used socket")
return "", fmt.Errorf("remove already used socket: %w", err)
}
if socket, err = shim.NewSocket(address); err != nil {
return "", err
Expand Down Expand Up @@ -427,7 +427,7 @@ func (s *service) Create(ctx context.Context, req *task.CreateTaskRequest) (*tas
for _, rm := range mounts {
log.G(ctx).WithField("mount", rm).WithField("rootfs", rootfs).Warn("mount")
if err := mount.Mount(rm.Source, rootfs, rm.Type, strings.Join(rm.Options, ",")); err != nil {
return nil, errors.Wrapf(err, "failed to mount rootfs component %v", rm)
return nil, fmt.Errorf("failed to mount rootfs component %v: %w", rm, err)
}
}

Expand Down
22 changes: 10 additions & 12 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,22 @@ module go.sbk.wtf/runj
go 1.16

require (
github.com/bxcodec/faker v2.0.1+incompatible
github.com/cheggaaa/pb/v3 v3.0.5
github.com/containerd/console v1.0.3-0.20210412134321-2298a9c8aead
github.com/containerd/containerd v1.5.13
github.com/cheggaaa/pb/v3 v3.1.2
github.com/containerd/console v1.0.3
github.com/containerd/containerd v1.6.19
github.com/containerd/fifo v1.0.0
github.com/containerd/go-runc v1.0.0
github.com/containerd/typeurl v1.0.2
github.com/go-faker/faker/v4 v4.1.0
github.com/gogo/protobuf v1.3.2
github.com/hashicorp/go-multierror v1.1.0 // indirect
github.com/moby/sys/mount v0.3.3
github.com/opencontainers/go-digest v1.0.0
github.com/opencontainers/image-spec v1.0.2
github.com/opencontainers/image-spec v1.0.3-0.20211202183452-c5a74bcca799
github.com/opencontainers/runtime-spec v1.0.3-0.20210326190908-1c3f411f0417
github.com/pkg/errors v0.9.1
github.com/sirupsen/logrus v1.8.1
github.com/spf13/cobra v1.0.0
github.com/sirupsen/logrus v1.9.0
github.com/spf13/cobra v1.6.1
github.com/stretchr/testify v1.7.0
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a
google.golang.org/grpc v1.34.0 // indirect
gotest.tools/v3 v3.0.3
golang.org/x/sys v0.6.0
golang.org/x/text v0.8.0 // indirect
gotest.tools/v3 v3.4.0
)
Loading