From a02e7cf7374793e7601dd02e1d43eef3bfbea1a5 Mon Sep 17 00:00:00 2001 From: ravilock Date: Fri, 24 Apr 2026 18:00:33 -0300 Subject: [PATCH] chore: bump docker dependencies and golang versoin --- .github/workflows/ci.yaml | 6 +- Dockerfile | 2 +- go.mod | 48 +++-- go.sum | 103 +++++---- pkg/build/buildkit/build_test.go | 198 +++++++++--------- pkg/build/grpc_build_v1/build_service.pb.go | 5 +- .../grpc_build_v1/build_service_grpc.pb.go | 1 - 7 files changed, 195 insertions(+), 168 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 92d6adb..ecf8539 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -6,7 +6,7 @@ jobs: steps: - uses: actions/setup-go@v3 with: - go-version: "1.24" + go-version: "1.24.9" - uses: actions/checkout@v2 @@ -31,7 +31,7 @@ jobs: steps: - uses: actions/setup-go@v3 with: - go-version: "1.24" + go-version: "1.24.9" - uses: actions/checkout@v2 - uses: golangci/golangci-lint-action@v3 @@ -86,7 +86,7 @@ jobs: uses: docker/setup-qemu-action@v2 - uses: actions/setup-go@v3 with: - go-version: "1.24" + go-version: "1.24.9" - uses: actions/checkout@v3 with: fetch-depth: 0 diff --git a/Dockerfile b/Dockerfile index 9a77c31..d2f2d90 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -ARG go_version=1.24 +ARG go_version=1.24.9 ARG alpine_version=3.22 FROM golang:${go_version}-alpine${alpine_version} AS build-stage diff --git a/go.mod b/go.mod index a41ae22..e7decb6 100644 --- a/go.mod +++ b/go.mod @@ -1,21 +1,20 @@ module github.com/tsuru/deploy-agent -go 1.24 - -toolchain go1.24.9 +go 1.24.9 require ( github.com/alessio/shellescape v1.4.1 - github.com/containerd/console v1.0.3 + github.com/containerd/console v1.0.5 github.com/docker/cli v23.0.0-rc.1+incompatible - github.com/docker/docker v28.0.0+incompatible github.com/google/go-containerregistry v0.12.0 github.com/moby/buildkit v0.11.3 + github.com/moby/moby/api v1.54.2 + github.com/moby/moby/client v0.4.1 github.com/oracle/oci-go-sdk/v65 v65.73.0 github.com/prometheus/client_golang v1.23.2 github.com/stretchr/testify v1.11.1 golang.org/x/sync v0.16.0 - google.golang.org/grpc v1.65.0 + google.golang.org/grpc v1.67.0 google.golang.org/protobuf v1.36.8 k8s.io/api v0.26.2 k8s.io/apimachinery v0.26.2 @@ -26,24 +25,28 @@ require ( ) require ( - cloud.google.com/go/compute/metadata v0.3.0 // indirect - github.com/Microsoft/go-winio v0.6.0 // indirect + cloud.google.com/go/compute/metadata v0.5.0 // indirect + github.com/Microsoft/go-winio v0.6.2 // indirect github.com/Microsoft/hcsshim v0.9.12 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/containerd/containerd v1.6.38 // indirect github.com/containerd/continuity v0.3.0 // indirect - github.com/containerd/errdefs v0.1.0 // indirect + github.com/containerd/errdefs v1.0.0 // indirect + github.com/containerd/errdefs/pkg v0.3.0 // indirect github.com/containerd/log v0.1.0 // indirect github.com/containerd/typeurl v1.0.2 // indirect github.com/davecgh/go-spew v1.1.1 // indirect + github.com/distribution/reference v0.6.0 // indirect github.com/docker/distribution v2.8.1+incompatible // indirect + github.com/docker/docker v23.0.0-rc.1+incompatible // indirect github.com/docker/docker-credential-helpers v0.7.0 // indirect - github.com/docker/go-connections v0.4.0 // indirect + github.com/docker/go-connections v0.7.0 // indirect github.com/docker/go-units v0.5.0 // indirect github.com/emicklei/go-restful/v3 v3.10.1 // indirect github.com/evanphx/json-patch v5.6.0+incompatible // indirect - github.com/go-logr/logr v1.3.0 // indirect + github.com/felixge/httpsnoop v1.0.4 // indirect + github.com/go-logr/logr v1.4.2 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-openapi/jsonpointer v0.19.6 // indirect github.com/go-openapi/jsonreference v0.20.2 // indirect @@ -56,6 +59,7 @@ require ( github.com/google/go-cmp v0.7.0 // indirect github.com/google/gofuzz v1.2.0 // indirect github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect + github.com/google/uuid v1.6.0 // indirect github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect github.com/imdario/mergo v0.3.13 // indirect @@ -63,15 +67,15 @@ require ( github.com/json-iterator/go v1.1.12 // indirect github.com/mailru/easyjson v0.7.7 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect + github.com/moby/docker-image-spec v1.3.1 // indirect github.com/moby/patternmatcher v0.5.0 // indirect github.com/moby/sys/signal v0.7.0 // indirect - github.com/moby/term v0.0.0-20221105221325-4eb28fa6025c // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/morikuni/aec v1.0.0 // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect - github.com/opencontainers/image-spec v1.1.0 // indirect + github.com/opencontainers/image-spec v1.1.1 // indirect github.com/opencontainers/selinux v1.11.0 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect @@ -84,26 +88,26 @@ require ( github.com/tonistiigi/fsutil v0.0.0-20230105215944-fb433841cbfa // indirect github.com/tonistiigi/units v0.0.0-20180711220420-6950e57a87ea // indirect github.com/tonistiigi/vt100 v0.0.0-20210615222946-8066bb97264f // indirect + go.opentelemetry.io/auto/sdk v1.1.0 // indirect go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.0 // indirect - go.opentelemetry.io/otel v1.21.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.60.0 // indirect + go.opentelemetry.io/otel v1.35.0 // indirect go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.4.1 // indirect - go.opentelemetry.io/otel/metric v1.21.0 // indirect - go.opentelemetry.io/otel/sdk v1.21.0 // indirect - go.opentelemetry.io/otel/trace v1.21.0 // indirect + go.opentelemetry.io/otel/metric v1.35.0 // indirect + go.opentelemetry.io/otel/sdk v1.35.0 // indirect + go.opentelemetry.io/otel/trace v1.35.0 // indirect go.opentelemetry.io/proto/otlp v0.12.0 // indirect go.yaml.in/yaml/v2 v2.4.2 // indirect golang.org/x/crypto v0.41.0 // indirect - golang.org/x/mod v0.26.0 // indirect golang.org/x/net v0.43.0 // indirect golang.org/x/oauth2 v0.30.0 // indirect golang.org/x/sys v0.35.0 // indirect golang.org/x/term v0.34.0 // indirect golang.org/x/text v0.28.0 // indirect - golang.org/x/time v0.3.0 // indirect - golang.org/x/tools v0.35.0 // indirect + golang.org/x/time v0.11.0 // indirect google.golang.org/genproto v0.0.0-20230822172742-b8732ec3820d // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20240528184218-531527333157 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240528184218-531527333157 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect diff --git a/go.sum b/go.sum index 9cdf0da..ce99258 100644 --- a/go.sum +++ b/go.sum @@ -14,8 +14,8 @@ cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZ cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= -cloud.google.com/go/compute/metadata v0.3.0 h1:Tz+eQXMEqDIKRsmY3cHTL6FVaynIjX2QxYC4trgAKZc= -cloud.google.com/go/compute/metadata v0.3.0/go.mod h1:zFmK7XCadkQkj6TtorcaGlCW1hT1fIilQDwofLpJ20k= +cloud.google.com/go/compute/metadata v0.5.0 h1:Zr0eK8JbFv6+Wi4ilXAR8FJ3wyNdpxHKJNPos6LTZOY= +cloud.google.com/go/compute/metadata v0.5.0/go.mod h1:aHnloV2TPI38yx4s9+wAZhHykWvVCfu7hQbF+9CWoiY= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= @@ -27,8 +27,6 @@ cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohl dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/Azure/azure-sdk-for-go v16.2.1+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= -github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= -github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/Azure/go-autorest v10.8.1+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= github.com/Azure/go-autorest/autorest v0.11.1/go.mod h1:JFgpikqFJ/MleTTxwepExTKnFUKKszPS8UavbQYUMuw= @@ -50,8 +48,8 @@ github.com/Microsoft/go-winio v0.4.17-0.20210211115548-6eac466e5fa3/go.mod h1:JP github.com/Microsoft/go-winio v0.4.17-0.20210324224401-5516f17a5958/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84= github.com/Microsoft/go-winio v0.4.17/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84= github.com/Microsoft/go-winio v0.4.21/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84= -github.com/Microsoft/go-winio v0.6.0 h1:slsWYD/zyx7lCXoZVlvQrj0hPTM1HI4+v1sIda2yDvg= -github.com/Microsoft/go-winio v0.6.0/go.mod h1:cTAf44im0RAYeL23bpB+fzCyDH2MJiz2BO69KH/soAE= +github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY= +github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU= github.com/Microsoft/hcsshim v0.8.6/go.mod h1:Op3hHsoHPAvb6lceZHDtd9OkTew38wNoXnJs8iY7rUg= github.com/Microsoft/hcsshim v0.8.7-0.20190325164909-8abdbb8205e4/go.mod h1:Op3hHsoHPAvb6lceZHDtd9OkTew38wNoXnJs8iY7rUg= github.com/Microsoft/hcsshim v0.8.7/go.mod h1:OHd7sQqRFrYd3RmSgbgji+ctCwkbq2wbEYNSzOYtcBQ= @@ -124,8 +122,8 @@ github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWH github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20240423153145-555b57ec207b h1:ga8SEFjZ60pxLcmhnThWgvH2wg8376yUJmPhEH4H3kw= -github.com/cncf/xds/go v0.0.0-20240423153145-555b57ec207b/go.mod h1:W+zGtBO5Y1IgJhy4+A9GOqVhqLpfZi+vwmdNXUehLA8= +github.com/cncf/xds/go v0.0.0-20240723142845-024c85f92f20 h1:N+3sFI5GUjRKBi+i0TxYVST9h4Ie192jJWpHvthBBgg= +github.com/cncf/xds/go v0.0.0-20240723142845-024c85f92f20/go.mod h1:W+zGtBO5Y1IgJhy4+A9GOqVhqLpfZi+vwmdNXUehLA8= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= github.com/containerd/aufs v0.0.0-20200908144142-dab0cbea06f4/go.mod h1:nukgQABAEopAHvB6j7cnP5zJ+/3aVcE7hCYqvIwAHyE= github.com/containerd/aufs v0.0.0-20201003224125-76a6863f2989/go.mod h1:AkGGQs9NM2vtYHaUen+NljV0/baGCAPELGm2q9ZXpWU= @@ -148,8 +146,8 @@ github.com/containerd/console v0.0.0-20181022165439-0650fd9eeb50/go.mod h1:Tj/on github.com/containerd/console v0.0.0-20191206165004-02ecf6a7291e/go.mod h1:8Pf4gM6VEbTNRIT26AyyU7hxdQU3MvAvxVI0sc00XBE= github.com/containerd/console v1.0.1/go.mod h1:XUsP6YE/mKtz6bxc+I8UiKKTP04qjQL4qcS3XoQ5xkw= github.com/containerd/console v1.0.2/go.mod h1:ytZPjGgY2oeTkAONYafi2kSj0aYggsf8acV1PGKCbzQ= -github.com/containerd/console v1.0.3 h1:lIr7SlA5PxZyMV30bDW0MGbiOPXwc63yRuCP0ARubLw= -github.com/containerd/console v1.0.3/go.mod h1:7LqA/THxQ86k76b8c/EMSiaJ3h1eZkMkXar0TQ1gf3U= +github.com/containerd/console v1.0.5 h1:R0ymNeydRqH2DmakFNdmjR2k0t7UPuiOV/N/27/qqsc= +github.com/containerd/console v1.0.5/go.mod h1:YynlIjWYF8myEu6sdkwKIvGQq+cOckRm6So2avqoYAk= github.com/containerd/containerd v1.2.10/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= github.com/containerd/containerd v1.3.0-beta.2.0.20190828155532-0293cbd26c69/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= github.com/containerd/containerd v1.3.0/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= @@ -175,8 +173,10 @@ github.com/containerd/continuity v0.0.0-20210208174643-50096c924a4e/go.mod h1:EX github.com/containerd/continuity v0.1.0/go.mod h1:ICJu0PwR54nI0yPEnJ6jcS+J7CZAUXrLh8lPo2knzsM= github.com/containerd/continuity v0.3.0 h1:nisirsYROK15TAMVukJOUyGJjz4BNQJBVsNvAXZJ/eg= github.com/containerd/continuity v0.3.0/go.mod h1:wJEAIwKOm/pBZuBd0JmeTvnLquTB1Ag8espWhkykbPM= -github.com/containerd/errdefs v0.1.0 h1:m0wCRBiu1WJT/Fr+iOoQHMQS/eP5myQ8lCv4Dz5ZURM= -github.com/containerd/errdefs v0.1.0/go.mod h1:YgWiiHtLmSeBrvpw+UfPijzbLaB77mEG1WwJTDETIV0= +github.com/containerd/errdefs v1.0.0 h1:tg5yIfIlQIrxYtu9ajqY42W3lpS19XqdxRQeEwYG8PI= +github.com/containerd/errdefs v1.0.0/go.mod h1:+YBYIdtsnF4Iw6nWZhJcqGSg/dwvV7tyJ/kCkyJ2k+M= +github.com/containerd/errdefs/pkg v0.3.0 h1:9IKJ06FvyNlexW690DXuQNx2KA2cUJXx151Xdx3ZPPE= +github.com/containerd/errdefs/pkg v0.3.0/go.mod h1:NJw6s9HwNuRhnjJhM7pylWwMyAkmCQvQ4GpJHEqRLVk= github.com/containerd/fifo v0.0.0-20180307165137-3d5202aec260/go.mod h1:ODA38xgv3Kuk8dQz2ZQXpnv/UZZUHUCL7pnLehbXgQI= github.com/containerd/fifo v0.0.0-20190226154929-a9fb20d87448/go.mod h1:ODA38xgv3Kuk8dQz2ZQXpnv/UZZUHUCL7pnLehbXgQI= github.com/containerd/fifo v0.0.0-20200410184934-f15a3290365b/go.mod h1:jPQ2IAeZRCYxpS/Cm1495vGFww6ecHmMk1YJH2Q5ln0= @@ -263,6 +263,8 @@ github.com/denverdino/aliyungo v0.0.0-20190125010748-a747050bb1ba/go.mod h1:dV8l github.com/dgrijalva/jwt-go v0.0.0-20170104182250-a601269ab70c/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= +github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk= +github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= github.com/dnaeon/go-vcr v1.0.1/go.mod h1:aBB1+wY4s93YsC3HHjMBMrwTj2R9FHDzUr9KyGc8n1E= github.com/docker/cli v0.0.0-20191017083524-a8ff7f821017/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= github.com/docker/cli v23.0.0-rc.1+incompatible h1:Vl3pcUK4/LFAD56Ys3BrqgAtuwpWd/IO3amuSL0ZbP0= @@ -277,8 +279,9 @@ github.com/docker/docker v20.10.3-0.20220414164044-61404de7df1a+incompatible/go. github.com/docker/docker-credential-helpers v0.6.3/go.mod h1:WRaJzqw3CTB9bk10avuGsjVBZsD05qeibJ1/TYlvc0Y= github.com/docker/docker-credential-helpers v0.7.0 h1:xtCHsjxogADNZcdv1pKUHXryefjlVRqWqIhk/uXJp0A= github.com/docker/docker-credential-helpers v0.7.0/go.mod h1:rETQfLdHNT3foU5kuNkFR1R1V12OJRRO5lzt2D1b5X0= -github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= +github.com/docker/go-connections v0.7.0 h1:6SsRfJddP22WMrCkj19x9WKjEDTB+ahsdiGYf0mN39c= +github.com/docker/go-connections v0.7.0/go.mod h1:no1qkHdjq7kLMGUXYAduOhYPSJxxvgWBh7ogVvptn3Q= github.com/docker/go-events v0.0.0-20170721190031-9461782956ad/go.mod h1:Uw6UezgYA44ePAFQYUehOuCzmy5zmg/+nl2ZfMWGkpA= github.com/docker/go-events v0.0.0-20190806004212-e31b211e4f1c h1:+pKlWGMw7gf6bQ+oDZB4KHQFypsfjYlq/C4rfL7D3g8= github.com/docker/go-events v0.0.0-20190806004212-e31b211e4f1c/go.mod h1:Uw6UezgYA44ePAFQYUehOuCzmy5zmg/+nl2ZfMWGkpA= @@ -304,12 +307,14 @@ github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.m github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/envoyproxy/protoc-gen-validate v1.0.4 h1:gVPz/FMfvh57HdSJQyvBtF00j8JU4zdyUgIUNhlgg0A= -github.com/envoyproxy/protoc-gen-validate v1.0.4/go.mod h1:qys6tmnRsYrQqIhm2bvKZH4Blx/1gTIZ2UKVY1M+Yew= +github.com/envoyproxy/protoc-gen-validate v1.1.0 h1:tntQDh69XqOCOZsDz0lVJQez/2L6Uu2PdjCQwWCJ3bM= +github.com/envoyproxy/protoc-gen-validate v1.1.0/go.mod h1:sXRDRVmzEbkM7CVcM06s9shE/m23dg3wzjl0UWqJ2q4= github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch v5.6.0+incompatible h1:jBYDEEiFBPxA0v50tFdvOzQQTCvpL6mnFh5mB2/l16U= github.com/evanphx/json-patch v5.6.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= +github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= +github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/flowstack/go-jsonschema v0.1.1/go.mod h1:yL7fNggx1o8rm9RlgXv7hTBWxdBM0rVwpMwimd3F3N0= github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k= @@ -331,8 +336,8 @@ github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7 github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= -github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= +github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-openapi/jsonpointer v0.0.0-20160704185906-46af16f9f7b1/go.mod h1:+35s3my2LFTysnkMfxsJBAMHj/DoqoB9knIWoYG/Vk0= @@ -548,8 +553,14 @@ github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh github.com/mitchellh/osext v0.0.0-20151018003038-5e2d6d41470f/go.mod h1:OkQIRizQZAeMln+1tSwduZz7+Af5oFlKirV/MSYes2A= github.com/moby/buildkit v0.11.3 h1:bnQFPHkNJTELRb2n3HISPGvB1FWzFx+YD1MTZg8bsfk= github.com/moby/buildkit v0.11.3/go.mod h1:P8MqGq7YrIDldCdZLhK8M/vPcrFYZ6GX1crX0j4hOmQ= +github.com/moby/docker-image-spec v1.3.1 h1:jMKff3w6PgbfSa69GfNg+zN/XLhfXJGnEx3Nl2EsFP0= +github.com/moby/docker-image-spec v1.3.1/go.mod h1:eKmb5VW8vQEh/BAr2yvVNvuiJuY6UIocYsFu/DxxRpo= github.com/moby/locker v1.0.1 h1:fOXqR41zeveg4fFODix+1Ch4mj/gT0NE1XJbp/epuBg= github.com/moby/locker v1.0.1/go.mod h1:S7SDdo5zpBK84bzzVlKr2V0hz+7x9hWbYC/kq7oQppc= +github.com/moby/moby/api v1.54.2 h1:wiat9QAhnDQjA7wk1kh/TqHz2I1uUA7M7t9SAl/JNXg= +github.com/moby/moby/api v1.54.2/go.mod h1:+RQ6wluLwtYaTd1WnPLykIDPekkuyD/ROWQClE83pzs= +github.com/moby/moby/client v0.4.1 h1:DMQgisVoMkmMs7fp3ROSdiBnoAu8+vo3GggFl06M/wY= +github.com/moby/moby/client v0.4.1/go.mod h1:z52C9O2POPOsnxZAy//WtKcQ32P+jT/NGeXu/7nfjGQ= github.com/moby/patternmatcher v0.5.0 h1:YCZgJOeULcxLw1Q+sVR636pmS7sPEn1Qo2iAN6M7DBo= github.com/moby/patternmatcher v0.5.0/go.mod h1:hDPoyOpDY7OrrMDLaYoY3hf52gNCR/YOUYxkhApJIxc= github.com/moby/sys/mountinfo v0.4.0/go.mod h1:rEr8tzG/lsIZHBtN/JjGG+LMYx9eXgW2JI+6q0qou+A= @@ -562,8 +573,6 @@ github.com/moby/sys/symlink v0.1.0/go.mod h1:GGDODQmbFOjFsXvfLVn3+ZRxkch54RkSiGq github.com/moby/sys/user v0.1.0 h1:WmZ93f5Ux6het5iituh9x2zAG7NFY9Aqi49jjE1PaQg= github.com/moby/sys/user v0.1.0/go.mod h1:fKJhFOnsCN6xZ5gSfbM6zaHGgDJMrqt9/reuj4T7MmU= github.com/moby/term v0.0.0-20200312100748-672ec06f55cd/go.mod h1:DdlQx2hp0Ss5/fLikoLlEeIYiATotOjgB//nb973jeo= -github.com/moby/term v0.0.0-20221105221325-4eb28fa6025c h1:RC8WMpjonrBfyAh6VN/POIPtYD5tRAq0qMqCRjQNK+g= -github.com/moby/term v0.0.0-20221105221325-4eb28fa6025c/go.mod h1:9OcmHNQQUTbk4XCffrLgN1NEKc2mh5u++biHVrvHsSU= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -613,8 +622,8 @@ github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8 github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.0.0/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= github.com/opencontainers/image-spec v1.0.1/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= -github.com/opencontainers/image-spec v1.1.0 h1:8SG7/vwALn54lVB/0yZ/MMwhFrPYtpEHQb2IpWsCzug= -github.com/opencontainers/image-spec v1.1.0/go.mod h1:W4s4sFTMaBeK1BQLXbG4AdM2szdn85PY75RI83NrTrM= +github.com/opencontainers/image-spec v1.1.1 h1:y0fUlFfIZhPF1W537XOLg0/fcx6zcHCJwooC2xJA040= +github.com/opencontainers/image-spec v1.1.1/go.mod h1:qpqAh3Dmcf36wStyyWU+kCeDgrGnAve2nCC8+7h8Q0M= github.com/opencontainers/runc v0.0.0-20190115041553-12f6a991201f/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= github.com/opencontainers/runc v0.1.1/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= github.com/opencontainers/runc v1.0.0-rc8.0.20190926000215-3e425f80a8c9/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= @@ -692,8 +701,8 @@ github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40T github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= -github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= +github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII= +github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/safchain/ethtool v0.0.0-20190326074333-42ed695e3de8/go.mod h1:Z0q5wiBQGYcxhMZ6gUqHn6pYNLypFAvaL3UvgZLR0U4= github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= @@ -810,22 +819,28 @@ go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= +go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA= +go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.0 h1:PzIubN4/sjByhDRHLviCjJuweBXWFZWhghjg7cS28+M= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.0/go.mod h1:Ct6zzQEuGK3WpJs2n4dn+wfJYzd/+hNnxMRTWjGn30M= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.60.0 h1:sbiXRNDSWJOTobXh5HyQKjq6wUC5tNybqjIqDpAY4CU= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.60.0/go.mod h1:69uWxva0WgAA/4bu2Yy70SLDBwZXuQ6PbBpbsa5iZrQ= go.opentelemetry.io/otel v1.4.1/go.mod h1:StM6F/0fSwpd8dKWDCdRr7uRvEPYdW0hBSlbdTiUde4= -go.opentelemetry.io/otel v1.21.0 h1:hzLeKBZEL7Okw2mGzZ0cc4k/A7Fta0uoPgaJCr8fsFc= -go.opentelemetry.io/otel v1.21.0/go.mod h1:QZzNPQPm1zLX4gZK4cMi+71eaorMSGT3A4znnUvNNEo= +go.opentelemetry.io/otel v1.35.0 h1:xKWKPxrxB6OtMCbmMY021CqC45J+3Onta9MqjhnusiQ= +go.opentelemetry.io/otel v1.35.0/go.mod h1:UEqy8Zp11hpkUrL73gSlELM0DupHoiq72dR+Zqel/+Y= go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.4.1/go.mod h1:VpP4/RMn8bv8gNo9uK7/IMY4mtWLELsS+JIP0inH0h4= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.4.1 h1:WPpPsAAs8I2rA47v5u0558meKmmwm1Dj99ZbqCV8sZ8= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.4.1/go.mod h1:o5RW5o2pKpJLD5dNTCmjF1DorYwMeFJmb/rKr5sLaa8= -go.opentelemetry.io/otel/metric v1.21.0 h1:tlYWfeo+Bocx5kLEloTjbcDwBuELRrIFxwdQ36PlJu4= -go.opentelemetry.io/otel/metric v1.21.0/go.mod h1:o1p3CA8nNHW8j5yuQLdc1eeqEaPfzug24uvsyIEJRWM= +go.opentelemetry.io/otel/metric v1.35.0 h1:0znxYu2SNyuMSQT4Y9WDWej0VpcsxkuklLa4/siN90M= +go.opentelemetry.io/otel/metric v1.35.0/go.mod h1:nKVFgxBZ2fReX6IlyW28MgZojkoAkJGaE8CpgeAU3oE= go.opentelemetry.io/otel/sdk v1.4.1/go.mod h1:NBwHDgDIBYjwK2WNu1OPgsIc2IJzmBXNnvIJxJc8BpE= -go.opentelemetry.io/otel/sdk v1.21.0 h1:FTt8qirL1EysG6sTQRZ5TokkU8d0ugCj8htOgThZXQ8= -go.opentelemetry.io/otel/sdk v1.21.0/go.mod h1:Nna6Yv7PWTdgJHVRD9hIYywQBRx7pbox6nwBnZIxl/E= +go.opentelemetry.io/otel/sdk v1.35.0 h1:iPctf8iprVySXSKJffSS79eOjl9pvxV9ZqOWT0QejKY= +go.opentelemetry.io/otel/sdk v1.35.0/go.mod h1:+ga1bZliga3DxJ3CQGg3updiaAJoNECOgJREo9KHGQg= +go.opentelemetry.io/otel/sdk/metric v1.35.0 h1:1RriWBmCKgkeHEhM7a2uMjMUfP7MsOF5JpUCaEqEI9o= +go.opentelemetry.io/otel/sdk/metric v1.35.0/go.mod h1:is6XYCUMpcKi+ZsOvfluY5YstFnhW0BidkR+gL+qN+w= go.opentelemetry.io/otel/trace v1.4.1/go.mod h1:iYEVbroFCNut9QkwEczV9vMRPHNKSSwYZjulEtsmhFc= -go.opentelemetry.io/otel/trace v1.21.0 h1:WD9i5gzvoUPuXIXH24ZNBudiarZDKuekPqi/E8fpfLc= -go.opentelemetry.io/otel/trace v1.21.0/go.mod h1:LGbsEB0f9LGjN+OZaQQ26sohbOmiMR+BaslueVtS/qQ= +go.opentelemetry.io/otel/trace v1.35.0 h1:dPpEfJu1sDIqruz7BHFG3c7528f6ddfSWfFDVt/xgMs= +go.opentelemetry.io/otel/trace v1.35.0/go.mod h1:WUk7DtFp1Aw2MkvqGdwiXYDZZNvA/1J8o6xRXLrIkyc= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.opentelemetry.io/proto/otlp v0.12.0 h1:CMJ/3Wp7iOWES+CYLfnBv+DVmPbB+kmy9PJ92XvlR6c= go.opentelemetry.io/proto/otlp v0.12.0/go.mod h1:TsIjwGWIx5VFYv9KGVlOpxoBl5Dy+63SUguV7GGvlSQ= @@ -883,8 +898,6 @@ golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzB golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.26.0 h1:EGMPT//Ezu+ylkCijjPc+f4Aih7sZvaAr+O3EHBxvZg= -golang.org/x/mod v0.26.0/go.mod h1:/j6NAhSk8iQ723BGAUyoAcn7SlD7s15Dp9Nd/SfeaFQ= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1017,6 +1030,7 @@ golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.35.0 h1:vz1N37gP5bs89s7He8XuIYXpyY0+QlsKmzipCbUtyxI= golang.org/x/sys v0.35.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= @@ -1039,8 +1053,8 @@ golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxb golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20200416051211-89c76fbcd5d1/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= -golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.11.0 h1:/bpjEDfN9tkoN/ryeYHnv5hcMlc8ncjMcM4XBk5NWV0= +golang.org/x/time v0.11.0/go.mod h1:CDIdPxbZBQxdj6cxyCIdrNogrJKMJ7pr37NYpMcMDSg= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181011042414-1f849cf54d09/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -1085,8 +1099,6 @@ golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roY golang.org/x/tools v0.0.0-20200916195026-c9a70fc28ce3/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.35.0 h1:mBffYraMEf7aa0sB+NuKnuCy8qI/9Bughn8dC2Gu5r0= -golang.org/x/tools v0.35.0/go.mod h1:NKdj5HkL/73byiZSJjqJgKn3ep7KjFkBOkR/Hps3VPw= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -1139,10 +1151,10 @@ google.golang.org/genproto v0.0.0-20201110150050-8816d57aaa9a/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20220107163113-42d7afdf6368/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20230822172742-b8732ec3820d h1:VBu5YqKPv6XiJ199exd8Br+Aetz+o08F+PLMnwJQHAY= google.golang.org/genproto v0.0.0-20230822172742-b8732ec3820d/go.mod h1:yZTlhN0tQnXo3h00fuXNCxJdLdIdnVFVBaRJ5LWBbw4= -google.golang.org/genproto/googleapis/api v0.0.0-20240528184218-531527333157 h1:7whR9kGa5LUwFtpLm2ArCEejtnxlGeLbAyjFY8sGNFw= -google.golang.org/genproto/googleapis/api v0.0.0-20240528184218-531527333157/go.mod h1:99sLkeliLXfdj2J75X3Ho+rrVCaJze0uwN7zDDkjPVU= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240528184218-531527333157 h1:Zy9XzmMEflZ/MAaA7vNcoebnRAld7FsPW1EeBB7V0m8= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240528184218-531527333157/go.mod h1:EfXuqaE1J41VCDicxHzUDm+8rk+7ZdXzHV0IhO/I6s0= +google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142 h1:wKguEg1hsxI2/L3hUYrpo1RVi48K+uTyzKqprwLXsb8= +google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142/go.mod h1:d6be+8HhtEtucleCbxpPW9PA9XwISACu8nvpPqF0BVo= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 h1:pPJltXNxVzT4pK9yD8vR9X75DaWYYmLGMsEvBfFQZzQ= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU= google.golang.org/grpc v0.0.0-20160317175043-d3ddb4469d5a/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= @@ -1163,8 +1175,8 @@ google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAG google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= google.golang.org/grpc v1.43.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= -google.golang.org/grpc v1.65.0 h1:bs/cUb4lp1G5iImFFd3u5ixQzweKizoZJAwBNLR42lc= -google.golang.org/grpc v1.65.0/go.mod h1:WgYC2ypjlB0EiQi6wdKixMqukr6lBc0Vo+oOgjrM5ZQ= +google.golang.org/grpc v1.67.0 h1:IdH9y6PF5MPSdAntIcpjQ+tXO41pcQsfZV2RxtQgVcw= +google.golang.org/grpc v1.67.0/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA= 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= @@ -1219,8 +1231,9 @@ gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= -gotest.tools/v3 v3.0.3 h1:4AuOwCGf4lLR9u3YOe2awrHygurzhO/HeQ6laiA6Sx0= gotest.tools/v3 v3.0.3/go.mod h1:Z7Lb0S5l+klDB31fvDQX8ss/FlKDxtlFlw3Oa8Ymbl8= +gotest.tools/v3 v3.5.2 h1:7koQfIKdy+I8UTetycgUqXWSDwpgv193Ka+qRsmBY8Q= +gotest.tools/v3 v3.5.2/go.mod h1:LtdLGcnqToBH83WByAAi/wiwSFCArdFIUV/xxN4pcjA= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= @@ -1271,6 +1284,8 @@ k8s.io/kubernetes v1.13.0/go.mod h1:ocZa8+6APFNC2tX1DZASIbocyYT5jHzqFVsY5aoB7Jk= k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20240502163921-fe8a2dddb1d0 h1:jgGTlFYnhF1PM1Ax/lAlxUPE+KfCIXHaathvJg1C3ak= k8s.io/utils v0.0.0-20240502163921-fe8a2dddb1d0/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +pgregory.net/rapid v1.2.0 h1:keKAYRcjm+e1F0oAuU5F5+YPAWcyxNNRK2wud503Gnk= +pgregory.net/rapid v1.2.0/go.mod h1:PY5XlDGj0+V1FCq0o192FdRhpKHGTRIWBgqjDBTrq04= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= diff --git a/pkg/build/buildkit/build_test.go b/pkg/build/buildkit/build_test.go index f0784c6..39028fe 100644 --- a/pkg/build/buildkit/build_test.go +++ b/pkg/build/buildkit/build_test.go @@ -15,12 +15,10 @@ import ( "strings" "testing" - dockertypes "github.com/docker/docker/api/types" - dockertypescontainer "github.com/docker/docker/api/types/container" - dockerstrslice "github.com/docker/docker/api/types/strslice" - dockerclient "github.com/docker/docker/client" - dockerstdcopy "github.com/docker/docker/pkg/stdcopy" "github.com/moby/buildkit/client" + dockerstdcopy "github.com/moby/moby/api/pkg/stdcopy" + dockertypescontainer "github.com/moby/moby/api/types/container" + dockerclient "github.com/moby/moby/client" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -109,7 +107,7 @@ func TestBuildKit_Build_FromSourceFilesUserDefinedProcfile(t *testing.T) { dc := newDockerClient(t) defer dc.Close() - r, err := dc.ImagePull(context.TODO(), destImage, dockertypes.ImagePullOptions{}) + r, err := dc.ImagePull(context.TODO(), destImage, dockerclient.ImagePullOptions{}) require.NoError(t, err) defer r.Close() @@ -119,14 +117,16 @@ func TestBuildKit_Build_FromSourceFilesUserDefinedProcfile(t *testing.T) { defer func() { fmt.Printf("Removing container image %s\n", destImage) - _, nerr := dc.ImageRemove(context.TODO(), destImage, dockertypes.ImageRemoveOptions{Force: true}) + _, nerr := dc.ImageRemove(context.TODO(), destImage, dockerclient.ImageRemoveOptions{Force: true}) require.NoError(t, nerr) }() - containerCreateResp, err := dc.ContainerCreate(context.TODO(), &dockertypescontainer.Config{ + containerCreateResp, err := dc.ContainerCreate(context.TODO(), dockerclient.ContainerCreateOptions{ Image: destImage, - Cmd: dockerstrslice.StrSlice{"sleep", "Inf"}, - }, nil, nil, nil, "") + Config: &dockertypescontainer.Config{ + Cmd: []string{"sleep", "Inf"}, + }, + }) require.NoError(t, err) require.NotEmpty(t, containerCreateResp.ID, "container ID cannot be empty") @@ -135,16 +135,17 @@ func TestBuildKit_Build_FromSourceFilesUserDefinedProcfile(t *testing.T) { defer func() { fmt.Printf("Removing container (ID=%s)\n", containerID) - require.NoError(t, dc.ContainerRemove(context.TODO(), containerID, dockertypes.ContainerRemoveOptions{Force: true, RemoveVolumes: true})) + _, err := dc.ContainerRemove(context.TODO(), containerID, dockerclient.ContainerRemoveOptions{Force: true, RemoveVolumes: true}) + require.NoError(t, err) }() - err = dc.ContainerStart(context.TODO(), containerID, dockertypes.ContainerStartOptions{}) + _, err = dc.ContainerStart(context.TODO(), containerID, dockerclient.ContainerStartOptions{}) require.NoError(t, err) fmt.Printf("Starting container (ID=%s)\n", containerID) t.Run("ensure app archive is on expected location", func(t *testing.T) { - execCreateResp, err := dc.ContainerExecCreate(context.TODO(), containerID, dockertypes.ExecConfig{ - Tty: true, + execCreateResp, err := dc.ExecCreate(context.TODO(), containerID, dockerclient.ExecCreateOptions{ + TTY: true, AttachStderr: true, AttachStdout: true, Cmd: []string{"sha256sum", "/home/application/archive.tar.gz"}, @@ -154,7 +155,7 @@ func TestBuildKit_Build_FromSourceFilesUserDefinedProcfile(t *testing.T) { execID := execCreateResp.ID - hijackedResp, err := dc.ContainerExecAttach(context.TODO(), execID, dockertypes.ExecStartCheck{}) + hijackedResp, err := dc.ExecAttach(context.TODO(), execID, dockerclient.ExecAttachOptions{}) require.NoError(t, err) require.NotNil(t, hijackedResp.Reader) defer hijackedResp.Close() @@ -165,18 +166,18 @@ func TestBuildKit_Build_FromSourceFilesUserDefinedProcfile(t *testing.T) { assert.Equal(t, fmt.Sprintf("%x /home/application/archive.tar.gz\r\n", sha256.Sum256(req.Data)), stdout.String()) assert.Empty(t, stderr.String()) - execInspectResp, err := dc.ContainerExecInspect(context.TODO(), execID) + execInspectResp, err := dc.ExecInspect(context.TODO(), execID, dockerclient.ExecInspectOptions{}) require.NoError(t, err) - assert.Equal(t, execID, execInspectResp.ExecID) + assert.Equal(t, execID, execInspectResp.ID) assert.Equal(t, containerID, execInspectResp.ContainerID) assert.False(t, execInspectResp.Running) assert.Empty(t, execInspectResp.ExitCode) - assert.NotEmpty(t, execInspectResp.Pid) + assert.NotEmpty(t, execInspectResp.PID) }) t.Run("ensure build hooks were executed", func(t *testing.T) { - execCreateResp, err := dc.ContainerExecCreate(context.TODO(), containerID, dockertypes.ExecConfig{ - Tty: true, + execCreateResp, err := dc.ExecCreate(context.TODO(), containerID, dockerclient.ExecCreateOptions{ + TTY: true, AttachStderr: true, AttachStdout: true, Cmd: []string{"cat", "/tmp/tsuru/envs"}, @@ -186,7 +187,7 @@ func TestBuildKit_Build_FromSourceFilesUserDefinedProcfile(t *testing.T) { execID := execCreateResp.ID - hijackedResp, err := dc.ContainerExecAttach(context.TODO(), execID, dockertypes.ExecStartCheck{}) + hijackedResp, err := dc.ExecAttach(context.TODO(), execID, dockerclient.ExecAttachOptions{}) require.NoError(t, err) require.NotNil(t, hijackedResp.Reader) defer hijackedResp.Close() @@ -197,18 +198,18 @@ func TestBuildKit_Build_FromSourceFilesUserDefinedProcfile(t *testing.T) { assert.Equal(t, "MY_ENV_VAR=my awesome env var :P\r\nDATABASE_PASSWORD=a@3a`fo@&$(ls -lah)\r\n", stdout.String()) assert.Empty(t, stderr.String()) - execInspectResp, err := dc.ContainerExecInspect(context.TODO(), execID) + execInspectResp, err := dc.ExecInspect(context.TODO(), execID, dockerclient.ExecInspectOptions{}) require.NoError(t, err) - assert.Equal(t, execID, execInspectResp.ExecID) + assert.Equal(t, execID, execInspectResp.ID) assert.Equal(t, containerID, execInspectResp.ContainerID) assert.False(t, execInspectResp.Running) assert.Empty(t, execInspectResp.ExitCode) - assert.NotEmpty(t, execInspectResp.Pid) + assert.NotEmpty(t, execInspectResp.PID) }) t.Run("check if system packages were installed", func(t *testing.T) { - execCreateResp, err := dc.ContainerExecCreate(context.TODO(), containerID, dockertypes.ExecConfig{ - Tty: true, + execCreateResp, err := dc.ExecCreate(context.TODO(), containerID, dockerclient.ExecCreateOptions{ + TTY: true, AttachStderr: true, AttachStdout: true, Cmd: []string{"tcpdump", "--version"}, @@ -218,7 +219,7 @@ func TestBuildKit_Build_FromSourceFilesUserDefinedProcfile(t *testing.T) { execID := execCreateResp.ID - hijackedResp, err := dc.ContainerExecAttach(context.TODO(), execID, dockertypes.ExecStartCheck{}) + hijackedResp, err := dc.ExecAttach(context.TODO(), execID, dockerclient.ExecAttachOptions{}) require.NoError(t, err) require.NotNil(t, hijackedResp.Reader) defer hijackedResp.Close() @@ -229,18 +230,18 @@ func TestBuildKit_Build_FromSourceFilesUserDefinedProcfile(t *testing.T) { assert.Regexp(t, `(.*)tcpdump version (.*)`, stdout.String()) assert.Empty(t, stderr.String()) - execInspectResp, err := dc.ContainerExecInspect(context.TODO(), execID) + execInspectResp, err := dc.ExecInspect(context.TODO(), execID, dockerclient.ExecInspectOptions{}) require.NoError(t, err) - assert.Equal(t, execID, execInspectResp.ExecID) + assert.Equal(t, execID, execInspectResp.ID) assert.Equal(t, containerID, execInspectResp.ContainerID) assert.False(t, execInspectResp.Running) assert.Empty(t, execInspectResp.ExitCode) - assert.NotEmpty(t, execInspectResp.Pid) + assert.NotEmpty(t, execInspectResp.PID) }) t.Run("ensure the specific python version was installed", func(t *testing.T) { - execCreateResp, err := dc.ContainerExecCreate(context.TODO(), containerID, dockertypes.ExecConfig{ - Tty: true, + execCreateResp, err := dc.ExecCreate(context.TODO(), containerID, dockerclient.ExecCreateOptions{ + TTY: true, AttachStderr: true, AttachStdout: true, Cmd: []string{"bash", "-lc", "python --version"}, // bash -l is mandatory to force loading the ~/.profile file which includes python in the PATH @@ -250,7 +251,7 @@ func TestBuildKit_Build_FromSourceFilesUserDefinedProcfile(t *testing.T) { execID := execCreateResp.ID - hijackedResp, err := dc.ContainerExecAttach(context.TODO(), execID, dockertypes.ExecStartCheck{}) + hijackedResp, err := dc.ExecAttach(context.TODO(), execID, dockerclient.ExecAttachOptions{}) require.NoError(t, err) require.NotNil(t, hijackedResp.Reader) defer hijackedResp.Close() @@ -261,13 +262,13 @@ func TestBuildKit_Build_FromSourceFilesUserDefinedProcfile(t *testing.T) { assert.Regexp(t, `Python 3.10.4\s`, stdout.String()) assert.Empty(t, stderr.String()) - execInspectResp, err := dc.ContainerExecInspect(context.TODO(), execID) + execInspectResp, err := dc.ExecInspect(context.TODO(), execID, dockerclient.ExecInspectOptions{}) require.NoError(t, err) - assert.Equal(t, execID, execInspectResp.ExecID) + assert.Equal(t, execID, execInspectResp.ID) assert.Equal(t, containerID, execInspectResp.ContainerID) assert.False(t, execInspectResp.Running) assert.Empty(t, execInspectResp.ExitCode) - assert.NotEmpty(t, execInspectResp.Pid) + assert.NotEmpty(t, execInspectResp.PID) }) } @@ -323,7 +324,7 @@ processes: dc := newDockerClient(t) defer dc.Close() - r, err := dc.ImagePull(context.TODO(), destImage, dockertypes.ImagePullOptions{}) + r, err := dc.ImagePull(context.TODO(), destImage, dockerclient.ImagePullOptions{}) require.NoError(t, err) defer r.Close() @@ -333,14 +334,16 @@ processes: defer func() { fmt.Printf("Removing container image %s\n", destImage) - _, nerr := dc.ImageRemove(context.TODO(), destImage, dockertypes.ImageRemoveOptions{Force: true}) + _, nerr := dc.ImageRemove(context.TODO(), destImage, dockerclient.ImageRemoveOptions{Force: true}) require.NoError(t, nerr) }() - containerCreateResp, err := dc.ContainerCreate(context.TODO(), &dockertypescontainer.Config{ + containerCreateResp, err := dc.ContainerCreate(context.TODO(), dockerclient.ContainerCreateOptions{ Image: destImage, - Cmd: dockerstrslice.StrSlice{"sleep", "Inf"}, - }, nil, nil, nil, "") + Config: &dockertypescontainer.Config{ + Cmd: []string{"sleep", "Inf"}, + }, + }) require.NoError(t, err) require.NotEmpty(t, containerCreateResp.ID, "container ID cannot be empty") @@ -349,16 +352,17 @@ processes: defer func() { fmt.Printf("Removing container (ID=%s)\n", containerID) - require.NoError(t, dc.ContainerRemove(context.TODO(), containerID, dockertypes.ContainerRemoveOptions{Force: true, RemoveVolumes: true})) + _, err := dc.ContainerRemove(context.TODO(), containerID, dockerclient.ContainerRemoveOptions{Force: true, RemoveVolumes: true}) + require.NoError(t, err) }() - err = dc.ContainerStart(context.TODO(), containerID, dockertypes.ContainerStartOptions{}) + _, err = dc.ContainerStart(context.TODO(), containerID, dockerclient.ContainerStartOptions{}) require.NoError(t, err) fmt.Printf("Starting container (ID=%s)\n", containerID) t.Run("ensure app archive is on expected location", func(t *testing.T) { - execCreateResp, err := dc.ContainerExecCreate(context.TODO(), containerID, dockertypes.ExecConfig{ - Tty: true, + execCreateResp, err := dc.ExecCreate(context.TODO(), containerID, dockerclient.ExecCreateOptions{ + TTY: true, AttachStderr: true, AttachStdout: true, Cmd: []string{"sha256sum", "/home/application/archive.tar.gz"}, @@ -368,7 +372,7 @@ processes: execID := execCreateResp.ID - hijackedResp, err := dc.ContainerExecAttach(context.TODO(), execID, dockertypes.ExecStartCheck{}) + hijackedResp, err := dc.ExecAttach(context.TODO(), execID, dockerclient.ExecAttachOptions{}) require.NoError(t, err) require.NotNil(t, hijackedResp.Reader) defer hijackedResp.Close() @@ -379,18 +383,18 @@ processes: assert.Equal(t, fmt.Sprintf("%x /home/application/archive.tar.gz\r\n", sha256.Sum256(req.Data)), stdout.String()) assert.Empty(t, stderr.String()) - execInspectResp, err := dc.ContainerExecInspect(context.TODO(), execID) + execInspectResp, err := dc.ExecInspect(context.TODO(), execID, dockerclient.ExecInspectOptions{}) require.NoError(t, err) - assert.Equal(t, execID, execInspectResp.ExecID) + assert.Equal(t, execID, execInspectResp.ID) assert.Equal(t, containerID, execInspectResp.ContainerID) assert.False(t, execInspectResp.Running) assert.Empty(t, execInspectResp.ExitCode) - assert.NotEmpty(t, execInspectResp.Pid) + assert.NotEmpty(t, execInspectResp.PID) }) t.Run("ensure build hooks were executed", func(t *testing.T) { - execCreateResp, err := dc.ContainerExecCreate(context.TODO(), containerID, dockertypes.ExecConfig{ - Tty: true, + execCreateResp, err := dc.ExecCreate(context.TODO(), containerID, dockerclient.ExecCreateOptions{ + TTY: true, AttachStderr: true, AttachStdout: true, Cmd: []string{"cat", "/tmp/tsuru/envs"}, @@ -400,7 +404,7 @@ processes: execID := execCreateResp.ID - hijackedResp, err := dc.ContainerExecAttach(context.TODO(), execID, dockertypes.ExecStartCheck{}) + hijackedResp, err := dc.ExecAttach(context.TODO(), execID, dockerclient.ExecAttachOptions{}) require.NoError(t, err) require.NotNil(t, hijackedResp.Reader) defer hijackedResp.Close() @@ -411,18 +415,18 @@ processes: assert.Equal(t, "MY_ENV_VAR=my awesome env var :P\r\nDATABASE_PASSWORD=a@3a`fo@&$(ls -lah)\r\n", stdout.String()) assert.Empty(t, stderr.String()) - execInspectResp, err := dc.ContainerExecInspect(context.TODO(), execID) + execInspectResp, err := dc.ExecInspect(context.TODO(), execID, dockerclient.ExecInspectOptions{}) require.NoError(t, err) - assert.Equal(t, execID, execInspectResp.ExecID) + assert.Equal(t, execID, execInspectResp.ID) assert.Equal(t, containerID, execInspectResp.ContainerID) assert.False(t, execInspectResp.Running) assert.Empty(t, execInspectResp.ExitCode) - assert.NotEmpty(t, execInspectResp.Pid) + assert.NotEmpty(t, execInspectResp.PID) }) t.Run("check if system packages were installed", func(t *testing.T) { - execCreateResp, err := dc.ContainerExecCreate(context.TODO(), containerID, dockertypes.ExecConfig{ - Tty: true, + execCreateResp, err := dc.ExecCreate(context.TODO(), containerID, dockerclient.ExecCreateOptions{ + TTY: true, AttachStderr: true, AttachStdout: true, Cmd: []string{"tcpdump", "--version"}, @@ -432,7 +436,7 @@ processes: execID := execCreateResp.ID - hijackedResp, err := dc.ContainerExecAttach(context.TODO(), execID, dockertypes.ExecStartCheck{}) + hijackedResp, err := dc.ExecAttach(context.TODO(), execID, dockerclient.ExecAttachOptions{}) require.NoError(t, err) require.NotNil(t, hijackedResp.Reader) defer hijackedResp.Close() @@ -443,18 +447,18 @@ processes: assert.Regexp(t, `(.*)tcpdump version (.*)`, stdout.String()) assert.Empty(t, stderr.String()) - execInspectResp, err := dc.ContainerExecInspect(context.TODO(), execID) + execInspectResp, err := dc.ExecInspect(context.TODO(), execID, dockerclient.ExecInspectOptions{}) require.NoError(t, err) - assert.Equal(t, execID, execInspectResp.ExecID) + assert.Equal(t, execID, execInspectResp.ID) assert.Equal(t, containerID, execInspectResp.ContainerID) assert.False(t, execInspectResp.Running) assert.Empty(t, execInspectResp.ExitCode) - assert.NotEmpty(t, execInspectResp.Pid) + assert.NotEmpty(t, execInspectResp.PID) }) t.Run("ensure the specific python version was installed", func(t *testing.T) { - execCreateResp, err := dc.ContainerExecCreate(context.TODO(), containerID, dockertypes.ExecConfig{ - Tty: true, + execCreateResp, err := dc.ExecCreate(context.TODO(), containerID, dockerclient.ExecCreateOptions{ + TTY: true, AttachStderr: true, AttachStdout: true, Cmd: []string{"bash", "-lc", "python --version"}, // bash -l is mandatory to force loading the ~/.profile file which includes python in the PATH @@ -464,7 +468,7 @@ processes: execID := execCreateResp.ID - hijackedResp, err := dc.ContainerExecAttach(context.TODO(), execID, dockertypes.ExecStartCheck{}) + hijackedResp, err := dc.ExecAttach(context.TODO(), execID, dockerclient.ExecAttachOptions{}) require.NoError(t, err) require.NotNil(t, hijackedResp.Reader) defer hijackedResp.Close() @@ -475,13 +479,13 @@ processes: assert.Regexp(t, `Python 3.10.4\s`, stdout.String()) assert.Empty(t, stderr.String()) - execInspectResp, err := dc.ContainerExecInspect(context.TODO(), execID) + execInspectResp, err := dc.ExecInspect(context.TODO(), execID, dockerclient.ExecInspectOptions{}) require.NoError(t, err) - assert.Equal(t, execID, execInspectResp.ExecID) + assert.Equal(t, execID, execInspectResp.ID) assert.Equal(t, containerID, execInspectResp.ContainerID) assert.False(t, execInspectResp.Running) assert.Empty(t, execInspectResp.ExitCode) - assert.NotEmpty(t, execInspectResp.Pid) + assert.NotEmpty(t, execInspectResp.PID) }) } @@ -527,7 +531,7 @@ func TestBuildKit_Build_FromContainerImages(t *testing.T) { data := compressGZIP(t, "./testdata/container_image/") r := bytes.NewReader(data) - buildResp, err := dc.ImageBuild(context.TODO(), r, dockertypes.ImageBuildOptions{ + buildResp, err := dc.ImageBuild(context.TODO(), r, dockerclient.ImageBuildOptions{ Tags: []string{srcImage}, Remove: true, ForceRemove: true, @@ -540,7 +544,7 @@ func TestBuildKit_Build_FromContainerImages(t *testing.T) { _, err = io.Copy(os.Stdout, buildResp.Body) require.NoError(t, err) - pushReader, err := dc.ImagePush(context.TODO(), srcImage, dockertypes.ImagePushOptions{RegistryAuth: "fake auth token"}) + pushReader, err := dc.ImagePush(context.TODO(), srcImage, dockerclient.ImagePushOptions{RegistryAuth: "fake auth token"}) require.NoError(t, err) defer pushReader.Close() @@ -774,7 +778,7 @@ ENV MY_ANOTHER_VAR="another var" dc := newDockerClient(t) defer dc.Close() - r, err := dc.ImagePull(context.TODO(), destImage, dockertypes.ImagePullOptions{}) + r, err := dc.ImagePull(context.TODO(), destImage, dockerclient.ImagePullOptions{}) require.NoError(t, err) defer r.Close() @@ -784,12 +788,12 @@ ENV MY_ANOTHER_VAR="another var" defer func() { fmt.Printf("Removing container image %s\n", destImage) - _, nerr := dc.ImageRemove(context.TODO(), destImage, dockertypes.ImageRemoveOptions{Force: true}) + _, nerr := dc.ImageRemove(context.TODO(), destImage, dockerclient.ImageRemoveOptions{Force: true}) require.NoError(t, nerr) }() t.Run("should not store the env vars in the container image manifest", func(t *testing.T) { - is, _, err := dc.ImageInspectWithRaw(context.TODO(), destImage) + is, err := dc.ImageInspect(context.TODO(), destImage) require.NoError(t, err) require.NotNil(t, is.Config) assert.NotEmpty(t, is.Config.Env) @@ -804,10 +808,12 @@ ENV MY_ANOTHER_VAR="another var" }) t.Run("should be able to see env vars during the build", func(t *testing.T) { - containerCreateResp, err := dc.ContainerCreate(context.TODO(), &dockertypescontainer.Config{ + containerCreateResp, err := dc.ContainerCreate(context.TODO(), dockerclient.ContainerCreateOptions{ Image: destImage, - Cmd: dockerstrslice.StrSlice{"sleep", "Inf"}, - }, nil, nil, nil, "") + Config: &dockertypescontainer.Config{ + Cmd: []string{"sleep", "Inf"}, + }, + }) require.NoError(t, err) require.NotEmpty(t, containerCreateResp.ID, "container ID cannot be empty") @@ -816,15 +822,16 @@ ENV MY_ANOTHER_VAR="another var" defer func() { fmt.Printf("Removing container (ID=%s)\n", containerID) - require.NoError(t, dc.ContainerRemove(context.TODO(), containerID, dockertypes.ContainerRemoveOptions{Force: true, RemoveVolumes: true})) + _, err := dc.ContainerRemove(context.TODO(), containerID, dockerclient.ContainerRemoveOptions{Force: true, RemoveVolumes: true}) + require.NoError(t, err) }() - err = dc.ContainerStart(context.TODO(), containerID, dockertypes.ContainerStartOptions{}) + _, err = dc.ContainerStart(context.TODO(), containerID, dockerclient.ContainerStartOptions{}) require.NoError(t, err) fmt.Printf("Starting container (ID=%s)\n", containerID) - execCreateResp, err := dc.ContainerExecCreate(context.TODO(), containerID, dockertypes.ExecConfig{ - Tty: true, + execCreateResp, err := dc.ExecCreate(context.TODO(), containerID, dockerclient.ExecCreateOptions{ + TTY: true, AttachStderr: true, AttachStdout: true, Cmd: []string{"cat", "/tmp/envs"}, @@ -834,7 +841,7 @@ ENV MY_ANOTHER_VAR="another var" execID := execCreateResp.ID - hijackedResp, err := dc.ContainerExecAttach(context.TODO(), execID, dockertypes.ExecStartCheck{}) + hijackedResp, err := dc.ExecAttach(context.TODO(), execID, dockerclient.ExecAttachOptions{}) require.NoError(t, err) require.NotNil(t, hijackedResp.Reader) defer hijackedResp.Close() @@ -997,7 +1004,7 @@ ENV MY_ANOTHER_VAR="another var" dc := newDockerClient(t) defer dc.Close() - r, err := dc.ImagePull(context.TODO(), destImage, dockertypes.ImagePullOptions{}) + r, err := dc.ImagePull(context.TODO(), destImage, dockerclient.ImagePullOptions{}) require.NoError(t, err) defer r.Close() @@ -1007,12 +1014,12 @@ ENV MY_ANOTHER_VAR="another var" defer func() { fmt.Printf("Removing container image %s\n", destImage) - _, nerr := dc.ImageRemove(context.TODO(), destImage, dockertypes.ImageRemoveOptions{Force: true}) + _, nerr := dc.ImageRemove(context.TODO(), destImage, dockerclient.ImageRemoveOptions{Force: true}) require.NoError(t, nerr) }() t.Run("should not store the env vars in the container image manifest", func(t *testing.T) { - is, _, err := dc.ImageInspectWithRaw(context.TODO(), destImage) + is, err := dc.ImageInspect(context.TODO(), destImage) require.NoError(t, err) require.NotNil(t, is.Config) assert.NotEmpty(t, is.Config.Env) @@ -1026,10 +1033,12 @@ ENV MY_ANOTHER_VAR="another var" } }) t.Run("should be able to see env vars during the build", func(t *testing.T) { - containerCreateResp, err := dc.ContainerCreate(context.TODO(), &dockertypescontainer.Config{ + containerCreateResp, err := dc.ContainerCreate(context.TODO(), dockerclient.ContainerCreateOptions{ Image: destImage, - Cmd: dockerstrslice.StrSlice{"sleep", "Inf"}, - }, nil, nil, nil, "") + Config: &dockertypescontainer.Config{ + Cmd: []string{"sleep", "Inf"}, + }, + }) require.NoError(t, err) require.NotEmpty(t, containerCreateResp.ID, "container ID cannot be empty") @@ -1038,15 +1047,16 @@ ENV MY_ANOTHER_VAR="another var" defer func() { fmt.Printf("Removing container (ID=%s)\n", containerID) - require.NoError(t, dc.ContainerRemove(context.TODO(), containerID, dockertypes.ContainerRemoveOptions{Force: true, RemoveVolumes: true})) + _, err := dc.ContainerRemove(context.TODO(), containerID, dockerclient.ContainerRemoveOptions{Force: true, RemoveVolumes: true}) + require.NoError(t, err) }() - err = dc.ContainerStart(context.TODO(), containerID, dockertypes.ContainerStartOptions{}) + _, err = dc.ContainerStart(context.TODO(), containerID, dockerclient.ContainerStartOptions{}) require.NoError(t, err) fmt.Printf("Starting container (ID=%s)\n", containerID) - execCreateResp, err := dc.ContainerExecCreate(context.TODO(), containerID, dockertypes.ExecConfig{ - Tty: true, + execCreateResp, err := dc.ExecCreate(context.TODO(), containerID, dockerclient.ExecCreateOptions{ + TTY: true, AttachStderr: true, AttachStdout: true, Cmd: []string{"cat", "/tmp/envs"}, @@ -1056,7 +1066,7 @@ ENV MY_ANOTHER_VAR="another var" execID := execCreateResp.ID - hijackedResp, err := dc.ContainerExecAttach(context.TODO(), execID, dockertypes.ExecStartCheck{}) + hijackedResp, err := dc.ExecAttach(context.TODO(), execID, dockerclient.ExecAttachOptions{}) require.NoError(t, err) require.NotNil(t, hijackedResp.Reader) defer hijackedResp.Close() @@ -1111,7 +1121,7 @@ ENV MY_ANOTHER_VAR="another var" dc := newDockerClient(t) defer dc.Close() - r, err := dc.ImagePull(context.TODO(), destImage, dockertypes.ImagePullOptions{}) + r, err := dc.ImagePull(context.TODO(), destImage, dockerclient.ImagePullOptions{}) require.NoError(t, err) defer r.Close() @@ -1121,7 +1131,7 @@ ENV MY_ANOTHER_VAR="another var" defer func() { fmt.Printf("Removing container image %s\n", destImage) - _, nerr := dc.ImageRemove(context.TODO(), destImage, dockertypes.ImageRemoveOptions{Force: true}) + _, nerr := dc.ImageRemove(context.TODO(), destImage, dockerclient.ImageRemoveOptions{Force: true}) require.NoError(t, nerr) }() }) @@ -1219,7 +1229,7 @@ func newBuildKitClient(t *testing.T) *client.Client { func newDockerClient(t *testing.T) *dockerclient.Client { t.Helper() - c, err := dockerclient.NewClientWithOpts(dockerclient.WithVersionFromEnv(), dockerclient.WithAPIVersionNegotiation(), dockerclient.WithHost(dockerHost)) + c, err := dockerclient.New(dockerclient.WithAPIVersionFromEnv(), dockerclient.WithHost(dockerHost)) require.NoError(t, err) return c } diff --git a/pkg/build/grpc_build_v1/build_service.pb.go b/pkg/build/grpc_build_v1/build_service.pb.go index 873db45..3db9a02 100644 --- a/pkg/build/grpc_build_v1/build_service.pb.go +++ b/pkg/build/grpc_build_v1/build_service.pb.go @@ -11,12 +11,11 @@ package grpc_build_v1 import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" unsafe "unsafe" - - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" ) const ( diff --git a/pkg/build/grpc_build_v1/build_service_grpc.pb.go b/pkg/build/grpc_build_v1/build_service_grpc.pb.go index e2c3950..acdea4c 100644 --- a/pkg/build/grpc_build_v1/build_service_grpc.pb.go +++ b/pkg/build/grpc_build_v1/build_service_grpc.pb.go @@ -12,7 +12,6 @@ package grpc_build_v1 import ( context "context" - grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status"