Skip to content

Commit

Permalink
Merge pull request #97 from estesp/update-vendors
Browse files Browse the repository at this point in the history
Update vendors
  • Loading branch information
estesp authored Mar 15, 2024
2 parents 48f2a7e + 837ae1c commit 7c6a828
Show file tree
Hide file tree
Showing 835 changed files with 108,361 additions and 74,454 deletions.
12 changes: 5 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,32 +14,30 @@ jobs:
timeout-minutes: 5

steps:
- uses: actions/setup-go@v3
- uses: actions/setup-go@v5
with:
go-version: 1.20.x
go-version: 1.22.x

- name: Set env
shell: bash
run: |
echo "GOPATH=${{ github.workspace }}" >> $GITHUB_ENV
echo "${{ github.workspace }}/bin" >> $GITHUB_PATH
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
path: src/github.com/estesp/bucketbench
fetch-depth: 25

- name: Linter
uses: golangci/golangci-lint-action@v3
with:
version: v1.51.1
version: v1.55.2
skip-cache: true
working-directory: src/github.com/estesp/bucketbench

- name: Install dependencies
env:
GO111MODULE: off
run: go get -u github.com/vbatts/git-validation
run: go install github.com/vbatts/git-validation@latest

- name: DCO
env:
Expand Down
4 changes: 1 addition & 3 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
linters:
enable:
- structcheck
- varcheck
- staticcheck
- unconvert
- gofmt
Expand All @@ -27,4 +25,4 @@ issues:
- gosec

run:
timeout: 2m
timeout: 3m
8 changes: 4 additions & 4 deletions benches/limit.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,18 @@ type LimitBench struct {
}

// Init initializes the benchmark
func (lb *LimitBench) Init(ctx context.Context, name string, driverType driver.Type, binaryPath, imageInfo, cmdOverride string, trace bool) error {
func (lb *LimitBench) Init(_ context.Context, _ string, _ driver.Type, _, _, _ string, _ bool) error {
return nil
}

// Validate the unit of benchmark execution
func (lb *LimitBench) Validate(ctx context.Context) error {
func (lb *LimitBench) Validate(_ context.Context) error {
return nil
}

// Run executes the benchmark iterations against a specific engine driver type
// for a specified number of iterations
func (lb *LimitBench) Run(ctx context.Context, threads, iterations int, commands []string) error {
func (lb *LimitBench) Run(ctx context.Context, threads, iterations int, _ []string) error {
log.Infof("Start LimitBench run: threads (%d); iterations (%d)", threads, iterations)
statChan := make([]chan RunStatistics, threads)
for i := range statChan {
Expand Down Expand Up @@ -94,6 +94,6 @@ func (lb *LimitBench) Type() Type {
}

// Info returns a string with the driver type and custom benchmark name
func (lb *LimitBench) Info(ctx context.Context) (string, error) {
func (lb *LimitBench) Info(_ context.Context) (string, error) {
return "Limit benchmark: No driver", nil
}
4 changes: 2 additions & 2 deletions driver/containerd.go
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ func (r *ContainerdDriver) Info(ctx context.Context) (string, error) {

// Create will create a container instance matching the specific needs
// of a driver
func (r *ContainerdDriver) Create(ctx context.Context, name, image, cmdOverride string, detached bool, trace bool) (Container, error) {
func (r *ContainerdDriver) Create(ctx context.Context, name, image, cmdOverride string, _ bool, trace bool) (Container, error) {
ctx = namespaces.WithNamespace(ctx, containerdNamespace)

// we need to convert the bare Docker image name to a fully resolved
Expand All @@ -261,7 +261,7 @@ func (r *ContainerdDriver) Create(ctx context.Context, name, image, cmdOverride
if _, err := r.client.GetImage(ctx, fullImageName); err != nil {
// if the image isn't already in our namespaced context, then pull it
// using the reference and default resolver (most likely DockerHub)
if _, err := r.client.Pull(ctx, fullImageName, containerd.WithPullUnpack, containerd.WithSchema1Conversion); err != nil {
if _, err := r.client.Pull(ctx, fullImageName, containerd.WithPullUnpack); err != nil {
// error pulling the image
return nil, err
}
Expand Down
6 changes: 3 additions & 3 deletions driver/containerd_ctr.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,12 +122,12 @@ func (r *CtrDriver) PID() (int, error) {
}

// Wait blocks thread until container stop
func (r *CtrDriver) Wait(ctx context.Context, ctr Container) (string, time.Duration, error) {
func (r *CtrDriver) Wait(_ context.Context, _ Container) (string, time.Duration, error) {
return "", 0, errors.New("not implemented")
}

// Stats returns stats data from daemon for container
func (r *CtrDriver) Stats(ctx context.Context, ctr Container) (io.ReadCloser, error) {
func (r *CtrDriver) Stats(_ context.Context, _ Container) (io.ReadCloser, error) {
return nil, errors.New("not implemented")
}

Expand All @@ -154,7 +154,7 @@ func (r *CtrDriver) Info(ctx context.Context) (string, error) {

// Create will create a container instance matching the specific needs
// of a driver
func (r *CtrDriver) Create(ctx context.Context, name, image, cmdOverride string, detached bool, trace bool) (Container, error) {
func (r *CtrDriver) Create(_ context.Context, name, image, _ string, _ bool, trace bool) (Container, error) {
return newCtrContainer(name, image, trace), nil
}

Expand Down
14 changes: 7 additions & 7 deletions driver/cri.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ import (

log "github.com/sirupsen/logrus"
"google.golang.org/grpc"
pb "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
pb "k8s.io/cri-api/pkg/apis/runtime/v1"
)

const (
defaultPodImage = "k8s.gcr.io/pause:3.1"
defaultPodImage = "registry.k8s.io/pause:3.5"
defaultPodNamePrefix = "pod"
defaultSandboxConfig = "contrib/sandbox_config.json"
defaultContainerConfig = "contrib/container_config.json"
Expand Down Expand Up @@ -156,7 +156,7 @@ func (c *CRIDriver) Path() string {

// Create will create a container instance matching the specific needs
// of a driver
func (c *CRIDriver) Create(ctx context.Context, name, image, cmdOverride string, detached bool, trace bool) (Container, error) {
func (c *CRIDriver) Create(ctx context.Context, name, image, cmdOverride string, _ bool, trace bool) (Container, error) {
if status, err := (*c.imageClient).ImageStatus(ctx, &pb.ImageStatusRequest{Image: &pb.ImageSpec{Image: image}}); err != nil || status.Image == nil {
if _, err := (*c.imageClient).PullImage(ctx, &pb.PullImageRequest{Image: &pb.ImageSpec{Image: image}}); err != nil {
return nil, err
Expand Down Expand Up @@ -298,13 +298,13 @@ func (c *CRIDriver) Remove(ctx context.Context, ctr Container) (string, time.Dur

// Pause will pause a container
// not supported in CRI API
func (c *CRIDriver) Pause(ctx context.Context, ctr Container) (string, time.Duration, error) {
func (c *CRIDriver) Pause(_ context.Context, _ Container) (string, time.Duration, error) {
return "", 0, nil
}

// Unpause will unpause/resume a container
// not supported in CRI API
func (c *CRIDriver) Unpause(ctx context.Context, ctr Container) (string, time.Duration, error) {
func (c *CRIDriver) Unpause(_ context.Context, _ Container) (string, time.Duration, error) {
return "", 0, nil
}

Expand All @@ -320,12 +320,12 @@ func (c *CRIDriver) PID() (int, error) {
}

// Wait blocks thread until container stop
func (c *CRIDriver) Wait(ctx context.Context, ctr Container) (string, time.Duration, error) {
func (c *CRIDriver) Wait(_ context.Context, _ Container) (string, time.Duration, error) {
return "", 0, errors.New("not implemented")
}

// Stats returns stats data from daemon for container
func (c *CRIDriver) Stats(ctx context.Context, ctr Container) (io.ReadCloser, error) {
func (c *CRIDriver) Stats(_ context.Context, _ Container) (io.ReadCloser, error) {
return nil, errors.New("not implemented")
}

Expand Down
6 changes: 3 additions & 3 deletions driver/crun.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,12 +123,12 @@ func (r *CRunDriver) PID() (int, error) {
}

// Wait will block until container stop
func (r *CRunDriver) Wait(ctx context.Context, ctr Container) (string, time.Duration, error) {
func (r *CRunDriver) Wait(_ context.Context, _ Container) (string, time.Duration, error) {
return "", 0, errors.New("not implemented")
}

// Stats returns stats data from daemon for container
func (r *CRunDriver) Stats(ctx context.Context, ctr Container) (io.ReadCloser, error) {
func (r *CRunDriver) Stats(_ context.Context, _ Container) (io.ReadCloser, error) {
return nil, errors.New("not implemented")
}

Expand All @@ -149,7 +149,7 @@ func (r *CRunDriver) Info(ctx context.Context) (string, error) {

// Create will create a container instance matching the specific needs
// of a driver
func (r *CRunDriver) Create(ctx context.Context, name, image, cmdOverride string, detached bool, trace bool) (Container, error) {
func (r *CRunDriver) Create(_ context.Context, name, image, _ string, detached bool, _ bool) (Container, error) {
return newCRunContainer(name, image, detached, false), nil
}

Expand Down
2 changes: 1 addition & 1 deletion driver/docker_cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ func (d *DockerCLIDriver) Info(ctx context.Context) (string, error) {

// Create will create a container instance matching the specific needs
// of a driver
func (d *DockerCLIDriver) Create(ctx context.Context, name, image, cmdOverride string, detached bool, trace bool) (Container, error) {
func (d *DockerCLIDriver) Create(_ context.Context, name, image, cmdOverride string, detached bool, trace bool) (Container, error) {
return newDockerContainer(name, image, cmdOverride, detached, trace), nil
}

Expand Down
6 changes: 3 additions & 3 deletions driver/runc.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,12 +123,12 @@ func (r *RuncDriver) PID() (int, error) {
}

// Wait will block until container stop
func (r *RuncDriver) Wait(ctx context.Context, ctr Container) (string, time.Duration, error) {
func (r *RuncDriver) Wait(_ context.Context, _ Container) (string, time.Duration, error) {
return "", 0, errors.New("not implemented")
}

// Stats returns stats data from daemon for container
func (r *RuncDriver) Stats(ctx context.Context, ctr Container) (io.ReadCloser, error) {
func (r *RuncDriver) Stats(_ context.Context, _ Container) (io.ReadCloser, error) {
return nil, errors.New("not implemented")
}

Expand All @@ -149,7 +149,7 @@ func (r *RuncDriver) Info(ctx context.Context) (string, error) {

// Create will create a container instance matching the specific needs
// of a driver
func (r *RuncDriver) Create(ctx context.Context, name, image, cmdOverride string, detached bool, trace bool) (Container, error) {
func (r *RuncDriver) Create(_ context.Context, name, image, _ string, detached bool, trace bool) (Container, error) {
return newRuncContainer(name, image, detached, trace), nil
}

Expand Down
6 changes: 3 additions & 3 deletions driver/youki.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,12 +123,12 @@ func (r *YoukiDriver) PID() (int, error) {
}

// Wait will block until container stop
func (r *YoukiDriver) Wait(ctx context.Context, ctr Container) (string, time.Duration, error) {
func (r *YoukiDriver) Wait(_ context.Context, _ Container) (string, time.Duration, error) {
return "", 0, errors.New("not implemented")
}

// Stats returns stats data from daemon for container
func (r *YoukiDriver) Stats(ctx context.Context, ctr Container) (io.ReadCloser, error) {
func (r *YoukiDriver) Stats(_ context.Context, _ Container) (io.ReadCloser, error) {
return nil, errors.New("not implemented")
}

Expand All @@ -149,7 +149,7 @@ func (r *YoukiDriver) Info(ctx context.Context) (string, error) {

// Create will create a container instance matching the specific needs
// of a driver
func (r *YoukiDriver) Create(ctx context.Context, name, image, cmdOverride string, detached bool, trace bool) (Container, error) {
func (r *YoukiDriver) Create(_ context.Context, name, image, _ string, _ bool, _ bool) (Container, error) {
return newYoukiContainer(name, image, false, false), nil
}

Expand Down
59 changes: 39 additions & 20 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
module github.com/estesp/bucketbench

go 1.19
go 1.21

toolchain go1.22.1

require (
github.com/containerd/cgroups v1.1.0
github.com/containerd/containerd v1.6.26
github.com/containerd/containerd v1.7.14
github.com/docker/docker v24.0.7+incompatible
github.com/montanaflynn/stats v0.0.0-20170404204349-41c34e4914ec
github.com/pkg/errors v0.9.1
Expand All @@ -13,47 +15,64 @@ require (
github.com/spf13/cobra v1.0.0
google.golang.org/grpc v1.58.3
gopkg.in/yaml.v3 v3.0.1
k8s.io/cri-api v0.25.4
k8s.io/cri-api v0.27.1
)

require (
github.com/Microsoft/go-winio v0.5.2 // indirect
github.com/Microsoft/hcsshim v0.9.10 // indirect
github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24 // indirect
github.com/AdamKorcz/go-118-fuzz-build v0.0.0-20230306123547-8075edf89bb0 // indirect
github.com/Microsoft/go-winio v0.6.1 // indirect
github.com/Microsoft/hcsshim v0.11.4 // indirect
github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d // indirect
github.com/containerd/continuity v0.3.0 // indirect
github.com/containerd/fifo v1.0.0 // indirect
github.com/containerd/continuity v0.4.2 // indirect
github.com/containerd/fifo v1.1.0 // indirect
github.com/containerd/log v0.1.0 // indirect
github.com/containerd/ttrpc v1.1.2 // indirect
github.com/containerd/typeurl v1.0.2 // indirect
github.com/coreos/go-systemd/v22 v22.3.2 // indirect
github.com/containerd/ttrpc v1.2.3 // indirect
github.com/containerd/typeurl/v2 v2.1.1 // indirect
github.com/coreos/go-systemd/v22 v22.5.0 // indirect
github.com/docker/distribution v2.8.2+incompatible // indirect
github.com/docker/go-connections v0.4.1-0.20190612165340-fd1b1942c4d5 // indirect
github.com/docker/go-events v0.0.0-20190806004212-e31b211e4f1c // indirect
github.com/docker/go-units v0.4.0 // indirect
github.com/docker/go-units v0.5.0 // indirect
github.com/felixge/httpsnoop v1.0.3 // indirect
github.com/go-logr/logr v1.2.4 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-ole/go-ole v1.2.4 // indirect
github.com/godbus/dbus/v5 v5.0.6 // indirect
github.com/gogo/googleapis v1.4.0 // indirect
github.com/godbus/dbus/v5 v5.1.0 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/google/go-cmp v0.5.9 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/inconshreveable/mousetrap v1.0.0 // indirect
github.com/klauspost/compress v1.15.9 // indirect
github.com/klauspost/compress v1.16.0 // indirect
github.com/moby/locker v1.0.1 // indirect
github.com/moby/sys/mountinfo v0.6.2 // indirect
github.com/moby/sys/signal v0.6.0 // indirect
github.com/moby/sys/sequential v0.5.0 // indirect
github.com/moby/sys/signal v0.7.0 // indirect
github.com/moby/sys/user v0.1.0 // indirect
github.com/moby/term v0.5.0 // indirect
github.com/morikuni/aec v1.0.0 // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/opencontainers/image-spec v1.1.0-rc2.0.20221005185240-3a7f492d3f1b // indirect
github.com/opencontainers/runc v1.1.12 // indirect
github.com/opencontainers/runtime-spec v1.0.3-0.20210326190908-1c3f411f0417 // indirect
github.com/opencontainers/selinux v1.10.1 // indirect
github.com/opencontainers/runtime-spec v1.1.0 // indirect
github.com/opencontainers/selinux v1.11.0 // indirect
github.com/rogpeppe/go-internal v1.12.0 // indirect
github.com/shirou/w32 v0.0.0-20160930032740-bb4de0191aa4 // indirect
github.com/spf13/pflag v1.0.5 // indirect
go.opencensus.io v0.24.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.45.0 // indirect
go.opentelemetry.io/otel v1.19.0 // indirect
go.opentelemetry.io/otel/metric v1.19.0 // indirect
go.opentelemetry.io/otel/trace v1.19.0 // indirect
golang.org/x/mod v0.11.0 // indirect
golang.org/x/net v0.17.0 // indirect
golang.org/x/sync v0.3.0 // indirect
golang.org/x/sys v0.13.0 // indirect
golang.org/x/text v0.13.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 // indirect
golang.org/x/tools v0.10.0 // indirect
google.golang.org/genproto v0.0.0-20230711160842-782d3b101e98 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20230731190214-cbb8c96f2d6d // indirect
google.golang.org/protobuf v1.33.0 // indirect
gotest.tools/v3 v3.5.1 // indirect
)
Loading

0 comments on commit 7c6a828

Please sign in to comment.