From 37d69857b6b15e689b21a488bbd107b4dd242dda Mon Sep 17 00:00:00 2001 From: Natalie Arellano Date: Mon, 22 Apr 2024 15:06:09 -0400 Subject: [PATCH 01/18] Bump imgutil to pick up fix from https://github.com/buildpacks/imgutil/pull/269 (#1343) Signed-off-by: Natalie Arellano --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 1f91275e..c93889fd 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ require ( github.com/GoogleContainerTools/kaniko v1.21.1 github.com/apex/log v1.9.0 github.com/awslabs/amazon-ecr-credential-helper/ecr-login v0.0.0-20231213181459-b0fcec718dc6 - github.com/buildpacks/imgutil v0.0.0-20240416145632-bef4977c8877 + github.com/buildpacks/imgutil v0.0.0-20240422175901-30b002586ecc github.com/chrismellard/docker-credential-acr-env v0.0.0-20230304212654-82a0ddb27589 github.com/containerd/containerd v1.7.14 github.com/docker/docker v26.0.1+incompatible diff --git a/go.sum b/go.sum index 57cad926..fe974793 100644 --- a/go.sum +++ b/go.sum @@ -90,8 +90,8 @@ github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24 github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/buildpacks/imgutil v0.0.0-20240416145632-bef4977c8877 h1:dUayG/LUjbDZ/sfE0Vne779HlrVNvFCyjYg0LHjIU3U= -github.com/buildpacks/imgutil v0.0.0-20240416145632-bef4977c8877/go.mod h1:n2R6VRuWsAX3cyHCp/u0Z4WJcixny0gYg075J39owrk= +github.com/buildpacks/imgutil v0.0.0-20240422175901-30b002586ecc h1:Pxgpm4bIjgWY9a8r8xHlMYp6wzm5hIZHtw4Iux3XA0c= +github.com/buildpacks/imgutil v0.0.0-20240422175901-30b002586ecc/go.mod h1:n2R6VRuWsAX3cyHCp/u0Z4WJcixny0gYg075J39owrk= github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= From 13d3691dd017405e22ad7b5050204cc2ccdf034a Mon Sep 17 00:00:00 2001 From: Natalie Arellano Date: Mon, 29 Apr 2024 15:09:27 -0400 Subject: [PATCH 02/18] Try to fix test-s390x workflow (#1339) Signed-off-by: Natalie Arellano --- .github/workflows/test-s390x.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-s390x.yml b/.github/workflows/test-s390x.yml index 546d9395..2340a9cc 100644 --- a/.github/workflows/test-s390x.yml +++ b/.github/workflows/test-s390x.yml @@ -32,7 +32,7 @@ jobs: id: ZVSI run: | #creation of zvsi - ibmcloud is instance-create $ZVSI_INSTANCE_NAME ${{ secrets.ZVSI_VPC }} $ZVSI_ZONE_NAME $ZVSI_PROFILE_NAME ${{ secrets.ZVSI_SUBNET }} --image ${{ secrets.ZVSI_IMAGE }} --keys ${{ secrets.ZVSI_KEY }} --resource-group-id ${{ secrets.ZVSI_RG_ID }} --sgs ${{ secrets.ZVSI_SG }} + ibmcloud is instance-create $ZVSI_INSTANCE_NAME ${{ secrets.ZVSI_VPC }} $ZVSI_ZONE_NAME $ZVSI_PROFILE_NAME ${{ secrets.ZVSI_SUBNET }} --image ${{ secrets.ZVSI_IMAGE }} --keys ${{ secrets.ZVSI_KEY }} --resource-group-id ${{ secrets.ZVSI_RG_ID }} --sgs ${{ secrets.ZVSI_SG }} --allow-ip-spoofing false #Reserving a floating ip to the ZVSI ibmcloud is floating-ip-reserve $ZVSI_FP_NAME --zone $ZVSI_ZONE_NAME --resource-group-id ${{ secrets.ZVSI_RG_ID }} --in $ZVSI_INSTANCE_NAME #Bouding the Floating ip to the ZVSI From 44b70410fee8b723f8a3134a4ba6bbe9344eb40c Mon Sep 17 00:00:00 2001 From: Natalie Arellano Date: Wed, 1 May 2024 12:43:58 -0400 Subject: [PATCH 03/18] When a buildpack declares distro information, but a base image does not, (#1348) consider it not a match Signed-off-by: Natalie Arellano --- platform/target_data.go | 5 ++++- platform/target_data_test.go | 6 +++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/platform/target_data.go b/platform/target_data.go index 26977d67..e88954db 100644 --- a/platform/target_data.go +++ b/platform/target_data.go @@ -91,9 +91,12 @@ func TargetSatisfiedForBuild(base files.TargetMetadata, module buildpack.TargetM if !matches(base.ArchVariant, module.ArchVariant) { return false } - if base.Distro == nil || len(module.Distros) == 0 { + if len(module.Distros) == 0 { return true } + if base.Distro == nil { + return false + } foundMatchingDist := false for _, modDist := range module.Distros { if matches(base.Distro.Name, modDist.Name) && matches(base.Distro.Version, modDist.Version) { diff --git a/platform/target_data_test.go b/platform/target_data_test.go index cc9bd5dc..2742f8f4 100644 --- a/platform/target_data_test.go +++ b/platform/target_data_test.go @@ -41,14 +41,14 @@ func testTargetData(t *testing.T, when spec.G, it spec.S) { }) }) - when("has extra information", func() { - it("matches", func() { + when("has distro information", func() { + it("does not match", func() { h.AssertEq(t, platform.TargetSatisfiedForBuild(baseTarget, buildpack.TargetMetadata{OS: baseTarget.OS, Arch: baseTarget.Arch, ArchVariant: "MMX"}), true) h.AssertEq(t, platform.TargetSatisfiedForBuild(baseTarget, buildpack.TargetMetadata{ OS: baseTarget.OS, Arch: baseTarget.Arch, Distros: []buildpack.OSDistro{{Name: "a", Version: "2"}}, - }), true) + }), false) }) }) }) From effdf24b2c24691d890c5c3cb2924622b991f54e Mon Sep 17 00:00:00 2001 From: Pavel Busko Date: Mon, 6 May 2024 22:33:51 +0200 Subject: [PATCH 04/18] Read `/etc/os-release` file when distro information is not present in labels (#1347) * Read `/etc/os-release` file when distro information is not present in labels Signed-off-by: Pavel Busko * fix unit tests Signed-off-by: Pavel Busko * Update phase/generator_test.go Co-authored-by: Natalie Arellano Signed-off-by: Pavel Busko * Update phase/generator_test.go Co-authored-by: Natalie Arellano Signed-off-by: Pavel Busko --------- Signed-off-by: Pavel Busko Signed-off-by: Pavel Busko Co-authored-by: Natalie Arellano --- phase/builder.go | 2 +- phase/builder_test.go | 4 ---- phase/detector.go | 3 ++- phase/detector_test.go | 2 -- phase/generator.go | 2 +- phase/generator_test.go | 4 ---- platform/run_image_test.go | 32 ++++++++++++++++++++++++++++++-- platform/target_data.go | 7 ++++--- 8 files changed, 38 insertions(+), 18 deletions(-) diff --git a/phase/builder.go b/phase/builder.go index eae12dec..397b0378 100644 --- a/phase/builder.go +++ b/phase/builder.go @@ -149,7 +149,7 @@ func (b *Builder) getBuildInputs() buildpack.BuildInputs { LayersDir: b.LayersDir, PlatformDir: b.PlatformDir, Env: env.NewBuildEnv(os.Environ()), - TargetEnv: platform.EnvVarsFor(b.AnalyzeMD.RunImageTarget(), b.Logger), + TargetEnv: platform.EnvVarsFor(&fsutil.Detect{}, b.AnalyzeMD.RunImageTarget(), b.Logger), Out: b.Out, Err: b.Err, } diff --git a/phase/builder_test.go b/phase/builder_test.go index 04507307..e4f4fa1e 100644 --- a/phase/builder_test.go +++ b/phase/builder_test.go @@ -191,8 +191,6 @@ func testBuilder(t *testing.T, when spec.G, it spec.S) { h.AssertContains(t, inputs.TargetEnv, "CNB_TARGET_ARCH=amd64") h.AssertContains(t, inputs.TargetEnv, "CNB_TARGET_ARCH_VARIANT=") h.AssertContains(t, inputs.TargetEnv, "CNB_TARGET_OS=linux") - h.AssertContains(t, inputs.TargetEnv, "CNB_TARGET_DISTRO_NAME=") - h.AssertContains(t, inputs.TargetEnv, "CNB_TARGET_DISTRO_VERSION=") return buildpack.BuildOutputs{}, nil }, ) @@ -205,8 +203,6 @@ func testBuilder(t *testing.T, when spec.G, it spec.S) { h.AssertContains(t, inputs.TargetEnv, "CNB_TARGET_ARCH=amd64") h.AssertContains(t, inputs.TargetEnv, "CNB_TARGET_ARCH_VARIANT=") h.AssertContains(t, inputs.TargetEnv, "CNB_TARGET_OS=linux") - h.AssertContains(t, inputs.TargetEnv, "CNB_TARGET_DISTRO_NAME=") - h.AssertContains(t, inputs.TargetEnv, "CNB_TARGET_DISTRO_VERSION=") return buildpack.BuildOutputs{}, nil }) diff --git a/phase/detector.go b/phase/detector.go index 4324fdc6..b370251f 100644 --- a/phase/detector.go +++ b/phase/detector.go @@ -13,6 +13,7 @@ import ( "github.com/buildpacks/lifecycle/buildpack" "github.com/buildpacks/lifecycle/env" "github.com/buildpacks/lifecycle/internal/encoding" + "github.com/buildpacks/lifecycle/internal/fsutil" "github.com/buildpacks/lifecycle/log" "github.com/buildpacks/lifecycle/platform" "github.com/buildpacks/lifecycle/platform/files" @@ -239,7 +240,7 @@ func (d *Detector) detectGroup(group buildpack.Group, done []buildpack.GroupElem BuildConfigDir: d.BuildConfigDir, PlatformDir: d.PlatformDir, Env: env.NewBuildEnv(os.Environ()), - TargetEnv: platform.EnvVarsFor(d.AnalyzeMD.RunImageTarget(), d.Logger), + TargetEnv: platform.EnvVarsFor(&fsutil.Detect{}, d.AnalyzeMD.RunImageTarget(), d.Logger), } d.Runs.Store(key, d.Executor.Detect(descriptor, inputs, d.Logger)) // this is where we finally invoke bin/detect } diff --git a/phase/detector_test.go b/phase/detector_test.go index 6820ef37..1c0e3be0 100644 --- a/phase/detector_test.go +++ b/phase/detector_test.go @@ -223,8 +223,6 @@ func testDetector(t *testing.T, when spec.G, it spec.S) { h.AssertContains(t, inputs.TargetEnv, "CNB_TARGET_ARCH=amd64") h.AssertContains(t, inputs.TargetEnv, "CNB_TARGET_ARCH_VARIANT=") h.AssertContains(t, inputs.TargetEnv, "CNB_TARGET_OS=linux") - h.AssertContains(t, inputs.TargetEnv, "CNB_TARGET_DISTRO_NAME=") - h.AssertContains(t, inputs.TargetEnv, "CNB_TARGET_DISTRO_VERSION=") return buildpack.DetectOutputs{} }) diff --git a/phase/generator.go b/phase/generator.go index 7f6e5410..8a2106e8 100644 --- a/phase/generator.go +++ b/phase/generator.go @@ -151,7 +151,7 @@ func (g *Generator) getGenerateInputs() buildpack.GenerateInputs { BuildConfigDir: g.BuildConfigDir, PlatformDir: g.PlatformDir, Env: env.NewBuildEnv(os.Environ()), - TargetEnv: platform.EnvVarsFor(g.AnalyzedMD.RunImageTarget(), g.Logger), + TargetEnv: platform.EnvVarsFor(&fsutil.Detect{}, g.AnalyzedMD.RunImageTarget(), g.Logger), Out: g.Out, Err: g.Err, } diff --git a/phase/generator_test.go b/phase/generator_test.go index cd6895bf..aefc13e1 100644 --- a/phase/generator_test.go +++ b/phase/generator_test.go @@ -284,8 +284,6 @@ func testGenerator(t *testing.T, when spec.G, it spec.S) { h.AssertContains(t, inputs.TargetEnv, "CNB_TARGET_ARCH=amd64", "CNB_TARGET_ARCH_VARIANT=", - "CNB_TARGET_DISTRO_NAME=", - "CNB_TARGET_DISTRO_VERSION=", "CNB_TARGET_OS=linux", ) return buildpack.GenerateOutputs{Dockerfiles: []buildpack.DockerfileInfo{{ExtensionID: d.Extension.ID, @@ -296,8 +294,6 @@ func testGenerator(t *testing.T, when spec.G, it spec.S) { h.AssertContains(t, inputs.TargetEnv, "CNB_TARGET_ARCH=amd64", "CNB_TARGET_ARCH_VARIANT=", - "CNB_TARGET_DISTRO_NAME=", - "CNB_TARGET_DISTRO_VERSION=", "CNB_TARGET_OS=linux", ) return buildpack.GenerateOutputs{Dockerfiles: []buildpack.DockerfileInfo{{ExtensionID: d.Extension.ID, diff --git a/platform/run_image_test.go b/platform/run_image_test.go index 7a14e684..29cc1a54 100644 --- a/platform/run_image_test.go +++ b/platform/run_image_test.go @@ -4,6 +4,8 @@ import ( "path/filepath" "testing" + "github.com/apex/log" + "github.com/apex/log/handlers/memory" "github.com/google/go-containerregistry/pkg/authn" "github.com/buildpacks/lifecycle/platform" @@ -204,7 +206,12 @@ func testRunImage(t *testing.T, when spec.G, it spec.S) { when(".EnvVarsFor", func() { it("returns the right thing", func() { tm := files.TargetMetadata{Arch: "pentium", ArchVariant: "mmx", ID: "my-id", OS: "linux", Distro: &files.OSDistro{Name: "nix", Version: "22.11"}} - observed := platform.EnvVarsFor(tm, nil) + d := &mockDetector{ + contents: "this is just test contents really", + t: t, + HasFile: false, + } + observed := platform.EnvVarsFor(d, tm, &log.Logger{Handler: memory.New()}) h.AssertContains(t, observed, "CNB_TARGET_ARCH="+tm.Arch) h.AssertContains(t, observed, "CNB_TARGET_ARCH_VARIANT="+tm.ArchVariant) h.AssertContains(t, observed, "CNB_TARGET_DISTRO_NAME="+tm.Distro.Name) @@ -213,9 +220,30 @@ func testRunImage(t *testing.T, when spec.G, it spec.S) { h.AssertEq(t, len(observed), 5) }) + it("returns the right thing from /etc/os-release", func() { + d := &mockDetector{ + contents: "this is just test contents really", + t: t, + HasFile: true, + } + tm := files.TargetMetadata{Arch: "pentium", ArchVariant: "mmx", ID: "my-id", OS: "linux", Distro: nil} + observed := platform.EnvVarsFor(d, tm, &log.Logger{Handler: memory.New()}) + h.AssertContains(t, observed, "CNB_TARGET_ARCH="+tm.Arch) + h.AssertContains(t, observed, "CNB_TARGET_ARCH_VARIANT="+tm.ArchVariant) + h.AssertContains(t, observed, "CNB_TARGET_DISTRO_NAME=opensesame") + h.AssertContains(t, observed, "CNB_TARGET_DISTRO_VERSION=3.14") + h.AssertContains(t, observed, "CNB_TARGET_OS="+tm.OS) + h.AssertEq(t, len(observed), 5) + }) + it("does not return the wrong thing", func() { tm := files.TargetMetadata{Arch: "pentium", OS: "linux"} - observed := platform.EnvVarsFor(tm, nil) + d := &mockDetector{ + contents: "this is just test contents really", + t: t, + HasFile: false, + } + observed := platform.EnvVarsFor(d, tm, &log.Logger{Handler: memory.New()}) h.AssertContains(t, observed, "CNB_TARGET_ARCH="+tm.Arch) h.AssertContains(t, observed, "CNB_TARGET_OS="+tm.OS) // note: per the spec only the ID field is optional, so I guess the others should always be set: https://github.com/buildpacks/rfcs/blob/main/text/0096-remove-stacks-mixins.md#runtime-metadata diff --git a/platform/target_data.go b/platform/target_data.go index e88954db..82fba40c 100644 --- a/platform/target_data.go +++ b/platform/target_data.go @@ -11,11 +11,12 @@ import ( // EnvVarsFor fulfills the prophecy set forth in https://github.com/buildpacks/rfcs/blob/b8abe33f2bdc58792acf0bd094dc4ce3c8a54dbb/text/0096-remove-stacks-mixins.md?plain=1#L97 // by returning an array of "VARIABLE=value" strings suitable for inclusion in your environment or complete breakfast. -func EnvVarsFor(tm files.TargetMetadata, logger log.Logger) []string { +func EnvVarsFor(d fsutil.Detector, tm files.TargetMetadata, logger log.Logger) []string { // we should always have os & arch, // if they are not populated try to get target information from the build-time base image - if tm.OS == "" { - GetTargetOSFromFileSystem(&fsutil.Detect{}, &tm, logger) + if tm.OS == "" || tm.Distro == nil { + logger.Info("target distro name/version labels not found, reading /etc/os-release file") + GetTargetOSFromFileSystem(d, &tm, logger) } ret := []string{ "CNB_TARGET_OS=" + tm.OS, From 8a148423a38a0624147b088afcf1b19f1bfe9e7f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 6 May 2024 18:12:00 -0400 Subject: [PATCH 05/18] Bump the go-dependencies group across 1 directory with 5 updates (#1349) Bumps the go-dependencies group with 5 updates in the / directory: | Package | From | To | | --- | --- | --- | | [github.com/GoogleContainerTools/kaniko](https://github.com/GoogleContainerTools/kaniko) | `1.21.1` | `1.22.0` | | [github.com/containerd/containerd](https://github.com/containerd/containerd) | `1.7.14` | `1.7.16` | | [github.com/docker/docker](https://github.com/docker/docker) | `26.0.1+incompatible` | `26.1.0+incompatible` | | [github.com/moby/buildkit](https://github.com/moby/buildkit) | `0.13.1` | `0.13.2` | | [golang.org/x/sys](https://github.com/golang/sys) | `0.18.0` | `0.19.0` | Updates `github.com/GoogleContainerTools/kaniko` from 1.21.1 to 1.22.0 - [Release notes](https://github.com/GoogleContainerTools/kaniko/releases) - [Changelog](https://github.com/GoogleContainerTools/kaniko/blob/main/CHANGELOG.md) - [Commits](https://github.com/GoogleContainerTools/kaniko/compare/v1.21.1...v1.22.0) Updates `github.com/containerd/containerd` from 1.7.14 to 1.7.16 - [Release notes](https://github.com/containerd/containerd/releases) - [Changelog](https://github.com/containerd/containerd/blob/main/RELEASES.md) - [Commits](https://github.com/containerd/containerd/compare/v1.7.14...v1.7.16) Updates `github.com/docker/docker` from 26.0.1+incompatible to 26.1.0+incompatible - [Release notes](https://github.com/docker/docker/releases) - [Commits](https://github.com/docker/docker/compare/v26.0.1...v26.1.0) Updates `github.com/moby/buildkit` from 0.13.1 to 0.13.2 - [Release notes](https://github.com/moby/buildkit/releases) - [Commits](https://github.com/moby/buildkit/compare/v0.13.1...v0.13.2) Updates `golang.org/x/sys` from 0.18.0 to 0.19.0 - [Commits](https://github.com/golang/sys/compare/v0.18.0...v0.19.0) --- updated-dependencies: - dependency-name: github.com/GoogleContainerTools/kaniko dependency-type: direct:production update-type: version-update:semver-minor dependency-group: go-dependencies - dependency-name: github.com/containerd/containerd dependency-type: direct:production update-type: version-update:semver-patch dependency-group: go-dependencies - dependency-name: github.com/docker/docker dependency-type: direct:production update-type: version-update:semver-minor dependency-group: go-dependencies - dependency-name: github.com/moby/buildkit dependency-type: direct:production update-type: version-update:semver-patch dependency-group: go-dependencies - dependency-name: golang.org/x/sys dependency-type: direct:production update-type: version-update:semver-minor dependency-group: go-dependencies ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Natalie Arellano --- go.mod | 38 ++++++++++++++-------------- go.sum | 80 +++++++++++++++++++++++++++++----------------------------- 2 files changed, 59 insertions(+), 59 deletions(-) diff --git a/go.mod b/go.mod index c93889fd..cc318440 100644 --- a/go.mod +++ b/go.mod @@ -2,23 +2,23 @@ module github.com/buildpacks/lifecycle require ( github.com/BurntSushi/toml v1.3.2 - github.com/GoogleContainerTools/kaniko v1.21.1 + github.com/GoogleContainerTools/kaniko v1.22.0 github.com/apex/log v1.9.0 github.com/awslabs/amazon-ecr-credential-helper/ecr-login v0.0.0-20231213181459-b0fcec718dc6 github.com/buildpacks/imgutil v0.0.0-20240422175901-30b002586ecc github.com/chrismellard/docker-credential-acr-env v0.0.0-20230304212654-82a0ddb27589 - github.com/containerd/containerd v1.7.14 - github.com/docker/docker v26.0.1+incompatible + github.com/containerd/containerd v1.7.16 + github.com/docker/docker v26.1.0+incompatible github.com/golang/mock v1.6.0 github.com/google/go-cmp v0.6.0 github.com/google/go-containerregistry v0.19.1 github.com/google/uuid v1.6.0 github.com/heroku/color v0.0.6 - github.com/moby/buildkit v0.13.1 + github.com/moby/buildkit v0.13.2 github.com/pkg/errors v0.9.1 github.com/sclevine/spec v1.4.0 golang.org/x/sync v0.7.0 - golang.org/x/sys v0.18.0 + golang.org/x/sys v0.19.0 ) require ( @@ -39,20 +39,20 @@ require ( github.com/Microsoft/go-winio v0.6.1 // indirect github.com/Microsoft/hcsshim v0.11.4 // indirect github.com/agext/levenshtein v1.2.3 // indirect - github.com/aws/aws-sdk-go-v2 v1.25.2 // indirect - github.com/aws/aws-sdk-go-v2/config v1.27.4 // indirect - github.com/aws/aws-sdk-go-v2/credentials v1.17.4 // indirect - github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.15.2 // indirect - github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.2 // indirect - github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.2 // indirect + github.com/aws/aws-sdk-go-v2 v1.26.0 // indirect + github.com/aws/aws-sdk-go-v2/config v1.27.7 // indirect + github.com/aws/aws-sdk-go-v2/credentials v1.17.7 // indirect + github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.15.3 // indirect + github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.3 // indirect + github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.3 // indirect github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0 // indirect github.com/aws/aws-sdk-go-v2/service/ecr v1.24.5 // indirect github.com/aws/aws-sdk-go-v2/service/ecrpublic v1.21.5 // indirect github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.1 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.2 // indirect - github.com/aws/aws-sdk-go-v2/service/sso v1.20.1 // indirect - github.com/aws/aws-sdk-go-v2/service/ssooidc v1.23.1 // indirect - github.com/aws/aws-sdk-go-v2/service/sts v1.28.1 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.5 // indirect + github.com/aws/aws-sdk-go-v2/service/sso v1.20.2 // indirect + github.com/aws/aws-sdk-go-v2/service/ssooidc v1.23.2 // indirect + github.com/aws/aws-sdk-go-v2/service/sts v1.28.4 // indirect github.com/aws/smithy-go v1.20.1 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect @@ -84,7 +84,7 @@ require ( github.com/gogo/protobuf v1.3.2 // indirect github.com/golang-jwt/jwt/v4 v4.5.0 // 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/gorilla/mux v1.8.0 // indirect github.com/hashicorp/go-immutable-radix v1.3.1 // indirect github.com/hashicorp/go-memdb v1.3.4 // indirect @@ -130,14 +130,14 @@ require ( golang.org/x/exp v0.0.0-20231219160207-73b9e39aefca // indirect golang.org/x/mod v0.14.0 // indirect golang.org/x/net v0.23.0 // indirect - golang.org/x/oauth2 v0.17.0 // indirect + golang.org/x/oauth2 v0.18.0 // indirect golang.org/x/text v0.14.0 // indirect golang.org/x/time v0.5.0 // indirect golang.org/x/tools v0.17.0 // indirect google.golang.org/appengine v1.6.8 // indirect google.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240213162025-012b6fc9bca9 // indirect - google.golang.org/grpc v1.61.1 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240314234333-6e1732d8331c // indirect + google.golang.org/grpc v1.62.1 // indirect google.golang.org/protobuf v1.33.0 // indirect ) diff --git a/go.sum b/go.sum index fe974793..4dc4628e 100644 --- a/go.sum +++ b/go.sum @@ -37,8 +37,8 @@ github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBp github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/toml v1.3.2 h1:o7IhLm0Msx3BaB+n3Ag7L8EVlByGnpq14C4YWiu/gL8= github.com/BurntSushi/toml v1.3.2/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= -github.com/GoogleContainerTools/kaniko v1.21.1 h1:Q77TGiuSRopS1FvZY9Bzu9Wp9VYlpP6zU+/mu08/COs= -github.com/GoogleContainerTools/kaniko v1.21.1/go.mod h1:5kbaXGmhHLNc2Zzi/P1Se0qhFYDvK8R62QJh/O0n8rk= +github.com/GoogleContainerTools/kaniko v1.22.0 h1:WIL8Wuc+lQW8sv1R+zOZsCy4lQtTzrVJ76K2VMkB++0= +github.com/GoogleContainerTools/kaniko v1.22.0/go.mod h1:Kki7uX+HlskobmD7PRrGZvL0S9Aejf8kzfzoQUv68pQ= github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= github.com/Microsoft/hcsshim v0.11.4 h1:68vKo2VN8DE9AdN4tnkWnmdhqdbpUFM8OF3Airm7fz8= @@ -53,18 +53,18 @@ github.com/apex/logs v1.0.0/go.mod h1:XzxuLZ5myVHDy9SAmYpamKKRNApGj54PfYLcFrXqDw github.com/aphistic/golf v0.0.0-20180712155816-02c07f170c5a/go.mod h1:3NqKYiepwy8kCu4PNA+aP7WUV72eXWJeP9/r3/K9aLE= github.com/aphistic/sweet v0.2.0/go.mod h1:fWDlIh/isSE9n6EPsRmC0det+whmX6dJid3stzu0Xys= github.com/aws/aws-sdk-go v1.20.6/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= -github.com/aws/aws-sdk-go-v2 v1.25.2 h1:/uiG1avJRgLGiQM9X3qJM8+Qa6KRGK5rRPuXE0HUM+w= -github.com/aws/aws-sdk-go-v2 v1.25.2/go.mod h1:Evoc5AsmtveRt1komDwIsjHFyrP5tDuF1D1U+6z6pNo= -github.com/aws/aws-sdk-go-v2/config v1.27.4 h1:AhfWb5ZwimdsYTgP7Od8E9L1u4sKmDW2ZVeLcf2O42M= -github.com/aws/aws-sdk-go-v2/config v1.27.4/go.mod h1:zq2FFXK3A416kiukwpsd+rD4ny6JC7QSkp4QdN1Mp2g= -github.com/aws/aws-sdk-go-v2/credentials v1.17.4 h1:h5Vztbd8qLppiPwX+y0Q6WiwMZgpd9keKe2EAENgAuI= -github.com/aws/aws-sdk-go-v2/credentials v1.17.4/go.mod h1:+30tpwrkOgvkJL1rUZuRLoxcJwtI/OkeBLYnHxJtVe0= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.15.2 h1:AK0J8iYBFeUk2Ax7O8YpLtFsfhdOByh2QIkHmigpRYk= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.15.2/go.mod h1:iRlGzMix0SExQEviAyptRWRGdYNo3+ufW/lCzvKVTUc= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.2 h1:bNo4LagzUKbjdxE0tIcR9pMzLR2U/Tgie1Hq1HQ3iH8= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.2/go.mod h1:wRQv0nN6v9wDXuWThpovGQjqF1HFdcgWjporw14lS8k= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.2 h1:EtOU5jsPdIQNP+6Q2C5e3d65NKT1PeCiQk+9OdzO12Q= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.2/go.mod h1:tyF5sKccmDz0Bv4NrstEr+/9YkSPJHrcO7UsUKf7pWM= +github.com/aws/aws-sdk-go-v2 v1.26.0 h1:/Ce4OCiM3EkpW7Y+xUnfAFpchU78K7/Ug01sZni9PgA= +github.com/aws/aws-sdk-go-v2 v1.26.0/go.mod h1:35hUlJVYd+M++iLI3ALmVwMOyRYMmRqUXpTtRGW+K9I= +github.com/aws/aws-sdk-go-v2/config v1.27.7 h1:JSfb5nOQF01iOgxFI5OIKWwDiEXWTyTgg1Mm1mHi0A4= +github.com/aws/aws-sdk-go-v2/config v1.27.7/go.mod h1:PH0/cNpoMO+B04qET699o5W92Ca79fVtbUnvMIZro4I= +github.com/aws/aws-sdk-go-v2/credentials v1.17.7 h1:WJd+ubWKoBeRh7A5iNMnxEOs982SyVKOJD+K8HIezu4= +github.com/aws/aws-sdk-go-v2/credentials v1.17.7/go.mod h1:UQi7LMR0Vhvs+44w5ec8Q+VS+cd10cjwgHwiVkE0YGU= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.15.3 h1:p+y7FvkK2dxS+FEwRIDHDe//ZX+jDhP8HHE50ppj4iI= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.15.3/go.mod h1:/fYB+FZbDlwlAiynK9KDXlzZl3ANI9JkD0Uhz5FjNT4= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.3 h1:ifbIbHZyGl1alsAhPIYsHOg5MuApgqOvVeI8wIugXfs= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.3/go.mod h1:oQZXg3c6SNeY6OZrDY+xHcF4VGIEoNotX2B4PrDeoJI= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.3 h1:Qvodo9gHG9F3E8SfYOspPeBt0bjSbsevK8WhRAUHcoY= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.3/go.mod h1:vCKrdLXtybdf/uQd/YfVR2r5pcbNuEYKzMQpcxmeSJw= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0 h1:hT8rVHwugYE2lEfdFE0QWVo81lF7jMrYJVDWI+f+VxU= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0/go.mod h1:8tu/lYfQfFe6IGnaOdrpVgEL2IrrDOf6/m9RQum4NkY= github.com/aws/aws-sdk-go-v2/service/ecr v1.24.5 h1:wLPDAUFT50NEXGXpywRU3AA74pg35RJjWol/68ruvQQ= @@ -73,14 +73,14 @@ github.com/aws/aws-sdk-go-v2/service/ecrpublic v1.21.5 h1:PQp21GBlGNaQ+AVJAB8w2K github.com/aws/aws-sdk-go-v2/service/ecrpublic v1.21.5/go.mod h1:WMntdAol8KgeYsa5sDZPsRTXs4jVZIMYu0eQVVIQxnc= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.1 h1:EyBZibRTVAs6ECHZOw5/wlylS9OcTzwyjeQMudmREjE= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.1/go.mod h1:JKpmtYhhPs7D97NL/ltqz7yCkERFW5dOlHyVl66ZYF8= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.2 h1:5ffmXjPtwRExp1zc7gENLgCPyHFbhEPwVTkTiH9niSk= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.2/go.mod h1:Ru7vg1iQ7cR4i7SZ/JTLYN9kaXtbL69UdgG0OQWQxW0= -github.com/aws/aws-sdk-go-v2/service/sso v1.20.1 h1:utEGkfdQ4L6YW/ietH7111ZYglLJvS+sLriHJ1NBJEQ= -github.com/aws/aws-sdk-go-v2/service/sso v1.20.1/go.mod h1:RsYqzYr2F2oPDdpy+PdhephuZxTfjHQe7SOBcZGoAU8= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.23.1 h1:9/GylMS45hGGFCcMrUZDVayQE1jYSIN6da9jo7RAYIw= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.23.1/go.mod h1:YjAPFn4kGFqKC54VsHs5fn5B6d+PCY2tziEa3U/GB5Y= -github.com/aws/aws-sdk-go-v2/service/sts v1.28.1 h1:3I2cBEYgKhrWlwyZgfpSO2BpaMY1LHPqXYk/QGlu2ew= -github.com/aws/aws-sdk-go-v2/service/sts v1.28.1/go.mod h1:uQ7YYKZt3adCRrdCBREm1CD3efFLOUNH77MrUCvx5oA= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.5 h1:K/NXvIftOlX+oGgWGIa3jDyYLDNsdVhsjHmsBH2GLAQ= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.5/go.mod h1:cl9HGLV66EnCmMNzq4sYOti+/xo8w34CsgzVtm2GgsY= +github.com/aws/aws-sdk-go-v2/service/sso v1.20.2 h1:XOPfar83RIRPEzfihnp+U6udOveKZJvPQ76SKWrLRHc= +github.com/aws/aws-sdk-go-v2/service/sso v1.20.2/go.mod h1:Vv9Xyk1KMHXrR3vNQe8W5LMFdTjSeWk0gBZBzvf3Qa0= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.23.2 h1:pi0Skl6mNl2w8qWZXcdOyg197Zsf4G97U7Sso9JXGZE= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.23.2/go.mod h1:JYzLoEVeLXk+L4tn1+rrkfhkxl6mLDEVaDSvGq9og90= +github.com/aws/aws-sdk-go-v2/service/sts v1.28.4 h1:Ppup1nVNAOWbBOrcoOxaxPeEnSFB2RnnQdguhXpmeQk= +github.com/aws/aws-sdk-go-v2/service/sts v1.28.4/go.mod h1:+K1rNPVyGxkRuv9NNiaZ4YhBFuyw2MMA9SlIJ1Zlpz8= github.com/aws/smithy-go v1.20.1 h1:4SZlSlMr36UEqC7XOyRVb27XMeZubNcBNN+9IgEPIQw= github.com/aws/smithy-go v1.20.1/go.mod h1:krry+ya/rV9RDcV/Q16kpu6ypI4K2czasz0NC3qS14E= github.com/awslabs/amazon-ecr-credential-helper/ecr-login v0.0.0-20231213181459-b0fcec718dc6 h1:PlJRmqKlSlEUlwem1c3zdPaEMtJc/ktnV7naD5Qvsx4= @@ -107,8 +107,8 @@ github.com/containerd/cgroups v1.1.0 h1:v8rEWFl6EoqHB+swVNjVoCJE8o3jX7e8nqBGPLaD github.com/containerd/cgroups v1.1.0/go.mod h1:6ppBcbh/NOOUU+dMKrykgaBnK9lCIBxHqJDGwsa1mIw= github.com/containerd/cgroups/v3 v3.0.2 h1:f5WFqIVSgo5IZmtTT3qVBo6TzI1ON6sycSBKkymb9L0= github.com/containerd/cgroups/v3 v3.0.2/go.mod h1:JUgITrzdFqp42uI2ryGA+ge0ap/nxzYgkGmIcetmErE= -github.com/containerd/containerd v1.7.14 h1:H/XLzbnGuenZEGK+v0RkwTdv2u1QFAruMe5N0GNPJwA= -github.com/containerd/containerd v1.7.14/go.mod h1:YMC9Qt5yzNqXx/fO4j/5yYVIHXSRrlB3H7sxkUTvspg= +github.com/containerd/containerd v1.7.16 h1:7Zsfe8Fkj4Wi2My6DXGQ87hiqIrmOXolm72ZEkFU5Mg= +github.com/containerd/containerd v1.7.16/go.mod h1:NL49g7A/Fui7ccmxV6zkBWwqMgmMxFWzujYCc+JLt7k= github.com/containerd/continuity v0.4.3 h1:6HVkalIp+2u1ZLH1J/pYX2oBVXlJZvh1X1A7bEZ9Su8= github.com/containerd/continuity v0.4.3/go.mod h1:F6PTNCKepoxEaXLQp3wDAjygEnImnZ/7o4JzpodfroQ= github.com/containerd/fifo v1.1.0 h1:4I2mbh5stb1u6ycIABlBw9zgtlK8viPI9QkQNRQEEmY= @@ -136,8 +136,8 @@ github.com/docker/cli v25.0.3+incompatible h1:KLeNs7zws74oFuVhgZQ5ONGZiXUUdgsdy6 github.com/docker/cli v25.0.3+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= github.com/docker/distribution v2.8.3+incompatible h1:AtKxIZ36LoNK51+Z6RpzLpddBirtxJnzDrHLEKxTAYk= github.com/docker/distribution v2.8.3+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/docker v26.0.1+incompatible h1:t39Hm6lpXuXtgkF0dm1t9a5HkbUfdGy6XbWexmGr+hA= -github.com/docker/docker v26.0.1+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v26.1.0+incompatible h1:W1G9MPNbskA6VZWL7b3ZljTh0pXI68FpINx0GKaOdaM= +github.com/docker/docker v26.1.0+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/docker-credential-helpers v0.8.0 h1:YQFtbBQb4VrpoPxhFuzEBPQ9E16qz5SpHLS+uswaCp8= github.com/docker/docker-credential-helpers v0.8.0/go.mod h1:UGFXcuoQ5TxPiB54nHOZ32AWRqQdECoh/Mg0AlEYb40= github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c= @@ -200,8 +200,8 @@ github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QD github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= @@ -275,8 +275,8 @@ github.com/minio/highwayhash v1.0.2 h1:Aak5U0nElisjDCfPSG79Tgzkn2gl66NxOMspRrKnA github.com/minio/highwayhash v1.0.2/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY= github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/moby/buildkit v0.13.1 h1:L8afOFhPq2RPJJSr/VyzbufwID7jquZVB7oFHbPRcPE= -github.com/moby/buildkit v0.13.1/go.mod h1:aNmNQKLBFYAOFuzQjR3VA27/FijlvtBD1pjNwTSN37k= +github.com/moby/buildkit v0.13.2 h1:nXNszM4qD9E7QtG7bFWPnDI1teUQFQglBzon/IU3SzI= +github.com/moby/buildkit v0.13.2/go.mod h1:2cyVOv9NoHM7arphK9ZfHIWKn9YVZRFd1wXB8kKmEzY= 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= @@ -452,8 +452,8 @@ golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.17.0 h1:6m3ZPmLEFdVxKKWnKq4VqZ60gutO35zm+zrAHVmHyDQ= -golang.org/x/oauth2 v0.17.0/go.mod h1:OzPDGQiuQMguemayvdylqddI7qcD9lnSDb+1FiwQ5HA= +golang.org/x/oauth2 v0.18.0 h1:09qnuIAgzdx1XplqJvW6CQqMCtGZykZWcXzPMPUusvI= +golang.org/x/oauth2 v0.18.0/go.mod h1:Wf7knwG0MPoWIMMBgFlEaSUDaKskp0dCfrlJRJXbBi8= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -487,8 +487,8 @@ golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= -golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= +golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= @@ -528,17 +528,17 @@ google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98 google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= google.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9 h1:9+tzLLstTlPTRyJTh+ah5wIMsBW5c4tQwGTN3thOW9Y= google.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9/go.mod h1:mqHbVIp48Muh7Ywss/AD6I5kNVKZMmAa/QEW58Gxp2s= -google.golang.org/genproto/googleapis/api v0.0.0-20240221002015-b0ce06bbee7c h1:9g7erC9qu44ks7UK4gDNlnk4kOxZG707xKm4jVniy6o= -google.golang.org/genproto/googleapis/api v0.0.0-20240221002015-b0ce06bbee7c/go.mod h1:5iCWqnniDlqZHrd3neWVTOwvh/v6s3232omMecelax8= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240213162025-012b6fc9bca9 h1:hZB7eLIaYlW9qXRfCq/qDaPdbeY3757uARz5Vvfv+cY= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240213162025-012b6fc9bca9/go.mod h1:YUWgXUFRPfoYK1IHMuxH5K6nPEXSCzIMljnQ59lLRCk= +google.golang.org/genproto/googleapis/api v0.0.0-20240311132316-a219d84964c2 h1:rIo7ocm2roD9DcFIX67Ym8icoGCKSARAiPljFhh5suQ= +google.golang.org/genproto/googleapis/api v0.0.0-20240311132316-a219d84964c2/go.mod h1:O1cOfN1Cy6QEYr7VxtjOyP5AdAuR0aJ/MYZaaof623Y= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240314234333-6e1732d8331c h1:lfpJ/2rWPa/kJgxyyXM8PrNnfCzcmxJ265mADgwmvLI= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240314234333-6e1732d8331c/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.61.1 h1:kLAiWrZs7YeDM6MumDe7m3y4aM6wacLzM1Y/wiLP9XY= -google.golang.org/grpc v1.61.1/go.mod h1:VUbo7IFqmF1QtCAstipjG0GIoq49KvMe9+h1jFLBNJs= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= 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= From c0590cda08cac14fa8828cfa55b51a19ba32e7b0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 8 May 2024 11:12:18 -0400 Subject: [PATCH 06/18] Bump the go-dependencies group with 2 updates (#1351) Bumps the go-dependencies group with 2 updates: [github.com/docker/docker](https://github.com/docker/docker) and [golang.org/x/sys](https://github.com/golang/sys). Updates `github.com/docker/docker` from 26.1.0+incompatible to 26.1.1+incompatible - [Release notes](https://github.com/docker/docker/releases) - [Commits](https://github.com/docker/docker/compare/v26.1.0...v26.1.1) Updates `golang.org/x/sys` from 0.19.0 to 0.20.0 - [Commits](https://github.com/golang/sys/compare/v0.19.0...v0.20.0) --- updated-dependencies: - dependency-name: github.com/docker/docker dependency-type: direct:production update-type: version-update:semver-patch dependency-group: go-dependencies - dependency-name: golang.org/x/sys dependency-type: direct:production update-type: version-update:semver-minor dependency-group: go-dependencies ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 4 ++-- go.sum | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index cc318440..435ba07b 100644 --- a/go.mod +++ b/go.mod @@ -8,7 +8,7 @@ require ( github.com/buildpacks/imgutil v0.0.0-20240422175901-30b002586ecc github.com/chrismellard/docker-credential-acr-env v0.0.0-20230304212654-82a0ddb27589 github.com/containerd/containerd v1.7.16 - github.com/docker/docker v26.1.0+incompatible + github.com/docker/docker v26.1.1+incompatible github.com/golang/mock v1.6.0 github.com/google/go-cmp v0.6.0 github.com/google/go-containerregistry v0.19.1 @@ -18,7 +18,7 @@ require ( github.com/pkg/errors v0.9.1 github.com/sclevine/spec v1.4.0 golang.org/x/sync v0.7.0 - golang.org/x/sys v0.19.0 + golang.org/x/sys v0.20.0 ) require ( diff --git a/go.sum b/go.sum index 4dc4628e..415b3462 100644 --- a/go.sum +++ b/go.sum @@ -136,8 +136,8 @@ github.com/docker/cli v25.0.3+incompatible h1:KLeNs7zws74oFuVhgZQ5ONGZiXUUdgsdy6 github.com/docker/cli v25.0.3+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= github.com/docker/distribution v2.8.3+incompatible h1:AtKxIZ36LoNK51+Z6RpzLpddBirtxJnzDrHLEKxTAYk= github.com/docker/distribution v2.8.3+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/docker v26.1.0+incompatible h1:W1G9MPNbskA6VZWL7b3ZljTh0pXI68FpINx0GKaOdaM= -github.com/docker/docker v26.1.0+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v26.1.1+incompatible h1:oI+4kkAgIwwb54b9OC7Xc3hSgu1RlJA/Lln/DF72djQ= +github.com/docker/docker v26.1.1+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/docker-credential-helpers v0.8.0 h1:YQFtbBQb4VrpoPxhFuzEBPQ9E16qz5SpHLS+uswaCp8= github.com/docker/docker-credential-helpers v0.8.0/go.mod h1:UGFXcuoQ5TxPiB54nHOZ32AWRqQdECoh/Mg0AlEYb40= github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c= @@ -487,8 +487,8 @@ golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= -golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y= +golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= From 83efa75a14ba25263164860fbb5ecd809e4eec32 Mon Sep 17 00:00:00 2001 From: Natalie Arellano Date: Fri, 10 May 2024 11:56:44 -0400 Subject: [PATCH 07/18] Also read distro information from /etc/os-release when checking target compat (#1352) * Reorder functions in file Signed-off-by: Natalie Arellano * Also read distro information from /etc/os-release when checking target compat https://github.com/buildpacks/lifecycle/pull/1347 reads the file when providing target env vars to buildpacks during detect, but we also need to consider this info when deciding whether or not to run detect for the buildpack Signed-off-by: Natalie Arellano * Error if we don't find run image OS during analyze And remove checks for missing OS later in the build, as it should always be there Signed-off-by: Natalie Arellano --------- Signed-off-by: Natalie Arellano --- phase/analyzer.go | 3 +- phase/analyzer_test.go | 13 +++ phase/detector.go | 2 +- platform/run_image_test.go | 54 ----------- platform/target_data.go | 90 +++++++++-------- platform/target_data_test.go | 181 +++++++++++++++++++++++++---------- 6 files changed, 193 insertions(+), 150 deletions(-) diff --git a/phase/analyzer.go b/phase/analyzer.go index 0217411b..946d5ba4 100644 --- a/phase/analyzer.go +++ b/phase/analyzer.go @@ -6,7 +6,6 @@ import ( "github.com/buildpacks/lifecycle/api" "github.com/buildpacks/lifecycle/image" - "github.com/buildpacks/lifecycle/internal/fsutil" "github.com/buildpacks/lifecycle/internal/layer" "github.com/buildpacks/lifecycle/log" "github.com/buildpacks/lifecycle/platform" @@ -88,7 +87,7 @@ func (a *Analyzer) Analyze() (files.Analyzed, error) { return files.Analyzed{}, errors.Wrap(err, "unpacking metadata from image") } if atm.OS == "" { - platform.GetTargetOSFromFileSystem(&fsutil.Detect{}, atm, a.Logger) + return files.Analyzed{}, errors.New("failed to find OS in run image config") } } } diff --git a/phase/analyzer_test.go b/phase/analyzer_test.go index 71f965f0..0424f3f6 100644 --- a/phase/analyzer_test.go +++ b/phase/analyzer_test.go @@ -484,6 +484,7 @@ func testAnalyzer(platformAPI string) func(t *testing.T, when spec.G, it spec.S) h.AssertEq(t, md.RunImage.Reference, "s0m3D1g3sT") }) + it("populates target metadata from the run image", func() { h.AssertNil(t, previousImage.SetLabel("io.buildpacks.base.id", "id software")) h.AssertNil(t, previousImage.SetOS("windows")) @@ -508,6 +509,18 @@ func testAnalyzer(platformAPI string) func(t *testing.T, when spec.G, it spec.S) h.AssertEq(t, md.RunImage.TargetMetadata.Distro.Version, "Helpful Holstein") } }) + + when("run image is missing OS", func() { + it("errors", func() { + h.AssertNil(t, previousImage.SetOS("")) + _, err := analyzer.Analyze() + if api.MustParse(platformAPI).LessThan("0.12") { + h.AssertNil(t, err) + } else { + h.AssertError(t, err, "failed to find OS") + } + }) + }) }) }) } diff --git a/phase/detector.go b/phase/detector.go index b370251f..216c9632 100644 --- a/phase/detector.go +++ b/phase/detector.go @@ -206,7 +206,7 @@ func (d *Detector) detectGroup(group buildpack.Group, done []buildpack.GroupElem } else { for i := range descriptor.TargetsList() { d.Logger.Debugf("Checking for match against descriptor: %s", descriptor.TargetsList()[i]) - if platform.TargetSatisfiedForBuild(*d.AnalyzeMD.RunImage.TargetMetadata, descriptor.TargetsList()[i]) { + if platform.TargetSatisfiedForBuild(&fsutil.Detect{}, *d.AnalyzeMD.RunImage.TargetMetadata, descriptor.TargetsList()[i], d.Logger) { targetMatch = true break } diff --git a/platform/run_image_test.go b/platform/run_image_test.go index 29cc1a54..566b00cc 100644 --- a/platform/run_image_test.go +++ b/platform/run_image_test.go @@ -4,8 +4,6 @@ import ( "path/filepath" "testing" - "github.com/apex/log" - "github.com/apex/log/handlers/memory" "github.com/google/go-containerregistry/pkg/authn" "github.com/buildpacks/lifecycle/platform" @@ -203,58 +201,6 @@ func testRunImage(t *testing.T, when spec.G, it spec.S) { }) }) - when(".EnvVarsFor", func() { - it("returns the right thing", func() { - tm := files.TargetMetadata{Arch: "pentium", ArchVariant: "mmx", ID: "my-id", OS: "linux", Distro: &files.OSDistro{Name: "nix", Version: "22.11"}} - d := &mockDetector{ - contents: "this is just test contents really", - t: t, - HasFile: false, - } - observed := platform.EnvVarsFor(d, tm, &log.Logger{Handler: memory.New()}) - h.AssertContains(t, observed, "CNB_TARGET_ARCH="+tm.Arch) - h.AssertContains(t, observed, "CNB_TARGET_ARCH_VARIANT="+tm.ArchVariant) - h.AssertContains(t, observed, "CNB_TARGET_DISTRO_NAME="+tm.Distro.Name) - h.AssertContains(t, observed, "CNB_TARGET_DISTRO_VERSION="+tm.Distro.Version) - h.AssertContains(t, observed, "CNB_TARGET_OS="+tm.OS) - h.AssertEq(t, len(observed), 5) - }) - - it("returns the right thing from /etc/os-release", func() { - d := &mockDetector{ - contents: "this is just test contents really", - t: t, - HasFile: true, - } - tm := files.TargetMetadata{Arch: "pentium", ArchVariant: "mmx", ID: "my-id", OS: "linux", Distro: nil} - observed := platform.EnvVarsFor(d, tm, &log.Logger{Handler: memory.New()}) - h.AssertContains(t, observed, "CNB_TARGET_ARCH="+tm.Arch) - h.AssertContains(t, observed, "CNB_TARGET_ARCH_VARIANT="+tm.ArchVariant) - h.AssertContains(t, observed, "CNB_TARGET_DISTRO_NAME=opensesame") - h.AssertContains(t, observed, "CNB_TARGET_DISTRO_VERSION=3.14") - h.AssertContains(t, observed, "CNB_TARGET_OS="+tm.OS) - h.AssertEq(t, len(observed), 5) - }) - - it("does not return the wrong thing", func() { - tm := files.TargetMetadata{Arch: "pentium", OS: "linux"} - d := &mockDetector{ - contents: "this is just test contents really", - t: t, - HasFile: false, - } - observed := platform.EnvVarsFor(d, tm, &log.Logger{Handler: memory.New()}) - h.AssertContains(t, observed, "CNB_TARGET_ARCH="+tm.Arch) - h.AssertContains(t, observed, "CNB_TARGET_OS="+tm.OS) - // note: per the spec only the ID field is optional, so I guess the others should always be set: https://github.com/buildpacks/rfcs/blob/main/text/0096-remove-stacks-mixins.md#runtime-metadata - // the empty ones: - h.AssertContains(t, observed, "CNB_TARGET_ARCH_VARIANT=") - h.AssertContains(t, observed, "CNB_TARGET_DISTRO_NAME=") - h.AssertContains(t, observed, "CNB_TARGET_DISTRO_VERSION=") - h.AssertEq(t, len(observed), 5) - }) - }) - when(".BestRunImageMirrorFor", func() { var ( stackMD *files.Stack diff --git a/platform/target_data.go b/platform/target_data.go index 82fba40c..cfb8c474 100644 --- a/platform/target_data.go +++ b/platform/target_data.go @@ -9,30 +9,6 @@ import ( "github.com/buildpacks/lifecycle/platform/files" ) -// EnvVarsFor fulfills the prophecy set forth in https://github.com/buildpacks/rfcs/blob/b8abe33f2bdc58792acf0bd094dc4ce3c8a54dbb/text/0096-remove-stacks-mixins.md?plain=1#L97 -// by returning an array of "VARIABLE=value" strings suitable for inclusion in your environment or complete breakfast. -func EnvVarsFor(d fsutil.Detector, tm files.TargetMetadata, logger log.Logger) []string { - // we should always have os & arch, - // if they are not populated try to get target information from the build-time base image - if tm.OS == "" || tm.Distro == nil { - logger.Info("target distro name/version labels not found, reading /etc/os-release file") - GetTargetOSFromFileSystem(d, &tm, logger) - } - ret := []string{ - "CNB_TARGET_OS=" + tm.OS, - "CNB_TARGET_ARCH=" + tm.Arch, - "CNB_TARGET_ARCH_VARIANT=" + tm.ArchVariant, - } - var distName, distVersion string - if tm.Distro != nil { - distName = tm.Distro.Name - distVersion = tm.Distro.Version - } - ret = append(ret, "CNB_TARGET_DISTRO_NAME="+distName) - ret = append(ret, "CNB_TARGET_DISTRO_VERSION="+distVersion) - return ret -} - func GetTargetMetadata(fromImage imgutil.Image) (*files.TargetMetadata, error) { tm := files.TargetMetadata{} var err error @@ -64,25 +40,14 @@ func GetTargetMetadata(fromImage imgutil.Image) (*files.TargetMetadata, error) { return &tm, nil } -// GetTargetOSFromFileSystem populates the target metadata you pass in if the information is available -// returns a boolean indicating whether it populated any data. -func GetTargetOSFromFileSystem(d fsutil.Detector, tm *files.TargetMetadata, logger log.Logger) { - if d.HasSystemdFile() { - contents, err := d.ReadSystemdFile() - if err != nil { - logger.Warnf("Encountered error trying to read /etc/os-release file: %s", err.Error()) - return - } - info := d.GetInfo(contents) - if info.Version != "" || info.Name != "" { - tm.OS = "linux" - tm.Distro = &files.OSDistro{Name: info.Name, Version: info.Version} - } - } -} - // TargetSatisfiedForBuild treats empty fields as wildcards and returns true if all populated fields match. -func TargetSatisfiedForBuild(base files.TargetMetadata, module buildpack.TargetMetadata) bool { +func TargetSatisfiedForBuild(d fsutil.Detector, base files.TargetMetadata, module buildpack.TargetMetadata, logger log.Logger) bool { + // ensure we have all available data + if base.Distro == nil { + logger.Info("target distro name/version labels not found, reading /etc/os-release file") + GetTargetOSFromFileSystem(d, &base, logger) + } + // check matches if !matches(base.OS, module.OS) { return false } @@ -92,6 +57,7 @@ func TargetSatisfiedForBuild(base files.TargetMetadata, module buildpack.TargetM if !matches(base.ArchVariant, module.ArchVariant) { return false } + // check distro if len(module.Distros) == 0 { return true } @@ -115,6 +81,46 @@ func matches(target1, target2 string) bool { return target1 == target2 } +// GetTargetOSFromFileSystem populates the target metadata you pass in if the information is available +// returns a boolean indicating whether it populated any data. +func GetTargetOSFromFileSystem(d fsutil.Detector, tm *files.TargetMetadata, logger log.Logger) { + if d.HasSystemdFile() { + contents, err := d.ReadSystemdFile() + if err != nil { + logger.Warnf("Encountered error trying to read /etc/os-release file: %s", err.Error()) + return + } + info := d.GetInfo(contents) + if info.Version != "" || info.Name != "" { + tm.Distro = &files.OSDistro{Name: info.Name, Version: info.Version} + } + } +} + +// EnvVarsFor fulfills the prophecy set forth in https://github.com/buildpacks/rfcs/blob/b8abe33f2bdc58792acf0bd094dc4ce3c8a54dbb/text/0096-remove-stacks-mixins.md?plain=1#L97 +// by returning an array of "VARIABLE=value" strings suitable for inclusion in your environment or complete breakfast. +func EnvVarsFor(d fsutil.Detector, tm files.TargetMetadata, logger log.Logger) []string { + // we should always have os & arch, + // if they are not populated try to get target information from the build-time base image + if tm.Distro == nil { + logger.Info("target distro name/version labels not found, reading /etc/os-release file") + GetTargetOSFromFileSystem(d, &tm, logger) + } + ret := []string{ + "CNB_TARGET_OS=" + tm.OS, + "CNB_TARGET_ARCH=" + tm.Arch, + "CNB_TARGET_ARCH_VARIANT=" + tm.ArchVariant, + } + var distName, distVersion string + if tm.Distro != nil { + distName = tm.Distro.Name + distVersion = tm.Distro.Version + } + ret = append(ret, "CNB_TARGET_DISTRO_NAME="+distName) + ret = append(ret, "CNB_TARGET_DISTRO_VERSION="+distVersion) + return ret +} + // TargetSatisfiedForRebase treats optional fields (ArchVariant and Distribution fields) as wildcards if empty, returns true if all populated fields match func TargetSatisfiedForRebase(t files.TargetMetadata, appTargetMetadata files.TargetMetadata) bool { if t.OS != appTargetMetadata.OS || t.Arch != appTargetMetadata.Arch { diff --git a/platform/target_data_test.go b/platform/target_data_test.go index 2742f8f4..421e0bdd 100644 --- a/platform/target_data_test.go +++ b/platform/target_data_test.go @@ -21,34 +21,61 @@ func TestTargetData(t *testing.T) { func testTargetData(t *testing.T, when spec.G, it spec.S) { when(".TargetSatisfiedForBuild", func() { - var baseTarget files.TargetMetadata + baseTarget := files.TargetMetadata{OS: "Win95", Arch: "Pentium"} + d := mockDetector{ + contents: "this is just test contents really", + t: t, + HasFile: false, // by default, don't use info from /etc/os-release for these tests + } + when("base image data", func() { when("has os and arch", func() { - baseTarget = files.TargetMetadata{OS: "Win95", Arch: "Pentium"} - when("buildpack data", func() { when("has os and arch", func() { it("must match", func() { - h.AssertEq(t, platform.TargetSatisfiedForBuild(baseTarget, buildpack.TargetMetadata{OS: baseTarget.OS, Arch: baseTarget.Arch}), true) - h.AssertEq(t, platform.TargetSatisfiedForBuild(baseTarget, buildpack.TargetMetadata{OS: "Win98", Arch: baseTarget.Arch}), false) - h.AssertEq(t, platform.TargetSatisfiedForBuild(baseTarget, buildpack.TargetMetadata{OS: baseTarget.OS, Arch: "Pentium MMX"}), false) + h.AssertEq(t, platform.TargetSatisfiedForBuild(&d, baseTarget, buildpack.TargetMetadata{OS: baseTarget.OS, Arch: baseTarget.Arch}, &log.Logger{Handler: memory.New()}), true) + h.AssertEq(t, platform.TargetSatisfiedForBuild(&d, baseTarget, buildpack.TargetMetadata{OS: "Win98", Arch: baseTarget.Arch}, &log.Logger{Handler: memory.New()}), false) + h.AssertEq(t, platform.TargetSatisfiedForBuild(&d, baseTarget, buildpack.TargetMetadata{OS: baseTarget.OS, Arch: "Pentium MMX"}, &log.Logger{Handler: memory.New()}), false) }) }) when("missing os and arch", func() { it("matches", func() { - h.AssertEq(t, platform.TargetSatisfiedForBuild(baseTarget, buildpack.TargetMetadata{OS: "", Arch: ""}), true) + h.AssertEq(t, platform.TargetSatisfiedForBuild(&d, baseTarget, buildpack.TargetMetadata{OS: "", Arch: ""}, &log.Logger{Handler: memory.New()}), true) }) }) when("has distro information", func() { it("does not match", func() { - h.AssertEq(t, platform.TargetSatisfiedForBuild(baseTarget, buildpack.TargetMetadata{OS: baseTarget.OS, Arch: baseTarget.Arch, ArchVariant: "MMX"}), true) - h.AssertEq(t, platform.TargetSatisfiedForBuild(baseTarget, buildpack.TargetMetadata{ + h.AssertEq(t, platform.TargetSatisfiedForBuild(&d, baseTarget, buildpack.TargetMetadata{ OS: baseTarget.OS, Arch: baseTarget.Arch, Distros: []buildpack.OSDistro{{Name: "a", Version: "2"}}, - }), false) + }, &log.Logger{Handler: memory.New()}), false) + }) + + when("/etc/os-release has information", func() { + it("must match", func() { + d := mockDetector{ + contents: "this is just test contents really", + t: t, + HasFile: true, + } + h.AssertEq( + t, + platform.TargetSatisfiedForBuild( + &d, + baseTarget, + buildpack.TargetMetadata{ + OS: baseTarget.OS, + Arch: baseTarget.Arch, + Distros: []buildpack.OSDistro{ + {Name: "opensesame", Version: "3.14"}, + }, + }, + &log.Logger{Handler: memory.New()}, + ), true) + }) }) }) }) @@ -59,14 +86,14 @@ func testTargetData(t *testing.T, when spec.G, it spec.S) { when("buildpack data", func() { when("has arch variant", func() { it("must match", func() { - h.AssertEq(t, platform.TargetSatisfiedForBuild(baseTarget, buildpack.TargetMetadata{OS: baseTarget.OS, Arch: baseTarget.Arch, ArchVariant: "some-arch-variant"}), true) - h.AssertEq(t, platform.TargetSatisfiedForBuild(baseTarget, buildpack.TargetMetadata{OS: baseTarget.OS, Arch: baseTarget.Arch, ArchVariant: "some-other-arch-variant"}), false) + h.AssertEq(t, platform.TargetSatisfiedForBuild(&d, baseTarget, buildpack.TargetMetadata{OS: baseTarget.OS, Arch: baseTarget.Arch, ArchVariant: "some-arch-variant"}, &log.Logger{Handler: memory.New()}), true) + h.AssertEq(t, platform.TargetSatisfiedForBuild(&d, baseTarget, buildpack.TargetMetadata{OS: baseTarget.OS, Arch: baseTarget.Arch, ArchVariant: "some-other-arch-variant"}, &log.Logger{Handler: memory.New()}), false) }) }) when("missing arch variant", func() { it("matches", func() { - h.AssertEq(t, platform.TargetSatisfiedForBuild(baseTarget, buildpack.TargetMetadata{OS: baseTarget.OS, Arch: baseTarget.Arch}), true) + h.AssertEq(t, platform.TargetSatisfiedForBuild(&d, baseTarget, buildpack.TargetMetadata{OS: baseTarget.OS, Arch: baseTarget.Arch}, &log.Logger{Handler: memory.New()}), true) }) }) }) @@ -78,14 +105,14 @@ func testTargetData(t *testing.T, when spec.G, it spec.S) { when("buildpack data", func() { when("has distro information", func() { it("must match", func() { - h.AssertEq(t, platform.TargetSatisfiedForBuild(baseTarget, buildpack.TargetMetadata{OS: baseTarget.OS, Arch: baseTarget.Arch, Distros: []buildpack.OSDistro{{Name: "B", Version: "2"}, {Name: "A", Version: "1"}}}), true) - h.AssertEq(t, platform.TargetSatisfiedForBuild(baseTarget, buildpack.TargetMetadata{OS: baseTarget.OS, Arch: baseTarget.Arch, Distros: []buildpack.OSDistro{{Name: "g", Version: "2"}, {Name: "B", Version: "2"}}}), false) + h.AssertEq(t, platform.TargetSatisfiedForBuild(&d, baseTarget, buildpack.TargetMetadata{OS: baseTarget.OS, Arch: baseTarget.Arch, Distros: []buildpack.OSDistro{{Name: "B", Version: "2"}, {Name: "A", Version: "1"}}}, &log.Logger{Handler: memory.New()}), true) + h.AssertEq(t, platform.TargetSatisfiedForBuild(&d, baseTarget, buildpack.TargetMetadata{OS: baseTarget.OS, Arch: baseTarget.Arch, Distros: []buildpack.OSDistro{{Name: "g", Version: "2"}, {Name: "B", Version: "2"}}}, &log.Logger{Handler: memory.New()}), false) }) }) when("missing distro information", func() { it("matches", func() { - h.AssertEq(t, platform.TargetSatisfiedForBuild(baseTarget, buildpack.TargetMetadata{OS: baseTarget.OS, Arch: baseTarget.Arch}), true) + h.AssertEq(t, platform.TargetSatisfiedForBuild(&d, baseTarget, buildpack.TargetMetadata{OS: baseTarget.OS, Arch: baseTarget.Arch}, &log.Logger{Handler: memory.New()}), true) }) }) }) @@ -94,6 +121,93 @@ func testTargetData(t *testing.T, when spec.G, it spec.S) { }) }) + when(".GetTargetOSFromFileSystem", func() { + it("populates appropriately", func() { + logr := &log.Logger{Handler: memory.New()} + tm := files.TargetMetadata{} + d := mockDetector{contents: "this is just test contents really", + t: t, + HasFile: true} + platform.GetTargetOSFromFileSystem(&d, &tm, logr) + h.AssertEq(t, "opensesame", tm.Distro.Name) + h.AssertEq(t, "3.14", tm.Distro.Version) + }) + + it("doesn't populate if there's no file", func() { + logr := &log.Logger{Handler: memory.New()} + tm := files.TargetMetadata{} + d := mockDetector{contents: "in unit tests 2.0 the users will generate the content but we'll serve them ads", + t: t, + HasFile: false} + platform.GetTargetOSFromFileSystem(&d, &tm, logr) + h.AssertNil(t, tm.Distro) + }) + + it("doesn't populate if there's an error reading the file", func() { + logr := &log.Logger{Handler: memory.New()} + tm := files.TargetMetadata{} + d := mockDetector{contents: "contentment is the greatest wealth", + t: t, + HasFile: true, + ReadFileErr: fmt.Errorf("I'm sorry Dave, I don't even remember exactly what HAL says"), + } + platform.GetTargetOSFromFileSystem(&d, &tm, logr) + h.AssertNil(t, tm.Distro) + }) + }) + + when(".EnvVarsFor", func() { + it("returns the right thing", func() { + tm := files.TargetMetadata{Arch: "pentium", ArchVariant: "mmx", ID: "my-id", OS: "linux", Distro: &files.OSDistro{Name: "nix", Version: "22.11"}} + d := &mockDetector{ + contents: "this is just test contents really", + t: t, + HasFile: false, + } + observed := platform.EnvVarsFor(d, tm, &log.Logger{Handler: memory.New()}) + h.AssertContains(t, observed, "CNB_TARGET_ARCH="+tm.Arch) + h.AssertContains(t, observed, "CNB_TARGET_ARCH_VARIANT="+tm.ArchVariant) + h.AssertContains(t, observed, "CNB_TARGET_DISTRO_NAME="+tm.Distro.Name) + h.AssertContains(t, observed, "CNB_TARGET_DISTRO_VERSION="+tm.Distro.Version) + h.AssertContains(t, observed, "CNB_TARGET_OS="+tm.OS) + h.AssertEq(t, len(observed), 5) + }) + + it("returns the right thing from /etc/os-release", func() { + d := &mockDetector{ + contents: "this is just test contents really", + t: t, + HasFile: true, + } + tm := files.TargetMetadata{Arch: "pentium", ArchVariant: "mmx", ID: "my-id", OS: "linux", Distro: nil} + observed := platform.EnvVarsFor(d, tm, &log.Logger{Handler: memory.New()}) + h.AssertContains(t, observed, "CNB_TARGET_ARCH="+tm.Arch) + h.AssertContains(t, observed, "CNB_TARGET_ARCH_VARIANT="+tm.ArchVariant) + h.AssertContains(t, observed, "CNB_TARGET_DISTRO_NAME=opensesame") + h.AssertContains(t, observed, "CNB_TARGET_DISTRO_VERSION=3.14") + h.AssertContains(t, observed, "CNB_TARGET_OS="+tm.OS) + h.AssertEq(t, len(observed), 5) + }) + + it("does not return the wrong thing", func() { + tm := files.TargetMetadata{Arch: "pentium", OS: "linux"} + d := &mockDetector{ + contents: "this is just test contents really", + t: t, + HasFile: false, + } + observed := platform.EnvVarsFor(d, tm, &log.Logger{Handler: memory.New()}) + h.AssertContains(t, observed, "CNB_TARGET_ARCH="+tm.Arch) + h.AssertContains(t, observed, "CNB_TARGET_OS="+tm.OS) + // note: per the spec only the ID field is optional, so I guess the others should always be set: https://github.com/buildpacks/rfcs/blob/main/text/0096-remove-stacks-mixins.md#runtime-metadata + // the empty ones: + h.AssertContains(t, observed, "CNB_TARGET_ARCH_VARIANT=") + h.AssertContains(t, observed, "CNB_TARGET_DISTRO_NAME=") + h.AssertContains(t, observed, "CNB_TARGET_DISTRO_VERSION=") + h.AssertEq(t, len(observed), 5) + }) + }) + when(".TargetSatisfiedForRebase", func() { var baseTarget files.TargetMetadata when("orig image data", func() { @@ -167,41 +281,6 @@ func testTargetData(t *testing.T, when spec.G, it spec.S) { }) }) }) - - when(".GetTargetOSFromFileSystem", func() { - it("populates appropriately", func() { - logr := &log.Logger{Handler: memory.New()} - tm := files.TargetMetadata{} - d := mockDetector{contents: "this is just test contents really", - t: t, - HasFile: true} - platform.GetTargetOSFromFileSystem(&d, &tm, logr) - h.AssertEq(t, "opensesame", tm.Distro.Name) - h.AssertEq(t, "3.14", tm.Distro.Version) - }) - - it("doesn't populate if there's no file", func() { - logr := &log.Logger{Handler: memory.New()} - tm := files.TargetMetadata{} - d := mockDetector{contents: "in unit tests 2.0 the users will generate the content but we'll serve them ads", - t: t, - HasFile: false} - platform.GetTargetOSFromFileSystem(&d, &tm, logr) - h.AssertNil(t, tm.Distro) - }) - - it("doesn't populate if there's an error reading the file", func() { - logr := &log.Logger{Handler: memory.New()} - tm := files.TargetMetadata{} - d := mockDetector{contents: "contentment is the greatest wealth", - t: t, - HasFile: true, - ReadFileErr: fmt.Errorf("I'm sorry Dave, I don't even remember exactly what HAL says"), - } - platform.GetTargetOSFromFileSystem(&d, &tm, logr) - h.AssertNil(t, tm.Distro) - }) - }) } type mockDetector struct { From 1a1de0850a2e8cd34bedccf9856886077dd702e4 Mon Sep 17 00:00:00 2001 From: Dilip Gowda Bhagavan <110233170+dilipgb@users.noreply.github.com> Date: Mon, 13 May 2024 21:26:48 +0530 Subject: [PATCH 08/18] fix: ibmcloud CLI nic attachment issue for s390x testing (#1353) * fix: instance create issue for GH actions Signed-off-by: Dilip Gowda Bhagavan * fix: ibm cloud instance creation issue Signed-off-by: Dilip Gowda Bhagavan --------- Signed-off-by: Dilip Gowda Bhagavan --- .github/workflows/test-s390x.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-s390x.yml b/.github/workflows/test-s390x.yml index 2340a9cc..4c45b1f2 100644 --- a/.github/workflows/test-s390x.yml +++ b/.github/workflows/test-s390x.yml @@ -32,11 +32,11 @@ jobs: id: ZVSI run: | #creation of zvsi - ibmcloud is instance-create $ZVSI_INSTANCE_NAME ${{ secrets.ZVSI_VPC }} $ZVSI_ZONE_NAME $ZVSI_PROFILE_NAME ${{ secrets.ZVSI_SUBNET }} --image ${{ secrets.ZVSI_IMAGE }} --keys ${{ secrets.ZVSI_KEY }} --resource-group-id ${{ secrets.ZVSI_RG_ID }} --sgs ${{ secrets.ZVSI_SG }} --allow-ip-spoofing false + ibmcloud is instance-create $ZVSI_INSTANCE_NAME ${{ secrets.ZVSI_VPC }} $ZVSI_ZONE_NAME $ZVSI_PROFILE_NAME ${{ secrets.ZVSI_SUBNET }} --image ${{ secrets.ZVSI_IMAGE }} --keys ${{ secrets.ZVSI_KEY }} --resource-group-id ${{ secrets.ZVSI_RG_ID }} --primary-network-interface "{\"name\":\"eth0\",\"allow_ip_spoofing\":false,\"subnet\": {\"name\":\"${{ secrets.ZVSI_SUBNET }}\"},\"security_groups\":[{\"id\":\"${{ secrets.ZVSI_SG }}\"}]}" #Reserving a floating ip to the ZVSI ibmcloud is floating-ip-reserve $ZVSI_FP_NAME --zone $ZVSI_ZONE_NAME --resource-group-id ${{ secrets.ZVSI_RG_ID }} --in $ZVSI_INSTANCE_NAME #Bouding the Floating ip to the ZVSI - ibmcloud is floating-ip-update $ZVSI_FP_NAME --nic primary --in $ZVSI_INSTANCE_NAME + ibmcloud is floating-ip-update $ZVSI_FP_NAME --nic eth0 --in $ZVSI_INSTANCE_NAME sleep 60 #Saving the Floating IP to login ZVSI ZVSI_HOST=$(ibmcloud is floating-ip $ZVSI_FP_NAME | awk '/Address/{print $2}') From 73f6927abc2079c365971cb3c23b012e1a860902 Mon Sep 17 00:00:00 2001 From: Natalie Arellano Date: Tue, 14 May 2024 14:10:16 -0400 Subject: [PATCH 09/18] More fixes for target compat checking during detect (#1354) * More fixes for target compat checking during detect - If a buildpack fails to specify os/arch (but specifies distro) still check targets - If the run image fails to specify os/arch (this should not happen actually as we will fail during analyze) still check targets - Fix typo in buildpack descriptor struct so that we actually get stack information - If we get distro information from /etc/os-release, persist this information to later invocations to that the log message printed when errors are encountered will be accurate - Don't override inner `i` in loop (this should not actually affect the outer loop but is confusing) Signed-off-by: Natalie Arellano * When stack is "any", don't infer empty target as it is not needed Missing targets is sufficient for wildcard match Signed-off-by: Natalie Arellano * Remove backwards compatible glue that actually causes fewer builds to succeed Fixes https://github.com/buildpacks/lifecycle/issues/1355 Signed-off-by: Natalie Arellano * Remove exit (this was added for debugging purposes) Signed-off-by: Natalie Arellano --------- Signed-off-by: Natalie Arellano --- acceptance/testdata/detector/Dockerfile | 2 +- .../simple_buildpack_version/buildpack.toml | 14 +- buildpack/bp_descriptor.go | 7 +- buildpack/bp_descriptor_test.go | 170 ++++++++++++++---- .../buildpack/by-id/B/v1.2/buildpack.toml | 14 ++ .../buildpack/by-id/B/v1.star/buildpack.toml | 11 ++ .../buildpack/by-id/B/v2.2/buildpack.toml | 14 ++ .../buildpack/by-id/B/v2.star/buildpack.toml | 11 ++ .../buildpack/by-id/B/v2/buildpack.toml | 2 +- phase/detector.go | 39 ++-- platform/target_data.go | 12 +- platform/target_data_test.go | 2 +- 12 files changed, 226 insertions(+), 72 deletions(-) create mode 100644 buildpack/testdata/buildpack/by-id/B/v1.2/buildpack.toml create mode 100644 buildpack/testdata/buildpack/by-id/B/v1.star/buildpack.toml create mode 100644 buildpack/testdata/buildpack/by-id/B/v2.2/buildpack.toml create mode 100644 buildpack/testdata/buildpack/by-id/B/v2.star/buildpack.toml diff --git a/acceptance/testdata/detector/Dockerfile b/acceptance/testdata/detector/Dockerfile index 07364b9a..695e030d 100644 --- a/acceptance/testdata/detector/Dockerfile +++ b/acceptance/testdata/detector/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:bionic +FROM ubuntu:jammy ARG cnb_uid=1234 ARG cnb_gid=1000 diff --git a/acceptance/testdata/detector/container/cnb/buildpacks/simple_buildpack/simple_buildpack_version/buildpack.toml b/acceptance/testdata/detector/container/cnb/buildpacks/simple_buildpack/simple_buildpack_version/buildpack.toml index b70a985e..6cb40946 100644 --- a/acceptance/testdata/detector/container/cnb/buildpacks/simple_buildpack/simple_buildpack_version/buildpack.toml +++ b/acceptance/testdata/detector/container/cnb/buildpacks/simple_buildpack/simple_buildpack_version/buildpack.toml @@ -1,6 +1,12 @@ -api = "0.10" +api = "0.9" [buildpack] - id = "simple_buildpack" - version = "simple_buildpack_version" - name = "Simple Buildpack" +id = "simple_buildpack" +version = "simple_buildpack_version" +name = "Simple Buildpack" + +[[stacks]] +id = "io.buildpacks.stacks.bionic" + +[[stacks]] +id = "io.buildpacks.stacks.jammy" diff --git a/buildpack/bp_descriptor.go b/buildpack/bp_descriptor.go index 18fa6c60..57c58258 100644 --- a/buildpack/bp_descriptor.go +++ b/buildpack/bp_descriptor.go @@ -8,6 +8,7 @@ import ( "github.com/BurntSushi/toml" + "github.com/buildpacks/lifecycle/api" "github.com/buildpacks/lifecycle/internal/encoding" ) @@ -17,7 +18,7 @@ type BpDescriptor struct { Order Order `toml:"order"` WithRootDir string `toml:"-"` Targets []TargetMetadata `toml:"targets"` - Stacks []StackMetadata `tome:"stacks"` // just for backwards compat so we can check if it's the bionic stack, which we translate to a target + Stacks []StackMetadata `toml:"stacks"` // just for backwards compat so we can check if it's the bionic stack, which we translate to a target } @@ -69,7 +70,9 @@ func ReadBpDescriptor(path string) (*BpDescriptor, error) { if len(descriptor.Targets) == 0 { for _, stack := range descriptor.Stacks { if stack.ID == "io.buildpacks.stacks.bionic" { - descriptor.Targets = append(descriptor.Targets, TargetMetadata{OS: "linux", Arch: "amd64", Distros: []OSDistro{{Name: "ubuntu", Version: "18.04"}}}) + if api.MustParse(descriptor.API()).AtLeast("0.10") || len(descriptor.Stacks) == 1 { + descriptor.Targets = append(descriptor.Targets, TargetMetadata{OS: "linux", Arch: "amd64", Distros: []OSDistro{{Name: "ubuntu", Version: "18.04"}}}) + } } else if stack.ID == "*" { descriptor.Targets = append(descriptor.Targets, TargetMetadata{}) // matches any } diff --git a/buildpack/bp_descriptor_test.go b/buildpack/bp_descriptor_test.go index 2fff71ac..cd438709 100644 --- a/buildpack/bp_descriptor_test.go +++ b/buildpack/bp_descriptor_test.go @@ -81,44 +81,140 @@ func testBpDescriptor(t *testing.T, when spec.G, it spec.S) { h.AssertEq(t, descriptor.Targets[0].Distros[0].Version, "V8.4-2L3") }) - it("does translate one special stack value into target values for older apis", func() { - path := filepath.Join("testdata", "buildpack", "by-id", "B", "v1", "buildpack.toml") - descriptor, err := buildpack.ReadBpDescriptor(path) - h.AssertNil(t, err) - // common sanity checks - h.AssertEq(t, descriptor.WithAPI, "0.7") - h.AssertEq(t, descriptor.Buildpack.ID, "B") - h.AssertEq(t, descriptor.Buildpack.Name, "Buildpack B") - h.AssertEq(t, descriptor.Buildpack.Version, "v1") - h.AssertEq(t, descriptor.Buildpack.Homepage, "Buildpack B Homepage") - h.AssertEq(t, descriptor.Buildpack.SBOM, []string{"application/vnd.cyclonedx+json"}) - // specific behaviors for this test - h.AssertEq(t, descriptor.Stacks[0].ID, "io.buildpacks.stacks.bionic") - h.AssertEq(t, len(descriptor.Targets), 1) - h.AssertEq(t, descriptor.Targets[0].Arch, "amd64") - h.AssertEq(t, descriptor.Targets[0].OS, "linux") - h.AssertEq(t, descriptor.Targets[0].Distros[0].Name, "ubuntu") - h.AssertEq(t, descriptor.Targets[0].Distros[0].Version, "18.04") - }) + when("translating stacks to targets", func() { + when("older buildpacks", func() { + when("there is only bionic", func() { + it("creates a target", func() { + path := filepath.Join("testdata", "buildpack", "by-id", "B", "v1", "buildpack.toml") + descriptor, err := buildpack.ReadBpDescriptor(path) + h.AssertNil(t, err) + // common sanity checks + h.AssertEq(t, descriptor.WithAPI, "0.7") + h.AssertEq(t, descriptor.Buildpack.ID, "B") + h.AssertEq(t, descriptor.Buildpack.Name, "Buildpack B") + h.AssertEq(t, descriptor.Buildpack.Version, "v1") + h.AssertEq(t, descriptor.Buildpack.Homepage, "Buildpack B Homepage") + h.AssertEq(t, descriptor.Buildpack.SBOM, []string{"application/vnd.cyclonedx+json"}) + // specific behaviors for this test + h.AssertEq(t, descriptor.Stacks[0].ID, "io.buildpacks.stacks.bionic") + h.AssertEq(t, len(descriptor.Targets), 1) + h.AssertEq(t, descriptor.Targets[0].Arch, "amd64") + h.AssertEq(t, descriptor.Targets[0].OS, "linux") + h.AssertEq(t, descriptor.Targets[0].Distros[0].Name, "ubuntu") + h.AssertEq(t, descriptor.Targets[0].Distros[0].Version, "18.04") + }) + }) - it("translates one special stack value into target values", func() { - path := filepath.Join("testdata", "buildpack", "by-id", "B", "v2", "buildpack.toml") - descriptor, err := buildpack.ReadBpDescriptor(path) - h.AssertNil(t, err) - // common sanity checks - h.AssertEq(t, descriptor.WithAPI, "0.12") - h.AssertEq(t, descriptor.Buildpack.ID, "B") - h.AssertEq(t, descriptor.Buildpack.Name, "Buildpack B") - h.AssertEq(t, descriptor.Buildpack.Version, "v1") - h.AssertEq(t, descriptor.Buildpack.Homepage, "Buildpack B Homepage") - h.AssertEq(t, descriptor.Buildpack.SBOM, []string{"application/vnd.cyclonedx+json"}) - // specific behaviors for this test - h.AssertEq(t, descriptor.Stacks[0].ID, "io.buildpacks.stacks.bionic") - h.AssertEq(t, len(descriptor.Targets), 1) - h.AssertEq(t, descriptor.Targets[0].Arch, "amd64") - h.AssertEq(t, descriptor.Targets[0].OS, "linux") - h.AssertEq(t, descriptor.Targets[0].Distros[0].Name, "ubuntu") - h.AssertEq(t, descriptor.Targets[0].Distros[0].Version, "18.04") + when("there are multiple stacks", func() { + it("does NOT create a target", func() { + path := filepath.Join("testdata", "buildpack", "by-id", "B", "v1.2", "buildpack.toml") + descriptor, err := buildpack.ReadBpDescriptor(path) + h.AssertNil(t, err) + // common sanity checks + h.AssertEq(t, descriptor.WithAPI, "0.7") + h.AssertEq(t, descriptor.Buildpack.ID, "B") + h.AssertEq(t, descriptor.Buildpack.Name, "Buildpack B") + h.AssertEq(t, descriptor.Buildpack.Version, "v1.2") + h.AssertEq(t, descriptor.Buildpack.Homepage, "Buildpack B Homepage") + h.AssertEq(t, descriptor.Buildpack.SBOM, []string{"application/vnd.cyclonedx+json"}) + // specific behaviors for this test + h.AssertEq(t, descriptor.Stacks[0].ID, "io.buildpacks.stacks.bionic") + h.AssertEq(t, len(descriptor.Targets), 0) + }) + }) + + when("there is a wildcard stack", func() { + it("creates a wildcard target", func() { + path := filepath.Join("testdata", "buildpack", "by-id", "B", "v1.star", "buildpack.toml") + descriptor, err := buildpack.ReadBpDescriptor(path) + h.AssertNil(t, err) + // common sanity checks + h.AssertEq(t, descriptor.WithAPI, "0.7") + h.AssertEq(t, descriptor.Buildpack.ID, "B") + h.AssertEq(t, descriptor.Buildpack.Name, "Buildpack B") + h.AssertEq(t, descriptor.Buildpack.Version, "v1.star") + h.AssertEq(t, descriptor.Buildpack.Homepage, "Buildpack B Homepage") + h.AssertEq(t, descriptor.Buildpack.SBOM, []string{"application/vnd.cyclonedx+json"}) + // specific behaviors for this test + h.AssertEq(t, descriptor.Stacks[0].ID, "*") + h.AssertEq(t, len(descriptor.Targets), 1) + // a target that is completely empty will always match whatever is the base image target + h.AssertEq(t, descriptor.Targets[0].Arch, "") + h.AssertEq(t, descriptor.Targets[0].OS, "") + h.AssertEq(t, descriptor.Targets[0].ArchVariant, "") + h.AssertEq(t, len(descriptor.Targets[0].Distros), 0) + }) + }) + }) + + when("newer buildpacks", func() { + when("there is only bionic", func() { + it("creates a target", func() { + path := filepath.Join("testdata", "buildpack", "by-id", "B", "v2", "buildpack.toml") + descriptor, err := buildpack.ReadBpDescriptor(path) + h.AssertNil(t, err) + // common sanity checks + h.AssertEq(t, descriptor.WithAPI, "0.12") + h.AssertEq(t, descriptor.Buildpack.ID, "B") + h.AssertEq(t, descriptor.Buildpack.Name, "Buildpack B") + h.AssertEq(t, descriptor.Buildpack.Version, "v2") + h.AssertEq(t, descriptor.Buildpack.Homepage, "Buildpack B Homepage") + h.AssertEq(t, descriptor.Buildpack.SBOM, []string{"application/vnd.cyclonedx+json"}) + // specific behaviors for this test + h.AssertEq(t, descriptor.Stacks[0].ID, "io.buildpacks.stacks.bionic") + h.AssertEq(t, len(descriptor.Targets), 1) + h.AssertEq(t, descriptor.Targets[0].Arch, "amd64") + h.AssertEq(t, descriptor.Targets[0].OS, "linux") + h.AssertEq(t, descriptor.Targets[0].Distros[0].Name, "ubuntu") + h.AssertEq(t, descriptor.Targets[0].Distros[0].Version, "18.04") + }) + }) + + when("there are multiple stacks", func() { + it("creates a target", func() { + path := filepath.Join("testdata", "buildpack", "by-id", "B", "v2.2", "buildpack.toml") + descriptor, err := buildpack.ReadBpDescriptor(path) + h.AssertNil(t, err) + // common sanity checks + h.AssertEq(t, descriptor.WithAPI, "0.12") + h.AssertEq(t, descriptor.Buildpack.ID, "B") + h.AssertEq(t, descriptor.Buildpack.Name, "Buildpack B") + h.AssertEq(t, descriptor.Buildpack.Version, "v2.2") + h.AssertEq(t, descriptor.Buildpack.Homepage, "Buildpack B Homepage") + h.AssertEq(t, descriptor.Buildpack.SBOM, []string{"application/vnd.cyclonedx+json"}) + // specific behaviors for this test + h.AssertEq(t, descriptor.Stacks[0].ID, "io.buildpacks.stacks.bionic") + h.AssertEq(t, len(descriptor.Targets), 1) + h.AssertEq(t, descriptor.Targets[0].Arch, "amd64") + h.AssertEq(t, descriptor.Targets[0].OS, "linux") + h.AssertEq(t, descriptor.Targets[0].Distros[0].Name, "ubuntu") + h.AssertEq(t, descriptor.Targets[0].Distros[0].Version, "18.04") + }) + }) + + when("there is a wildcard stack", func() { + it("creates a wildcard target", func() { + path := filepath.Join("testdata", "buildpack", "by-id", "B", "v2.star", "buildpack.toml") + descriptor, err := buildpack.ReadBpDescriptor(path) + h.AssertNil(t, err) + // common sanity checks + h.AssertEq(t, descriptor.WithAPI, "0.12") + h.AssertEq(t, descriptor.Buildpack.ID, "B") + h.AssertEq(t, descriptor.Buildpack.Name, "Buildpack B") + h.AssertEq(t, descriptor.Buildpack.Version, "v2.star") + h.AssertEq(t, descriptor.Buildpack.Homepage, "Buildpack B Homepage") + h.AssertEq(t, descriptor.Buildpack.SBOM, []string{"application/vnd.cyclonedx+json"}) + // specific behaviors for this test + h.AssertEq(t, descriptor.Stacks[0].ID, "*") + h.AssertEq(t, len(descriptor.Targets), 1) + // a target that is completely empty will always match whatever is the base image target + h.AssertEq(t, descriptor.Targets[0].Arch, "") + h.AssertEq(t, descriptor.Targets[0].OS, "") + h.AssertEq(t, descriptor.Targets[0].ArchVariant, "") + h.AssertEq(t, len(descriptor.Targets[0].Distros), 0) + }) + }) + }) }) it("does not translate non-special stack values", func() { diff --git a/buildpack/testdata/buildpack/by-id/B/v1.2/buildpack.toml b/buildpack/testdata/buildpack/by-id/B/v1.2/buildpack.toml new file mode 100644 index 00000000..7b2df167 --- /dev/null +++ b/buildpack/testdata/buildpack/by-id/B/v1.2/buildpack.toml @@ -0,0 +1,14 @@ +api = "0.7" + +[buildpack] +id = "B" +name = "Buildpack B" +version = "v1.2" +homepage = "Buildpack B Homepage" +sbom-formats = ["application/vnd.cyclonedx+json"] + +[[stacks]] +id = "io.buildpacks.stacks.bionic" + +[[stacks]] +id = "io.buildpacks.stacks.jammy" diff --git a/buildpack/testdata/buildpack/by-id/B/v1.star/buildpack.toml b/buildpack/testdata/buildpack/by-id/B/v1.star/buildpack.toml new file mode 100644 index 00000000..9267b69f --- /dev/null +++ b/buildpack/testdata/buildpack/by-id/B/v1.star/buildpack.toml @@ -0,0 +1,11 @@ +api = "0.7" + +[buildpack] +id = "B" +name = "Buildpack B" +version = "v1.star" +homepage = "Buildpack B Homepage" +sbom-formats = ["application/vnd.cyclonedx+json"] + +[[stacks]] +id = "*" diff --git a/buildpack/testdata/buildpack/by-id/B/v2.2/buildpack.toml b/buildpack/testdata/buildpack/by-id/B/v2.2/buildpack.toml new file mode 100644 index 00000000..87cc955e --- /dev/null +++ b/buildpack/testdata/buildpack/by-id/B/v2.2/buildpack.toml @@ -0,0 +1,14 @@ +api = "0.12" + +[buildpack] +id = "B" +name = "Buildpack B" +version = "v2.2" +homepage = "Buildpack B Homepage" +sbom-formats = ["application/vnd.cyclonedx+json"] + +[[stacks]] +id = "io.buildpacks.stacks.bionic" + +[[stacks]] +id = "io.buildpacks.stacks.jammy" diff --git a/buildpack/testdata/buildpack/by-id/B/v2.star/buildpack.toml b/buildpack/testdata/buildpack/by-id/B/v2.star/buildpack.toml new file mode 100644 index 00000000..018823b0 --- /dev/null +++ b/buildpack/testdata/buildpack/by-id/B/v2.star/buildpack.toml @@ -0,0 +1,11 @@ +api = "0.12" + +[buildpack] +id = "B" +name = "Buildpack B" +version = "v2.star" +homepage = "Buildpack B Homepage" +sbom-formats = ["application/vnd.cyclonedx+json"] + +[[stacks]] +id = "*" diff --git a/buildpack/testdata/buildpack/by-id/B/v2/buildpack.toml b/buildpack/testdata/buildpack/by-id/B/v2/buildpack.toml index ad55d56b..7780b29f 100644 --- a/buildpack/testdata/buildpack/by-id/B/v2/buildpack.toml +++ b/buildpack/testdata/buildpack/by-id/B/v2/buildpack.toml @@ -3,7 +3,7 @@ api = "0.12" [buildpack] id = "B" name = "Buildpack B" -version = "v1" +version = "v2" homepage = "Buildpack B Homepage" sbom-formats = ["application/vnd.cyclonedx+json"] diff --git a/phase/detector.go b/phase/detector.go index 216c9632..a4d3522a 100644 --- a/phase/detector.go +++ b/phase/detector.go @@ -144,26 +144,14 @@ func (d *Detector) detectOrder(order buildpack.Order, done, next []buildpack.Gro return nil, nil, ErrFailedDetection } -// isWildcard returns true IFF the Arch and OS are unspecified, meaning that the target arch/os are "any" -func isWildcard(t files.TargetMetadata) bool { - return t.Arch == "" && t.OS == "" -} - -func hasWildcard(ts []buildpack.TargetMetadata) bool { - for _, tm := range ts { - if tm.OS == "" && tm.Arch == "" { - return true - } - } - return false -} - func (d *Detector) detectGroup(group buildpack.Group, done []buildpack.GroupElement, wg *sync.WaitGroup) ([]buildpack.GroupElement, []files.BuildPlanEntry, error) { // used below to mark each item as "done" by appending it to the done list markDone := func(groupEl buildpack.GroupElement, descriptor buildpack.Descriptor) { done = append(done, groupEl.WithAPI(descriptor.API()).WithHomepage(descriptor.Homepage())) } + runImageTargetInfo := d.AnalyzeMD.RunImageTarget() + for i, groupEl := range group.Group { // Continue if element has already been processed. if hasIDForKind(done, groupEl.Kind(), groupEl.ID) { @@ -175,7 +163,7 @@ func (d *Detector) detectGroup(group buildpack.Group, done []buildpack.GroupElem return d.detectOrder(groupEl.OrderExtensions, done, group.Group[i+1:], true, wg) } - // Lookup element in store. <-- "the store" is the directory where all the buildpacks are. + // Lookup element in store (the "store" is the directory where all the buildpacks are). var ( descriptor buildpack.Descriptor err error @@ -192,26 +180,31 @@ func (d *Detector) detectGroup(group buildpack.Group, done []buildpack.GroupElem // FIXME: cyclical references lead to infinite recursion return d.detectOrder(order, done, group.Group[i+1:], groupEl.Optional, wg) } - descriptor = bpDescriptor // standardize the type so below we don't have to care whether it was an extension + descriptor = bpDescriptor // Standardize the type so below we don't have to care whether it is an extension. } else { descriptor, err = d.DirStore.LookupExt(groupEl.ID, groupEl.Version) if err != nil { return nil, nil, err } } + + // Check target compatibility. if d.PlatformAPI.AtLeast("0.12") { - targetMatch := false - if isWildcard(d.AnalyzeMD.RunImageTarget()) || hasWildcard(descriptor.TargetsList()) { + var targetMatch bool + if len(descriptor.TargetsList()) == 0 { + // This is actually just for tests. In practice, the lifecycle will infer a target with at least an OS + // when targets are missing from buildpack.toml. targetMatch = true } else { - for i := range descriptor.TargetsList() { - d.Logger.Debugf("Checking for match against descriptor: %s", descriptor.TargetsList()[i]) - if platform.TargetSatisfiedForBuild(&fsutil.Detect{}, *d.AnalyzeMD.RunImage.TargetMetadata, descriptor.TargetsList()[i], d.Logger) { + for _, target := range descriptor.TargetsList() { + d.Logger.Debugf("Checking for match against descriptor: %s", target) + if platform.TargetSatisfiedForBuild(&fsutil.Detect{}, &runImageTargetInfo, target, d.Logger) { targetMatch = true break } } } + if !targetMatch && !groupEl.Optional { markDone(groupEl, descriptor) d.Runs.Store( @@ -220,7 +213,7 @@ func (d *Detector) detectGroup(group buildpack.Group, done []buildpack.GroupElem Code: -1, Err: fmt.Errorf( "unable to satisfy target os/arch constraints; run image: %s, buildpack: %s", - encoding.ToJSONMaybe(d.AnalyzeMD.RunImage.TargetMetadata), + encoding.ToJSONMaybe(runImageTargetInfo), encoding.ToJSONMaybe(descriptor.TargetsList()), ), }) @@ -240,7 +233,7 @@ func (d *Detector) detectGroup(group buildpack.Group, done []buildpack.GroupElem BuildConfigDir: d.BuildConfigDir, PlatformDir: d.PlatformDir, Env: env.NewBuildEnv(os.Environ()), - TargetEnv: platform.EnvVarsFor(&fsutil.Detect{}, d.AnalyzeMD.RunImageTarget(), d.Logger), + TargetEnv: platform.EnvVarsFor(&fsutil.Detect{}, runImageTargetInfo, d.Logger), } d.Runs.Store(key, d.Executor.Detect(descriptor, inputs, d.Logger)) // this is where we finally invoke bin/detect } diff --git a/platform/target_data.go b/platform/target_data.go index cfb8c474..b77ce477 100644 --- a/platform/target_data.go +++ b/platform/target_data.go @@ -40,12 +40,18 @@ func GetTargetMetadata(fromImage imgutil.Image) (*files.TargetMetadata, error) { return &tm, nil } -// TargetSatisfiedForBuild treats empty fields as wildcards and returns true if all populated fields match. -func TargetSatisfiedForBuild(d fsutil.Detector, base files.TargetMetadata, module buildpack.TargetMetadata, logger log.Logger) bool { +// TargetSatisfiedForBuild modifies the provided target information for the base (run) image if distribution information is missing, +// by reading distribution information from /etc/os-release. +// OS, arch, and arch variant if not specified by at least one entity (image or module) will be treated as matches. +// If a module specifies distribution information, the image must also specify matching information. +func TargetSatisfiedForBuild(d fsutil.Detector, base *files.TargetMetadata, module buildpack.TargetMetadata, logger log.Logger) bool { + if base == nil { + base = &files.TargetMetadata{} + } // ensure we have all available data if base.Distro == nil { logger.Info("target distro name/version labels not found, reading /etc/os-release file") - GetTargetOSFromFileSystem(d, &base, logger) + GetTargetOSFromFileSystem(d, base, logger) } // check matches if !matches(base.OS, module.OS) { diff --git a/platform/target_data_test.go b/platform/target_data_test.go index 421e0bdd..cb78ade9 100644 --- a/platform/target_data_test.go +++ b/platform/target_data_test.go @@ -21,7 +21,7 @@ func TestTargetData(t *testing.T) { func testTargetData(t *testing.T, when spec.G, it spec.S) { when(".TargetSatisfiedForBuild", func() { - baseTarget := files.TargetMetadata{OS: "Win95", Arch: "Pentium"} + baseTarget := &files.TargetMetadata{OS: "Win95", Arch: "Pentium"} d := mockDetector{ contents: "this is just test contents really", t: t, From 85b745ca870341199948f993e16dba04216b8c36 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 5 Jun 2024 12:37:24 -0400 Subject: [PATCH 10/18] Bump azure/docker-login from 1 to 2 (#1359) Bumps [azure/docker-login](https://github.com/azure/docker-login) from 1 to 2. - [Release notes](https://github.com/azure/docker-login/releases) - [Commits](https://github.com/azure/docker-login/compare/v1...v2) --- updated-dependencies: - dependency-name: azure/docker-login dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/build.yml | 2 +- .github/workflows/post-release.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6f54ffb2..06763f68 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -200,7 +200,7 @@ jobs: with: name: lifecycle-bom-cdx-sha256 path: lifecycle-v*-bom.cdx.json.sha256 - - uses: azure/docker-login@v1 + - uses: azure/docker-login@v2 if: github.event_name == 'push' with: username: ${{ secrets.DOCKER_USERNAME }} diff --git a/.github/workflows/post-release.yml b/.github/workflows/post-release.yml index 797b0b2f..5112a21e 100644 --- a/.github/workflows/post-release.yml +++ b/.github/workflows/post-release.yml @@ -22,7 +22,7 @@ jobs: go install github.com/google/go-containerregistry/cmd/crane@latest - name: Install cosign uses: sigstore/cosign-installer@v3 - - uses: azure/docker-login@v1 + - uses: azure/docker-login@v2 with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} From 36c0af0d812e77f9ef76e5e0389a54c7a93c3cc7 Mon Sep 17 00:00:00 2001 From: Natalie Arellano Date: Wed, 5 Jun 2024 13:47:22 -0400 Subject: [PATCH 11/18] Bump imgutil to pick up fixes for containerd and podman (#1361) Signed-off-by: Natalie Arellano --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 435ba07b..f1023c28 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ require ( github.com/GoogleContainerTools/kaniko v1.22.0 github.com/apex/log v1.9.0 github.com/awslabs/amazon-ecr-credential-helper/ecr-login v0.0.0-20231213181459-b0fcec718dc6 - github.com/buildpacks/imgutil v0.0.0-20240422175901-30b002586ecc + github.com/buildpacks/imgutil v0.0.0-20240605145725-186f89b2d168 github.com/chrismellard/docker-credential-acr-env v0.0.0-20230304212654-82a0ddb27589 github.com/containerd/containerd v1.7.16 github.com/docker/docker v26.1.1+incompatible diff --git a/go.sum b/go.sum index 415b3462..f60720c5 100644 --- a/go.sum +++ b/go.sum @@ -90,8 +90,8 @@ github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24 github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/buildpacks/imgutil v0.0.0-20240422175901-30b002586ecc h1:Pxgpm4bIjgWY9a8r8xHlMYp6wzm5hIZHtw4Iux3XA0c= -github.com/buildpacks/imgutil v0.0.0-20240422175901-30b002586ecc/go.mod h1:n2R6VRuWsAX3cyHCp/u0Z4WJcixny0gYg075J39owrk= +github.com/buildpacks/imgutil v0.0.0-20240605145725-186f89b2d168 h1:yVYVi1V7x1bXklOx9lpbTfteyzQKGZC/wkl+IlaVRlU= +github.com/buildpacks/imgutil v0.0.0-20240605145725-186f89b2d168/go.mod h1:n2R6VRuWsAX3cyHCp/u0Z4WJcixny0gYg075J39owrk= github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= From 7b5a8ec1cf69ddcbc2ed544dbefc98fdd8af49e4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 5 Jun 2024 16:15:50 -0400 Subject: [PATCH 12/18] Bump the go-dependencies group across 1 directory with 5 updates (#1360) * Bump the go-dependencies group across 1 directory with 5 updates Bumps the go-dependencies group with 3 updates in the / directory: [github.com/BurntSushi/toml](https://github.com/BurntSushi/toml), [github.com/GoogleContainerTools/kaniko](https://github.com/GoogleContainerTools/kaniko) and [github.com/containerd/containerd](https://github.com/containerd/containerd). Updates `github.com/BurntSushi/toml` from 1.3.2 to 1.4.0 - [Release notes](https://github.com/BurntSushi/toml/releases) - [Commits](https://github.com/BurntSushi/toml/compare/v1.3.2...v1.4.0) Updates `github.com/GoogleContainerTools/kaniko` from 1.22.0 to 1.23.0 - [Release notes](https://github.com/GoogleContainerTools/kaniko/releases) - [Changelog](https://github.com/GoogleContainerTools/kaniko/blob/main/CHANGELOG.md) - [Commits](https://github.com/GoogleContainerTools/kaniko/compare/v1.22.0...v1.23.0) Updates `github.com/awslabs/amazon-ecr-credential-helper/ecr-login` from 0.0.0-20231213181459-b0fcec718dc6 to 0.0.0-20240419161514-af205d85bb44 - [Release notes](https://github.com/awslabs/amazon-ecr-credential-helper/releases) - [Changelog](https://github.com/awslabs/amazon-ecr-credential-helper/blob/main/CHANGELOG.md) - [Commits](https://github.com/awslabs/amazon-ecr-credential-helper/commits) Updates `github.com/containerd/containerd` from 1.7.16 to 1.7.17 - [Release notes](https://github.com/containerd/containerd/releases) - [Changelog](https://github.com/containerd/containerd/blob/main/RELEASES.md) - [Commits](https://github.com/containerd/containerd/compare/v1.7.16...v1.7.17) Updates `github.com/docker/docker` from 26.1.1+incompatible to 26.1.2+incompatible - [Release notes](https://github.com/docker/docker/releases) - [Commits](https://github.com/docker/docker/compare/v26.1.1...v26.1.2) --- updated-dependencies: - dependency-name: github.com/BurntSushi/toml dependency-type: direct:production update-type: version-update:semver-minor dependency-group: go-dependencies - dependency-name: github.com/GoogleContainerTools/kaniko dependency-type: direct:production update-type: version-update:semver-minor dependency-group: go-dependencies - dependency-name: github.com/awslabs/amazon-ecr-credential-helper/ecr-login dependency-type: direct:production update-type: version-update:semver-patch dependency-group: go-dependencies - dependency-name: github.com/containerd/containerd dependency-type: direct:production update-type: version-update:semver-patch dependency-group: go-dependencies - dependency-name: github.com/docker/docker dependency-type: direct:production update-type: version-update:semver-patch dependency-group: go-dependencies ... Signed-off-by: dependabot[bot] * Fix unit Signed-off-by: Natalie Arellano --------- Signed-off-by: dependabot[bot] Signed-off-by: Natalie Arellano Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Natalie Arellano --- buildpack/build_test.go | 2 +- go.mod | 74 +++++++++---------- go.sum | 159 +++++++++++++++++++--------------------- 3 files changed, 112 insertions(+), 123 deletions(-) diff --git a/buildpack/build_test.go b/buildpack/build_test.go index a28b3101..f336c913 100644 --- a/buildpack/build_test.go +++ b/buildpack/build_test.go @@ -941,7 +941,7 @@ func testBuild(t *testing.T, when spec.G, it spec.S) { filepath.Join(appDir, "launch-A-v1.toml"), ) _, err := executor.Build(descriptor, inputs, logger) - h.AssertError(t, err, "toml: line 2 (last key \"processes.command\"): incompatible types: TOML value has type []interface {}; destination has type string") + h.AssertError(t, err, "toml: line 2 (last key \"processes.command\"): incompatible types: TOML value has type []any; destination has type string") }) }) }) diff --git a/go.mod b/go.mod index f1023c28..ee5ac968 100644 --- a/go.mod +++ b/go.mod @@ -1,14 +1,14 @@ module github.com/buildpacks/lifecycle require ( - github.com/BurntSushi/toml v1.3.2 - github.com/GoogleContainerTools/kaniko v1.22.0 + github.com/BurntSushi/toml v1.4.0 + github.com/GoogleContainerTools/kaniko v1.23.0 github.com/apex/log v1.9.0 - github.com/awslabs/amazon-ecr-credential-helper/ecr-login v0.0.0-20231213181459-b0fcec718dc6 + github.com/awslabs/amazon-ecr-credential-helper/ecr-login v0.0.0-20240419161514-af205d85bb44 github.com/buildpacks/imgutil v0.0.0-20240605145725-186f89b2d168 github.com/chrismellard/docker-credential-acr-env v0.0.0-20230304212654-82a0ddb27589 - github.com/containerd/containerd v1.7.16 - github.com/docker/docker v26.1.1+incompatible + github.com/containerd/containerd v1.7.17 + github.com/docker/docker v26.1.2+incompatible github.com/golang/mock v1.6.0 github.com/google/go-cmp v0.6.0 github.com/google/go-containerregistry v0.19.1 @@ -22,8 +22,7 @@ require ( ) require ( - cloud.google.com/go/compute v1.24.0 // indirect - cloud.google.com/go/compute/metadata v0.2.3 // indirect + cloud.google.com/go/compute/metadata v0.3.0 // 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/Azure/azure-sdk-for-go v68.0.0+incompatible // indirect @@ -36,24 +35,24 @@ require ( github.com/Azure/go-autorest/autorest/date v0.3.0 // indirect github.com/Azure/go-autorest/logger v0.2.1 // indirect github.com/Azure/go-autorest/tracing v0.6.0 // indirect - github.com/Microsoft/go-winio v0.6.1 // indirect - github.com/Microsoft/hcsshim v0.11.4 // indirect + github.com/Microsoft/go-winio v0.6.2 // indirect + github.com/Microsoft/hcsshim v0.11.5 // indirect github.com/agext/levenshtein v1.2.3 // indirect - github.com/aws/aws-sdk-go-v2 v1.26.0 // indirect - github.com/aws/aws-sdk-go-v2/config v1.27.7 // indirect - github.com/aws/aws-sdk-go-v2/credentials v1.17.7 // indirect - github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.15.3 // indirect - github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.3 // indirect - github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.3 // indirect + github.com/aws/aws-sdk-go-v2 v1.26.1 // indirect + github.com/aws/aws-sdk-go-v2/config v1.27.13 // indirect + github.com/aws/aws-sdk-go-v2/credentials v1.17.13 // indirect + github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.1 // indirect + github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.5 // indirect + github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.5 // indirect github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0 // indirect - github.com/aws/aws-sdk-go-v2/service/ecr v1.24.5 // indirect - github.com/aws/aws-sdk-go-v2/service/ecrpublic v1.21.5 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.1 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.5 // indirect - github.com/aws/aws-sdk-go-v2/service/sso v1.20.2 // indirect - github.com/aws/aws-sdk-go-v2/service/ssooidc v1.23.2 // indirect - github.com/aws/aws-sdk-go-v2/service/sts v1.28.4 // indirect - github.com/aws/smithy-go v1.20.1 // indirect + github.com/aws/aws-sdk-go-v2/service/ecr v1.27.4 // indirect + github.com/aws/aws-sdk-go-v2/service/ecrpublic v1.23.4 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.2 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.7 // indirect + github.com/aws/aws-sdk-go-v2/service/sso v1.20.6 // indirect + github.com/aws/aws-sdk-go-v2/service/ssooidc v1.24.0 // indirect + github.com/aws/aws-sdk-go-v2/service/sts v1.28.7 // indirect + github.com/aws/smithy-go v1.20.2 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/cilium/ebpf v0.12.3 // indirect @@ -63,14 +62,14 @@ require ( github.com/containerd/fifo v1.1.0 // indirect github.com/containerd/log v0.1.0 // indirect github.com/containerd/stargz-snapshotter/estargz v0.15.1 // indirect - github.com/containerd/ttrpc v1.2.3 // indirect + github.com/containerd/ttrpc v1.2.4 // indirect github.com/containerd/typeurl/v2 v2.1.1 // indirect github.com/coreos/go-systemd/v22 v22.5.0 // indirect github.com/dimchansky/utfbom v1.1.1 // indirect github.com/distribution/reference v0.6.0 // indirect - github.com/docker/cli v25.0.3+incompatible // indirect + github.com/docker/cli v26.1.0+incompatible // indirect github.com/docker/distribution v2.8.3+incompatible // indirect - github.com/docker/docker-credential-helpers v0.8.0 // indirect + github.com/docker/docker-credential-helpers v0.8.1 // indirect github.com/docker/go-connections v0.5.0 // indirect github.com/docker/go-events v0.0.0-20190806004212-e31b211e4f1c // indirect github.com/docker/go-metrics v0.0.1 // indirect @@ -109,7 +108,7 @@ require ( 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-rc5 // indirect + github.com/opencontainers/image-spec v1.1.0 // indirect github.com/opencontainers/runtime-spec v1.1.0 // indirect github.com/opencontainers/selinux v1.11.0 // indirect github.com/otiai10/copy v1.14.0 // indirect @@ -126,19 +125,16 @@ require ( go.opentelemetry.io/otel v1.25.0 // indirect go.opentelemetry.io/otel/metric v1.25.0 // indirect go.opentelemetry.io/otel/trace v1.25.0 // indirect - golang.org/x/crypto v0.21.0 // indirect - golang.org/x/exp v0.0.0-20231219160207-73b9e39aefca // indirect - golang.org/x/mod v0.14.0 // indirect - golang.org/x/net v0.23.0 // indirect - golang.org/x/oauth2 v0.18.0 // indirect - golang.org/x/text v0.14.0 // indirect + golang.org/x/crypto v0.23.0 // indirect + golang.org/x/exp v0.0.0-20240416160154-fe59bbe5cc7f // indirect + golang.org/x/net v0.25.0 // indirect + golang.org/x/oauth2 v0.20.0 // indirect + golang.org/x/text v0.15.0 // indirect golang.org/x/time v0.5.0 // indirect - golang.org/x/tools v0.17.0 // indirect - google.golang.org/appengine v1.6.8 // indirect - google.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240314234333-6e1732d8331c // indirect - google.golang.org/grpc v1.62.1 // indirect - google.golang.org/protobuf v1.33.0 // indirect + google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240429193739-8cf5692501f6 // indirect + google.golang.org/grpc v1.63.2 // indirect + google.golang.org/protobuf v1.34.1 // indirect ) go 1.22 diff --git a/go.sum b/go.sum index f60720c5..71d48c6c 100644 --- a/go.sum +++ b/go.sum @@ -1,8 +1,6 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go/compute v1.24.0 h1:phWcR2eWzRJaL/kOiJwfFsPs4BaKq1j6vnpZrc1YlVg= -cloud.google.com/go/compute v1.24.0/go.mod h1:kw1/T+h/+tK2LJK0wiPPx1intgdAM3j/g3hFDlscY40= -cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY= -cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= +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= github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24 h1:bvDV9vkmnHYOMsOr4WLk+Vo07yKIzd94sVoIqshQ4bU= github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24/go.mod h1:8o94RPi1/7XTJvwPpRSzSUedZrtlirdB3r9Z20bi2f8= github.com/AdamKorcz/go-118-fuzz-build v0.0.0-20230306123547-8075edf89bb0 h1:59MxjQVfjXsBpLy+dbd2/ELV5ofnUkUZBvWSC85sheA= @@ -35,14 +33,14 @@ github.com/Azure/go-autorest/logger v0.2.1/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZ github.com/Azure/go-autorest/tracing v0.6.0 h1:TYi4+3m5t6K48TGI9AUdb+IzbnSxvnvUMfuitfgcfuo= github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/BurntSushi/toml v1.3.2 h1:o7IhLm0Msx3BaB+n3Ag7L8EVlByGnpq14C4YWiu/gL8= -github.com/BurntSushi/toml v1.3.2/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= -github.com/GoogleContainerTools/kaniko v1.22.0 h1:WIL8Wuc+lQW8sv1R+zOZsCy4lQtTzrVJ76K2VMkB++0= -github.com/GoogleContainerTools/kaniko v1.22.0/go.mod h1:Kki7uX+HlskobmD7PRrGZvL0S9Aejf8kzfzoQUv68pQ= -github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= -github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= -github.com/Microsoft/hcsshim v0.11.4 h1:68vKo2VN8DE9AdN4tnkWnmdhqdbpUFM8OF3Airm7fz8= -github.com/Microsoft/hcsshim v0.11.4/go.mod h1:smjE4dvqPX9Zldna+t5FG3rnoHhaB7QYxPRqGcpAD9w= +github.com/BurntSushi/toml v1.4.0 h1:kuoIxZQy2WRRk1pttg9asf+WVv6tWQuBNVmK8+nqPr0= +github.com/BurntSushi/toml v1.4.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho= +github.com/GoogleContainerTools/kaniko v1.23.0 h1:/YTWOF3uL40kNyK2821Wc+12Czlon1U+gmISWw9CLTM= +github.com/GoogleContainerTools/kaniko v1.23.0/go.mod h1:lTA7EDyPzSGYxcXxaxWCztINdHMb1Qxj6+eAn1vo2EI= +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.11.5 h1:haEcLNpj9Ka1gd3B3tAEs9CpE0c+1IhoL59w/exYU38= +github.com/Microsoft/hcsshim v0.11.5/go.mod h1:MV8xMfmECjl5HdO7U/3/hFVnkmSBjAjmA09d4bExKcU= github.com/agext/levenshtein v1.2.3 h1:YB2fHEn0UJagG8T1rrWknE3ZQzWM06O8AMAatNn7lmo= github.com/agext/levenshtein v1.2.3/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= @@ -53,38 +51,38 @@ github.com/apex/logs v1.0.0/go.mod h1:XzxuLZ5myVHDy9SAmYpamKKRNApGj54PfYLcFrXqDw github.com/aphistic/golf v0.0.0-20180712155816-02c07f170c5a/go.mod h1:3NqKYiepwy8kCu4PNA+aP7WUV72eXWJeP9/r3/K9aLE= github.com/aphistic/sweet v0.2.0/go.mod h1:fWDlIh/isSE9n6EPsRmC0det+whmX6dJid3stzu0Xys= github.com/aws/aws-sdk-go v1.20.6/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= -github.com/aws/aws-sdk-go-v2 v1.26.0 h1:/Ce4OCiM3EkpW7Y+xUnfAFpchU78K7/Ug01sZni9PgA= -github.com/aws/aws-sdk-go-v2 v1.26.0/go.mod h1:35hUlJVYd+M++iLI3ALmVwMOyRYMmRqUXpTtRGW+K9I= -github.com/aws/aws-sdk-go-v2/config v1.27.7 h1:JSfb5nOQF01iOgxFI5OIKWwDiEXWTyTgg1Mm1mHi0A4= -github.com/aws/aws-sdk-go-v2/config v1.27.7/go.mod h1:PH0/cNpoMO+B04qET699o5W92Ca79fVtbUnvMIZro4I= -github.com/aws/aws-sdk-go-v2/credentials v1.17.7 h1:WJd+ubWKoBeRh7A5iNMnxEOs982SyVKOJD+K8HIezu4= -github.com/aws/aws-sdk-go-v2/credentials v1.17.7/go.mod h1:UQi7LMR0Vhvs+44w5ec8Q+VS+cd10cjwgHwiVkE0YGU= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.15.3 h1:p+y7FvkK2dxS+FEwRIDHDe//ZX+jDhP8HHE50ppj4iI= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.15.3/go.mod h1:/fYB+FZbDlwlAiynK9KDXlzZl3ANI9JkD0Uhz5FjNT4= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.3 h1:ifbIbHZyGl1alsAhPIYsHOg5MuApgqOvVeI8wIugXfs= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.3/go.mod h1:oQZXg3c6SNeY6OZrDY+xHcF4VGIEoNotX2B4PrDeoJI= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.3 h1:Qvodo9gHG9F3E8SfYOspPeBt0bjSbsevK8WhRAUHcoY= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.3/go.mod h1:vCKrdLXtybdf/uQd/YfVR2r5pcbNuEYKzMQpcxmeSJw= +github.com/aws/aws-sdk-go-v2 v1.26.1 h1:5554eUqIYVWpU0YmeeYZ0wU64H2VLBs8TlhRB2L+EkA= +github.com/aws/aws-sdk-go-v2 v1.26.1/go.mod h1:ffIFB97e2yNsv4aTSGkqtHnppsIJzw7G7BReUZ3jCXM= +github.com/aws/aws-sdk-go-v2/config v1.27.13 h1:WbKW8hOzrWoOA/+35S5okqO/2Ap8hkkFUzoW8Hzq24A= +github.com/aws/aws-sdk-go-v2/config v1.27.13/go.mod h1:XLiyiTMnguytjRER7u5RIkhIqS8Nyz41SwAWb4xEjxs= +github.com/aws/aws-sdk-go-v2/credentials v1.17.13 h1:XDCJDzk/u5cN7Aple7D/MiAhx1Rjo/0nueJ0La8mRuE= +github.com/aws/aws-sdk-go-v2/credentials v1.17.13/go.mod h1:FMNcjQrmuBYvOTZDtOLCIu0esmxjF7RuA/89iSXWzQI= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.1 h1:FVJ0r5XTHSmIHJV6KuDmdYhEpvlHpiSd38RQWhut5J4= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.1/go.mod h1:zusuAeqezXzAB24LGuzuekqMAEgWkVYukBec3kr3jUg= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.5 h1:aw39xVGeRWlWx9EzGVnhOR4yOjQDHPQ6o6NmBlscyQg= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.5/go.mod h1:FSaRudD0dXiMPK2UjknVwwTYyZMRsHv3TtkabsZih5I= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.5 h1:PG1F3OD1szkuQPzDw3CIQsRIrtTlUC3lP84taWzHlq0= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.5/go.mod h1:jU1li6RFryMz+so64PpKtudI+QzbKoIEivqdf6LNpOc= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0 h1:hT8rVHwugYE2lEfdFE0QWVo81lF7jMrYJVDWI+f+VxU= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0/go.mod h1:8tu/lYfQfFe6IGnaOdrpVgEL2IrrDOf6/m9RQum4NkY= -github.com/aws/aws-sdk-go-v2/service/ecr v1.24.5 h1:wLPDAUFT50NEXGXpywRU3AA74pg35RJjWol/68ruvQQ= -github.com/aws/aws-sdk-go-v2/service/ecr v1.24.5/go.mod h1:AOHmGMoPtSY9Zm2zBuwUJQBisIvYAZeA1n7b6f4e880= -github.com/aws/aws-sdk-go-v2/service/ecrpublic v1.21.5 h1:PQp21GBlGNaQ+AVJAB8w2KTmLx0DkFS2fDET2Iy3+f0= -github.com/aws/aws-sdk-go-v2/service/ecrpublic v1.21.5/go.mod h1:WMntdAol8KgeYsa5sDZPsRTXs4jVZIMYu0eQVVIQxnc= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.1 h1:EyBZibRTVAs6ECHZOw5/wlylS9OcTzwyjeQMudmREjE= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.1/go.mod h1:JKpmtYhhPs7D97NL/ltqz7yCkERFW5dOlHyVl66ZYF8= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.5 h1:K/NXvIftOlX+oGgWGIa3jDyYLDNsdVhsjHmsBH2GLAQ= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.5/go.mod h1:cl9HGLV66EnCmMNzq4sYOti+/xo8w34CsgzVtm2GgsY= -github.com/aws/aws-sdk-go-v2/service/sso v1.20.2 h1:XOPfar83RIRPEzfihnp+U6udOveKZJvPQ76SKWrLRHc= -github.com/aws/aws-sdk-go-v2/service/sso v1.20.2/go.mod h1:Vv9Xyk1KMHXrR3vNQe8W5LMFdTjSeWk0gBZBzvf3Qa0= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.23.2 h1:pi0Skl6mNl2w8qWZXcdOyg197Zsf4G97U7Sso9JXGZE= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.23.2/go.mod h1:JYzLoEVeLXk+L4tn1+rrkfhkxl6mLDEVaDSvGq9og90= -github.com/aws/aws-sdk-go-v2/service/sts v1.28.4 h1:Ppup1nVNAOWbBOrcoOxaxPeEnSFB2RnnQdguhXpmeQk= -github.com/aws/aws-sdk-go-v2/service/sts v1.28.4/go.mod h1:+K1rNPVyGxkRuv9NNiaZ4YhBFuyw2MMA9SlIJ1Zlpz8= -github.com/aws/smithy-go v1.20.1 h1:4SZlSlMr36UEqC7XOyRVb27XMeZubNcBNN+9IgEPIQw= -github.com/aws/smithy-go v1.20.1/go.mod h1:krry+ya/rV9RDcV/Q16kpu6ypI4K2czasz0NC3qS14E= -github.com/awslabs/amazon-ecr-credential-helper/ecr-login v0.0.0-20231213181459-b0fcec718dc6 h1:PlJRmqKlSlEUlwem1c3zdPaEMtJc/ktnV7naD5Qvsx4= -github.com/awslabs/amazon-ecr-credential-helper/ecr-login v0.0.0-20231213181459-b0fcec718dc6/go.mod h1:08sPJIlDHu4HwQ1xScPgsBWezvM6U10ghGKBJu0mowA= +github.com/aws/aws-sdk-go-v2/service/ecr v1.27.4 h1:Qr9W21mzWT3RhfYn9iAux7CeRIdbnTAqmiOlASqQgZI= +github.com/aws/aws-sdk-go-v2/service/ecr v1.27.4/go.mod h1:if7ybzzjOmDB8pat9FE35AHTY6ZxlYSy3YviSmFZv8c= +github.com/aws/aws-sdk-go-v2/service/ecrpublic v1.23.4 h1:aNuiieMaS2IHxqAsTdM/pjHyY1aoaDLBGLqpNnFMMqk= +github.com/aws/aws-sdk-go-v2/service/ecrpublic v1.23.4/go.mod h1:8pvvNAklmq+hKmqyvFoMRg0bwg9sdGOvdwximmKiKP0= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.2 h1:Ji0DY1xUsUr3I8cHps0G+XM3WWU16lP6yG8qu1GAZAs= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.2/go.mod h1:5CsjAbs3NlGQyZNFACh+zztPDI7fU6eW9QsxjfnuBKg= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.7 h1:ogRAwT1/gxJBcSWDMZlgyFUM962F51A5CRhDLbxLdmo= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.7/go.mod h1:YCsIZhXfRPLFFCl5xxY+1T9RKzOKjCut+28JSX2DnAk= +github.com/aws/aws-sdk-go-v2/service/sso v1.20.6 h1:o5cTaeunSpfXiLTIBx5xo2enQmiChtu1IBbzXnfU9Hs= +github.com/aws/aws-sdk-go-v2/service/sso v1.20.6/go.mod h1:qGzynb/msuZIE8I75DVRCUXw3o3ZyBmUvMwQ2t/BrGM= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.24.0 h1:Qe0r0lVURDDeBQJ4yP+BOrJkvkiCo/3FH/t+wY11dmw= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.24.0/go.mod h1:mUYPBhaF2lGiukDEjJX2BLRRKTmoUSitGDUgM4tRxak= +github.com/aws/aws-sdk-go-v2/service/sts v1.28.7 h1:et3Ta53gotFR4ERLXXHIHl/Uuk1qYpP5uU7cvNql8ns= +github.com/aws/aws-sdk-go-v2/service/sts v1.28.7/go.mod h1:FZf1/nKNEkHdGGJP/cI2MoIMquumuRK6ol3QQJNDxmw= +github.com/aws/smithy-go v1.20.2 h1:tbp628ireGtzcHDDmLT/6ADHidqnwgF57XOXZe6tp4Q= +github.com/aws/smithy-go v1.20.2/go.mod h1:krry+ya/rV9RDcV/Q16kpu6ypI4K2czasz0NC3qS14E= +github.com/awslabs/amazon-ecr-credential-helper/ecr-login v0.0.0-20240419161514-af205d85bb44 h1:oNDkocd5/+6jUuxyz07jQWnKhgpNtKQoZSXKMb7emqQ= +github.com/awslabs/amazon-ecr-credential-helper/ecr-login v0.0.0-20240419161514-af205d85bb44/go.mod h1:2nlYPkG0rFrODp6R875pk/kOnB8Ivj3+onhzk2mO57g= github.com/aybabtme/rgbterm v0.0.0-20170906152045-cc83f3b3ce59/go.mod h1:q/89r3U2H7sSsE2t6Kca0lfwTK8JdoNGS/yzM/4iH5I= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= @@ -107,8 +105,8 @@ github.com/containerd/cgroups v1.1.0 h1:v8rEWFl6EoqHB+swVNjVoCJE8o3jX7e8nqBGPLaD github.com/containerd/cgroups v1.1.0/go.mod h1:6ppBcbh/NOOUU+dMKrykgaBnK9lCIBxHqJDGwsa1mIw= github.com/containerd/cgroups/v3 v3.0.2 h1:f5WFqIVSgo5IZmtTT3qVBo6TzI1ON6sycSBKkymb9L0= github.com/containerd/cgroups/v3 v3.0.2/go.mod h1:JUgITrzdFqp42uI2ryGA+ge0ap/nxzYgkGmIcetmErE= -github.com/containerd/containerd v1.7.16 h1:7Zsfe8Fkj4Wi2My6DXGQ87hiqIrmOXolm72ZEkFU5Mg= -github.com/containerd/containerd v1.7.16/go.mod h1:NL49g7A/Fui7ccmxV6zkBWwqMgmMxFWzujYCc+JLt7k= +github.com/containerd/containerd v1.7.17 h1:KjNnn0+tAVQHAoaWRjmdak9WlvnFR/8rU1CHHy8Rm2A= +github.com/containerd/containerd v1.7.17/go.mod h1:vK+hhT4TIv2uejlcDlbVIc8+h/BqtKLIyNrtCZol8lI= github.com/containerd/continuity v0.4.3 h1:6HVkalIp+2u1ZLH1J/pYX2oBVXlJZvh1X1A7bEZ9Su8= github.com/containerd/continuity v0.4.3/go.mod h1:F6PTNCKepoxEaXLQp3wDAjygEnImnZ/7o4JzpodfroQ= github.com/containerd/fifo v1.1.0 h1:4I2mbh5stb1u6ycIABlBw9zgtlK8viPI9QkQNRQEEmY= @@ -117,8 +115,8 @@ github.com/containerd/log v0.1.0 h1:TCJt7ioM2cr/tfR8GPbGf9/VRAX8D2B4PjzCpfX540I= github.com/containerd/log v0.1.0/go.mod h1:VRRf09a7mHDIRezVKTRCrOq78v577GXq3bSa3EhrzVo= 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.3 h1:4jlhbXIGvijRtNC8F/5CpuJZ7yKOBFGFOOXg1bkISz0= -github.com/containerd/ttrpc v1.2.3/go.mod h1:ieWsXucbb8Mj9PH0rXCw1i8IunRbbAiDkpXkbfflWBM= +github.com/containerd/ttrpc v1.2.4 h1:eQCQK4h9dxDmpOb9QOOMh2NHTfzroH1IkmHiKZi05Oo= +github.com/containerd/ttrpc v1.2.4/go.mod h1:ojvb8SJBSch0XkqNO0L0YX/5NxR3UnVk2LzFKBK0upc= 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/coreos/go-systemd/v22 v22.5.0 h1:RrqgGjYQKalulkV8NGVIfkXQf6YYmOyiJKk8iXXhfZs= @@ -132,14 +130,14 @@ github.com/dimchansky/utfbom v1.1.1 h1:vV6w1AhK4VMnhBno/TPVCoK9U/LP0PkLCS9tbxHdi github.com/dimchansky/utfbom v1.1.1/go.mod h1:SxdoEBH5qIqFocHMyGOXVAybYJdr71b1Q/j0mACtrfE= 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/docker/cli v25.0.3+incompatible h1:KLeNs7zws74oFuVhgZQ5ONGZiXUUdgsdy6/EsX/6284= -github.com/docker/cli v25.0.3+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= +github.com/docker/cli v26.1.0+incompatible h1:+nwRy8Ocd8cYNQ60mozDDICICD8aoFGtlPXifX/UQ3Y= +github.com/docker/cli v26.1.0+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= github.com/docker/distribution v2.8.3+incompatible h1:AtKxIZ36LoNK51+Z6RpzLpddBirtxJnzDrHLEKxTAYk= github.com/docker/distribution v2.8.3+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/docker v26.1.1+incompatible h1:oI+4kkAgIwwb54b9OC7Xc3hSgu1RlJA/Lln/DF72djQ= -github.com/docker/docker v26.1.1+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= -github.com/docker/docker-credential-helpers v0.8.0 h1:YQFtbBQb4VrpoPxhFuzEBPQ9E16qz5SpHLS+uswaCp8= -github.com/docker/docker-credential-helpers v0.8.0/go.mod h1:UGFXcuoQ5TxPiB54nHOZ32AWRqQdECoh/Mg0AlEYb40= +github.com/docker/docker v26.1.2+incompatible h1:UVX5ZOrrfTGZZYEP+ZDq3Xn9PdHNXaSYMFPDumMqG2k= +github.com/docker/docker v26.1.2+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker-credential-helpers v0.8.1 h1:j/eKUktUltBtMzKqmfLB0PAgqYyMHOp5vfsD1807oKo= +github.com/docker/docker-credential-helpers v0.8.1/go.mod h1:P3ci7E3lwkZg6XiHdRKft1KckHiO9a2rNtyFbZ/ry9M= github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c= github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6GLaXnqyDdmEXc= github.com/docker/go-events v0.0.0-20190806004212-e31b211e4f1c h1:+pKlWGMw7gf6bQ+oDZB4KHQFypsfjYlq/C4rfL7D3g8= @@ -199,7 +197,6 @@ github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvq github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= @@ -311,8 +308,8 @@ github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+W github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= -github.com/opencontainers/image-spec v1.1.0-rc5 h1:Ygwkfw9bpDvs+c9E34SdgGOj41dX/cbdlwvlWt0pnFI= -github.com/opencontainers/image-spec v1.1.0-rc5/go.mod h1:X4pATf0uXsnn3g5aiGIsVnJBR4mxhKzfwmvK/B2NTm8= +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/runtime-spec v1.1.0 h1:HHUyrt9mwHUjtasSbXSMvs4cyFxh+Bll4AjJ9odEGpg= github.com/opencontainers/runtime-spec v1.1.0/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= github.com/opencontainers/selinux v1.11.0 h1:+5Zbo97w3Lbmb3PeqQtpmTkMwsW5nRI3YaLpt7tQ7oU= @@ -418,11 +415,11 @@ golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5y golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= -golang.org/x/crypto v0.21.0 h1:X31++rzVUdKhX5sWmSOFZxx8UW/ldWx55cbf08iNAMA= -golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs= +golang.org/x/crypto v0.23.0 h1:dIJU/v2J8Mdglj/8rJ6UUOM3Zc9zLZxVZwwxMooUSAI= +golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20231219160207-73b9e39aefca h1:+xQfFu/HO/82Wwg4zuJ5xiLp0yaOLJjBGnuafXp85YQ= -golang.org/x/exp v0.0.0-20231219160207-73b9e39aefca/go.mod h1:iRJReGqOEeBhDZGkGbynYwcHlctCvnjTYIamk7uXpHI= +golang.org/x/exp v0.0.0-20240416160154-fe59bbe5cc7f h1:99ci1mjWVBWwJiEKYY6jWa4d2nTQVIEhZIptnrVb1XY= +golang.org/x/exp v0.0.0-20240416160154-fe59bbe5cc7f/go.mod h1:/lliqkxwWAhPjf5oSOIJup2XcqJaw8RGS6k3TGEc7GI= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= @@ -430,8 +427,8 @@ 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.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/mod v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0= -golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA= +golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= 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= @@ -449,11 +446,11 @@ golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96b golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= -golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= +golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac= +golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.18.0 h1:09qnuIAgzdx1XplqJvW6CQqMCtGZykZWcXzPMPUusvI= -golang.org/x/oauth2 v0.18.0/go.mod h1:Wf7knwG0MPoWIMMBgFlEaSUDaKskp0dCfrlJRJXbBi8= +golang.org/x/oauth2 v0.20.0 h1:4mQdhULixXKP1rwYBW0vAijoXnkTG0BLCDRzfe1idMo= +golang.org/x/oauth2 v0.20.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -497,10 +494,9 @@ golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= -golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk= +golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -513,32 +509,30 @@ golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roY 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.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.17.0 h1:FvmRgNOcs3kOa+T20R1uhfP9F6HgG2mfxDv1vrx1Htc= -golang.org/x/tools v0.17.0/go.mod h1:xsh6VxdV005rRVaS6SSAf9oiAqljS7UZUacMZ8Bnsps= +golang.org/x/tools v0.20.0 h1:hz/CVckiOxybQvFw6h7b/q80NTr9IUQb4s1IIzW7KNY= +golang.org/x/tools v0.20.0/go.mod h1:WvitBU7JJf6A4jOdg4S1tviW9bhUxkgeCui/0JHctQg= 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= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= -google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9 h1:9+tzLLstTlPTRyJTh+ah5wIMsBW5c4tQwGTN3thOW9Y= -google.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9/go.mod h1:mqHbVIp48Muh7Ywss/AD6I5kNVKZMmAa/QEW58Gxp2s= -google.golang.org/genproto/googleapis/api v0.0.0-20240311132316-a219d84964c2 h1:rIo7ocm2roD9DcFIX67Ym8icoGCKSARAiPljFhh5suQ= -google.golang.org/genproto/googleapis/api v0.0.0-20240311132316-a219d84964c2/go.mod h1:O1cOfN1Cy6QEYr7VxtjOyP5AdAuR0aJ/MYZaaof623Y= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240314234333-6e1732d8331c h1:lfpJ/2rWPa/kJgxyyXM8PrNnfCzcmxJ265mADgwmvLI= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240314234333-6e1732d8331c/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= +google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de h1:F6qOa9AZTYJXOUEr4jDysRDLrm4PHePlge4v4TGAlxY= +google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:VUhTRKeHn9wwcdrk73nvdC9gF178Tzhmt/qyaFcPLSo= +google.golang.org/genproto/googleapis/api v0.0.0-20240415180920-8c6c420018be h1:Zz7rLWqp0ApfsR/l7+zSHhY3PMiH2xqgxlfYfAfNpoU= +google.golang.org/genproto/googleapis/api v0.0.0-20240415180920-8c6c420018be/go.mod h1:dvdCTIoAGbkWbcIKBniID56/7XHTt6WfxXNMxuziJ+w= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240429193739-8cf5692501f6 h1:DujSIu+2tC9Ht0aPNA7jgj23Iq8Ewi5sgkQ++wdvonE= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240429193739-8cf5692501f6/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= -google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= +google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= +google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= 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= @@ -549,10 +543,9 @@ google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2 google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= -google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= +google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= From a02be035c8a9bb5f2fe0336fe0c1e366a58e4153 Mon Sep 17 00:00:00 2001 From: Pavel Busko Date: Wed, 3 Jul 2024 16:01:21 +0200 Subject: [PATCH 13/18] Ensure read access to the run image selected by extensions (#1364) * Ensure read access to the run image selected by extensions Co-authored-by: Nicolas Bender Signed-off-by: Pavel Busko Co-authored-by: Pavel Busko * move read access check to the restorer cmd Signed-off-by: Pavel Busko * guard behind platform version check Signed-off-by: Pavel Busko --------- Signed-off-by: Pavel Busko Co-authored-by: Nicolas Bender --- cmd/lifecycle/restorer.go | 29 +++++++++++++++++++++++++++++ platform/files/run.go | 11 +++++++++++ 2 files changed, 40 insertions(+) diff --git a/cmd/lifecycle/restorer.go b/cmd/lifecycle/restorer.go index dc2bfc65..0cc2eb29 100644 --- a/cmd/lifecycle/restorer.go +++ b/cmd/lifecycle/restorer.go @@ -50,6 +50,9 @@ func (r *restoreCmd) DefineFlags() { cli.FlagBuildImage(&r.BuildImageRef) } cli.FlagAnalyzedPath(&r.AnalyzedPath) + if r.PlatformAPI.AtLeast("0.14") { + cli.FlagRunPath(&r.RunPath) + } cli.FlagCacheDir(&r.CacheDir) cli.FlagCacheImage(&r.CacheImageRef) cli.FlagGID(&r.GID) @@ -123,6 +126,15 @@ func (r *restoreCmd) Exec() error { runImage imgutil.Image ) runImageName := analyzedMD.RunImageImage() // FIXME: if we have a digest reference available in `Reference` (e.g., in the non-daemon case) we should use it + accessibleRunImage, err := r.runImageAccessCheck(runImageName) + if err != nil { + return err + } + if runImageName != accessibleRunImage { + analyzedMD.RunImage.Image = accessibleRunImage + analyzedMD.RunImage.Reference = accessibleRunImage + } + if r.supportsRunImageExtension() && needsPulling(analyzedMD.RunImage) { cmd.DefaultLogger.Debugf("Pulling run image metadata for %s...", runImageName) runImage, err = r.pullSparse(runImageName) @@ -192,6 +204,23 @@ func needsPulling(runImage *files.RunImage) bool { return runImage.Extend } +func (r *restoreCmd) runImageAccessCheck(runImageName string) (string, error) { + if r.PlatformAPI.LessThan("0.14") { + return runImageName, nil + } + + runToml, err := files.Handler.ReadRun(r.RunPath, cmd.DefaultLogger) + if err != nil { + return "", err + } + + if !runToml.Contains(runImageName) { + return runImageName, nil + } + + return platform.BestRunImageMirrorFor("", runToml.FindByRef(runImageName), r.AccessChecker()) +} + func (r *restoreCmd) needsUpdating(runImage *files.RunImage, group buildpack.Group) bool { if r.PlatformAPI.LessThan("0.10") { return false diff --git a/platform/files/run.go b/platform/files/run.go index 00fbe038..310448b8 100644 --- a/platform/files/run.go +++ b/platform/files/run.go @@ -19,3 +19,14 @@ func (r *Run) Contains(providedImage string) bool { } return false } + +// FindByRef return the RunImageForExport struct which contains the imageRef. +func (r *Run) FindByRef(imageRef string) RunImageForExport { + for _, i := range r.Images { + if i.Contains(imageRef) { + return i + } + } + + return RunImageForExport{} +} From f2a3bd78a819d433eeee7561ec81c02e840db476 Mon Sep 17 00:00:00 2001 From: Pavel Busko Date: Wed, 3 Jul 2024 16:04:57 +0200 Subject: [PATCH 14/18] Restore cached launch layers not found in `appLayers` (#1346) * Restore cached launch layers not found in appLayers Co-authored-by: Ralf Pannemans Signed-off-by: Pavel Busko * add platform api guard Signed-off-by: Pavel Busko --------- Signed-off-by: Pavel Busko Co-authored-by: Ralf Pannemans --- api/apis.go | 2 +- cmd/lifecycle/restorer.go | 2 +- internal/layer/metadata_restorer.go | 26 ++++++++----- internal/layer/metadata_restorer_test.go | 41 ++++++++++++++++----- internal/layer/testdata/cache_metadata.json | 2 +- phase/restorer.go | 2 +- phase/restorer_test.go | 2 +- 7 files changed, 52 insertions(+), 25 deletions(-) diff --git a/api/apis.go b/api/apis.go index e46a0470..821df457 100644 --- a/api/apis.go +++ b/api/apis.go @@ -11,7 +11,7 @@ var ( // Platform is a pair of lists of Platform API versions: // 1. All supported versions (including deprecated versions) // 2. The versions that are deprecated - Platform = newApisMustParse([]string{"0.7", "0.8", "0.9", "0.10", "0.11", "0.12", "0.13"}, []string{}) + Platform = newApisMustParse([]string{"0.7", "0.8", "0.9", "0.10", "0.11", "0.12", "0.13", "0.14"}, []string{}) // Buildpack is a pair of lists of Buildpack API versions: // 1. All supported versions (including deprecated versions) // 2. The versions that are deprecated diff --git a/cmd/lifecycle/restorer.go b/cmd/lifecycle/restorer.go index 0cc2eb29..e0798dbf 100644 --- a/cmd/lifecycle/restorer.go +++ b/cmd/lifecycle/restorer.go @@ -305,7 +305,7 @@ func (r *restoreCmd) restore(layerMetadata files.LayersMetadata, group buildpack Buildpacks: group.Group, Logger: cmd.DefaultLogger, PlatformAPI: r.PlatformAPI, - LayerMetadataRestorer: layer.NewDefaultMetadataRestorer(r.LayersDir, r.SkipLayers, cmd.DefaultLogger), + LayerMetadataRestorer: layer.NewDefaultMetadataRestorer(r.LayersDir, r.SkipLayers, cmd.DefaultLogger, r.PlatformAPI), LayersMetadata: layerMetadata, SBOMRestorer: layer.NewSBOMRestorer(layer.SBOMRestorerOpts{ LayersDir: r.LayersDir, diff --git a/internal/layer/metadata_restorer.go b/internal/layer/metadata_restorer.go index f33e0e17..6660e7a0 100644 --- a/internal/layer/metadata_restorer.go +++ b/internal/layer/metadata_restorer.go @@ -6,6 +6,7 @@ import ( "github.com/pkg/errors" + "github.com/buildpacks/lifecycle/api" "github.com/buildpacks/lifecycle/buildpack" "github.com/buildpacks/lifecycle/internal/encoding" "github.com/buildpacks/lifecycle/launch" @@ -24,18 +25,21 @@ type MetadataRestorer interface { Restore(buildpacks []buildpack.GroupElement, appMeta files.LayersMetadata, cacheMeta platform.CacheMetadata, layerSHAStore SHAStore) error } -func NewDefaultMetadataRestorer(layersDir string, skipLayers bool, logger log.Logger) *DefaultMetadataRestorer { +// NewDefaultMetadataRestorer returns an instance of the DefaultMetadataRestorer struct +func NewDefaultMetadataRestorer(layersDir string, skipLayers bool, logger log.Logger, platformAPI *api.Version) *DefaultMetadataRestorer { return &DefaultMetadataRestorer{ - Logger: logger, - LayersDir: layersDir, - SkipLayers: skipLayers, + Logger: logger, + LayersDir: layersDir, + SkipLayers: skipLayers, + PlatformAPI: platformAPI, } } type DefaultMetadataRestorer struct { - LayersDir string - SkipLayers bool - Logger log.Logger + LayersDir string + SkipLayers bool + Logger log.Logger + PlatformAPI *api.Version } func (r *DefaultMetadataRestorer) Restore(buildpacks []buildpack.GroupElement, appMeta files.LayersMetadata, cacheMeta platform.CacheMetadata, layerSHAStore SHAStore) error { @@ -113,10 +117,12 @@ func (r *DefaultMetadataRestorer) restoreLayerMetadata(layerSHAStore SHAStore, a r.Logger.Debugf("Not restoring %q from cache, marked as cache=false", identifier) continue } - // If launch=true, the metadata was restored from the app image or the layer is stale. + // If launch=true, the metadata was restored from the appLayers if present. if layer.Launch { - r.Logger.Debugf("Not restoring %q from cache, marked as launch=true", identifier) - continue + if _, ok := appLayers[layerName]; ok || r.PlatformAPI.LessThan("0.14") { + r.Logger.Debugf("Not restoring %q from cache, marked as launch=true", identifier) + continue + } } r.Logger.Infof("Restoring metadata for %q from cache", identifier) if err := r.writeLayerMetadata(layerSHAStore, buildpackDir, layerName, layer, bp.ID); err != nil { diff --git a/internal/layer/metadata_restorer_test.go b/internal/layer/metadata_restorer_test.go index aec91d37..d1aec921 100644 --- a/internal/layer/metadata_restorer_test.go +++ b/internal/layer/metadata_restorer_test.go @@ -42,7 +42,7 @@ func testLayerMetadataRestorer(t *testing.T, when spec.G, it spec.S) { layerDir, err = os.MkdirTemp("", "lifecycle-layer-dir") h.AssertNil(t, err) logger = log.Logger{Handler: &discard.Handler{}} - layerMetadataRestorer = layer.NewDefaultMetadataRestorer(layerDir, skipLayers, &logger) + layerMetadataRestorer = layer.NewDefaultMetadataRestorer(layerDir, skipLayers, &logger, api.Platform.Latest()) layerSHAStore = layer.NewSHAStore() }) @@ -136,6 +136,8 @@ func testLayerMetadataRestorer(t *testing.T, when spec.G, it spec.S) { {"no.cache.buildpack/some-layer.toml", "[metadata]\n some-layer-key = \"some-layer-value\""}, // Cache-image-only layers. {"metadata.buildpack/cache.toml", "[metadata]\n cache-key = \"cache-value\""}, + // Cached launch layers not in app + {"metadata.buildpack/launch-cache-not-in-app.toml", "[metadata]\n cache-only-key = \"cache-only-value\"\n launch-cache-key = \"cache-specific-value\""}, } { got := h.MustReadFile(t, filepath.Join(layerDir, data.name)) h.AssertStringContains(t, string(got), data.want) @@ -143,6 +145,33 @@ func testLayerMetadataRestorer(t *testing.T, when spec.G, it spec.S) { } }) + when("platformAPI is less than 0.14", func() { + it.Before(func() { + layerMetadataRestorer = layer.NewDefaultMetadataRestorer(layerDir, skipLayers, &logger, api.MustParse("0.13")) + }) + + it("ignores launch-cache-not-in-app", func() { + err := layerMetadataRestorer.Restore(buildpacks, layersMetadata, cacheMetadata, layerSHAStore) + h.AssertNil(t, err) + + h.AssertPathDoesNotExist(t, filepath.Join(layerDir, "metadata.buildpack/launch-cache-not-in-app.toml")) + unsetFlags := "[types]" + for _, data := range []struct{ name, want string }{ + // App layers. + {"metadata.buildpack/launch.toml", "[metadata]\n launch-key = \"launch-value\""}, + {"metadata.buildpack/launch-build-cache.toml", "[metadata]\n launch-build-cache-key = \"launch-build-cache-value\""}, + {"metadata.buildpack/launch-cache.toml", "[metadata]\n launch-cache-key = \"launch-cache-value\""}, + {"no.cache.buildpack/some-layer.toml", "[metadata]\n some-layer-key = \"some-layer-value\""}, + // Cache-image-only layers. + {"metadata.buildpack/cache.toml", "[metadata]\n cache-key = \"cache-value\""}, + } { + got := h.MustReadFile(t, filepath.Join(layerDir, data.name)) + h.AssertStringContains(t, string(got), data.want) + h.AssertStringDoesNotContain(t, string(got), unsetFlags) // The [types] table shouldn't exist. The build, cache and launch flags are set to false. + } + }) + }) + it("restores layer metadata without the launch, build and cache flags", func() { buildpacks = []buildpack.GroupElement{ {ID: "metadata.buildpack", API: api.Buildpack.Latest().String()}, @@ -186,14 +215,6 @@ func testLayerMetadataRestorer(t *testing.T, when spec.G, it spec.S) { h.AssertPathDoesNotExist(t, filepath.Join(layerDir, "no.group.buildpack")) }) - it("does not restore launch=true layer metadata", func() { - err := layerMetadataRestorer.Restore(buildpacks, layersMetadata, cacheMetadata, layerSHAStore) - h.AssertNil(t, err) - - h.AssertPathDoesNotExist(t, filepath.Join(layerDir, "metadata.buildpack", "launch-cache-not-in-app.toml")) - h.AssertPathDoesNotExist(t, filepath.Join(layerDir, "metadata.buildpack", "launch-cache-not-in-app.sha")) - }) - it("does not restore cache=false layer metadata", func() { err := layerMetadataRestorer.Restore(buildpacks, layersMetadata, cacheMetadata, layerSHAStore) h.AssertNil(t, err) @@ -299,7 +320,7 @@ func testLayerMetadataRestorer(t *testing.T, when spec.G, it spec.S) { when("skip layers is true", func() { it.Before(func() { skipLayers = true - layerMetadataRestorer = layer.NewDefaultMetadataRestorer(layerDir, skipLayers, &logger) + layerMetadataRestorer = layer.NewDefaultMetadataRestorer(layerDir, skipLayers, &logger, api.Platform.Latest()) }) it("does not write buildpack layer metadata", func() { diff --git a/internal/layer/testdata/cache_metadata.json b/internal/layer/testdata/cache_metadata.json index cc982aa9..a60ee35a 100644 --- a/internal/layer/testdata/cache_metadata.json +++ b/internal/layer/testdata/cache_metadata.json @@ -36,7 +36,7 @@ "launch": true, "sha": "launch-cache-old-sha" }, - "launch-cache-not-in-app": { + "launch-cache-not-in-app": { "cache": true, "data": { "launch-cache-key": "cache-specific-value", diff --git a/phase/restorer.go b/phase/restorer.go index 48b6da59..e6e6ee6f 100644 --- a/phase/restorer.go +++ b/phase/restorer.go @@ -36,7 +36,7 @@ func (r *Restorer) Restore(cache Cache) error { } if r.LayerMetadataRestorer == nil { - r.LayerMetadataRestorer = layer.NewDefaultMetadataRestorer(r.LayersDir, false, r.Logger) + r.LayerMetadataRestorer = layer.NewDefaultMetadataRestorer(r.LayersDir, false, r.Logger, r.PlatformAPI) } if r.SBOMRestorer == nil { diff --git a/phase/restorer_test.go b/phase/restorer_test.go index 61066c88..94b3e165 100644 --- a/phase/restorer_test.go +++ b/phase/restorer_test.go @@ -81,7 +81,7 @@ func testRestorer(buildpackAPI, platformAPI string) func(t *testing.T, when spec {ID: "buildpack.id", API: buildpackAPI}, {ID: "escaped/buildpack/id", API: buildpackAPI}, }, - LayerMetadataRestorer: layer.NewDefaultMetadataRestorer(layersDir, skipLayers, &logger), + LayerMetadataRestorer: layer.NewDefaultMetadataRestorer(layersDir, skipLayers, &logger, api.Platform.Latest()), SBOMRestorer: sbomRestorer, PlatformAPI: api.MustParse(platformAPI), } From 04f1ad1d033dce4729f734c18e40818a02188077 Mon Sep 17 00:00:00 2001 From: Natalie Arellano Date: Tue, 9 Jul 2024 13:12:47 -0400 Subject: [PATCH 15/18] Fix CNB_TARGET_* env vars on older Platform API (#1374) * Target data: populate os/arch as well as distro information Fixes https://github.com/buildpacks/lifecycle/issues/1371 Signed-off-by: Natalie Arellano * Only os and arch are truly required Signed-off-by: Natalie Arellano * Fix one more unit Signed-off-by: Natalie Arellano * Fix even more units Signed-off-by: Natalie Arellano --------- Signed-off-by: Natalie Arellano --- phase/builder_test.go | 2 -- phase/detector_test.go | 1 - phase/generator_test.go | 2 -- platform/target_data.go | 28 +++++++++++++++++++++++----- platform/target_data_test.go | 31 +++++++++++++++++++++++++------ 5 files changed, 48 insertions(+), 16 deletions(-) diff --git a/phase/builder_test.go b/phase/builder_test.go index e4f4fa1e..3a197cce 100644 --- a/phase/builder_test.go +++ b/phase/builder_test.go @@ -189,7 +189,6 @@ func testBuilder(t *testing.T, when spec.G, it spec.S) { executor.EXPECT().Build(*bpA, gomock.Any(), gomock.Any()).DoAndReturn( func(_ buildpack.BpDescriptor, inputs buildpack.BuildInputs, logger llog.Logger) (buildpack.BuildOutputs, error) { h.AssertContains(t, inputs.TargetEnv, "CNB_TARGET_ARCH=amd64") - h.AssertContains(t, inputs.TargetEnv, "CNB_TARGET_ARCH_VARIANT=") h.AssertContains(t, inputs.TargetEnv, "CNB_TARGET_OS=linux") return buildpack.BuildOutputs{}, nil }, @@ -201,7 +200,6 @@ func testBuilder(t *testing.T, when spec.G, it spec.S) { executor.EXPECT().Build(*bpB, gomock.Any(), gomock.Any()).Do( func(_ buildpack.BpDescriptor, inputs buildpack.BuildInputs, _ llog.Logger) (buildpack.BuildOutputs, error) { h.AssertContains(t, inputs.TargetEnv, "CNB_TARGET_ARCH=amd64") - h.AssertContains(t, inputs.TargetEnv, "CNB_TARGET_ARCH_VARIANT=") h.AssertContains(t, inputs.TargetEnv, "CNB_TARGET_OS=linux") return buildpack.BuildOutputs{}, nil }) diff --git a/phase/detector_test.go b/phase/detector_test.go index 1c0e3be0..ff429cd5 100644 --- a/phase/detector_test.go +++ b/phase/detector_test.go @@ -221,7 +221,6 @@ func testDetector(t *testing.T, when spec.G, it spec.S) { executor.EXPECT().Detect(bpA1, gomock.Any(), gomock.Any()).Do( func(_ buildpack.Descriptor, inputs buildpack.DetectInputs, _ log.Logger) buildpack.DetectOutputs { h.AssertContains(t, inputs.TargetEnv, "CNB_TARGET_ARCH=amd64") - h.AssertContains(t, inputs.TargetEnv, "CNB_TARGET_ARCH_VARIANT=") h.AssertContains(t, inputs.TargetEnv, "CNB_TARGET_OS=linux") return buildpack.DetectOutputs{} }) diff --git a/phase/generator_test.go b/phase/generator_test.go index aefc13e1..df7ecb98 100644 --- a/phase/generator_test.go +++ b/phase/generator_test.go @@ -283,7 +283,6 @@ func testGenerator(t *testing.T, when spec.G, it spec.S) { func(d buildpack.ExtDescriptor, inputs buildpack.GenerateInputs, _ *log.Logger) (buildpack.GenerateOutputs, error) { h.AssertContains(t, inputs.TargetEnv, "CNB_TARGET_ARCH=amd64", - "CNB_TARGET_ARCH_VARIANT=", "CNB_TARGET_OS=linux", ) return buildpack.GenerateOutputs{Dockerfiles: []buildpack.DockerfileInfo{{ExtensionID: d.Extension.ID, @@ -293,7 +292,6 @@ func testGenerator(t *testing.T, when spec.G, it spec.S) { func(d buildpack.ExtDescriptor, inputs buildpack.GenerateInputs, _ *log.Logger) (buildpack.GenerateOutputs, error) { h.AssertContains(t, inputs.TargetEnv, "CNB_TARGET_ARCH=amd64", - "CNB_TARGET_ARCH_VARIANT=", "CNB_TARGET_OS=linux", ) return buildpack.GenerateOutputs{Dockerfiles: []buildpack.DockerfileInfo{{ExtensionID: d.Extension.ID, diff --git a/platform/target_data.go b/platform/target_data.go index b77ce477..85c32f68 100644 --- a/platform/target_data.go +++ b/platform/target_data.go @@ -1,6 +1,9 @@ package platform import ( + "fmt" + "runtime" + "github.com/buildpacks/imgutil" "github.com/buildpacks/lifecycle/buildpack" @@ -87,10 +90,16 @@ func matches(target1, target2 string) bool { return target1 == target2 } -// GetTargetOSFromFileSystem populates the target metadata you pass in if the information is available -// returns a boolean indicating whether it populated any data. +// GetTargetOSFromFileSystem populates the provided target metadata with information from /etc/os-release +// if it is available. func GetTargetOSFromFileSystem(d fsutil.Detector, tm *files.TargetMetadata, logger log.Logger) { if d.HasSystemdFile() { + if tm.OS == "" { + tm.OS = "linux" + } + if tm.Arch == "" { + tm.Arch = runtime.GOARCH // in a future world where we support cross platform builds, this should be removed + } contents, err := d.ReadSystemdFile() if err != nil { logger.Warnf("Encountered error trying to read /etc/os-release file: %s", err.Error()) @@ -112,21 +121,30 @@ func EnvVarsFor(d fsutil.Detector, tm files.TargetMetadata, logger log.Logger) [ logger.Info("target distro name/version labels not found, reading /etc/os-release file") GetTargetOSFromFileSystem(d, &tm, logger) } + // required ret := []string{ "CNB_TARGET_OS=" + tm.OS, "CNB_TARGET_ARCH=" + tm.Arch, - "CNB_TARGET_ARCH_VARIANT=" + tm.ArchVariant, } + // optional var distName, distVersion string if tm.Distro != nil { distName = tm.Distro.Name distVersion = tm.Distro.Version } - ret = append(ret, "CNB_TARGET_DISTRO_NAME="+distName) - ret = append(ret, "CNB_TARGET_DISTRO_VERSION="+distVersion) + ret = appendIfNotEmpty(ret, "CNB_TARGET_ARCH_VARIANT", tm.ArchVariant) + ret = appendIfNotEmpty(ret, "CNB_TARGET_DISTRO_NAME", distName) + ret = appendIfNotEmpty(ret, "CNB_TARGET_DISTRO_VERSION", distVersion) return ret } +func appendIfNotEmpty(env []string, key, val string) []string { + if val == "" { + return env + } + return append(env, fmt.Sprintf("%s=%s", key, val)) +} + // TargetSatisfiedForRebase treats optional fields (ArchVariant and Distribution fields) as wildcards if empty, returns true if all populated fields match func TargetSatisfiedForRebase(t files.TargetMetadata, appTargetMetadata files.TargetMetadata) bool { if t.OS != appTargetMetadata.OS || t.Arch != appTargetMetadata.Arch { diff --git a/platform/target_data_test.go b/platform/target_data_test.go index cb78ade9..f5aa9ee6 100644 --- a/platform/target_data_test.go +++ b/platform/target_data_test.go @@ -2,6 +2,7 @@ package platform_test import ( "fmt" + "runtime" "testing" "github.com/apex/log" @@ -129,6 +130,8 @@ func testTargetData(t *testing.T, when spec.G, it spec.S) { t: t, HasFile: true} platform.GetTargetOSFromFileSystem(&d, &tm, logr) + h.AssertEq(t, "linux", tm.OS) + h.AssertEq(t, runtime.GOARCH, tm.Arch) h.AssertEq(t, "opensesame", tm.Distro.Name) h.AssertEq(t, "3.14", tm.Distro.Version) }) @@ -199,12 +202,28 @@ func testTargetData(t *testing.T, when spec.G, it spec.S) { observed := platform.EnvVarsFor(d, tm, &log.Logger{Handler: memory.New()}) h.AssertContains(t, observed, "CNB_TARGET_ARCH="+tm.Arch) h.AssertContains(t, observed, "CNB_TARGET_OS="+tm.OS) - // note: per the spec only the ID field is optional, so I guess the others should always be set: https://github.com/buildpacks/rfcs/blob/main/text/0096-remove-stacks-mixins.md#runtime-metadata - // the empty ones: - h.AssertContains(t, observed, "CNB_TARGET_ARCH_VARIANT=") - h.AssertContains(t, observed, "CNB_TARGET_DISTRO_NAME=") - h.AssertContains(t, observed, "CNB_TARGET_DISTRO_VERSION=") - h.AssertEq(t, len(observed), 5) + h.AssertEq(t, len(observed), 2) + }) + + when("optional vars are empty", func() { + it("omits them", func() { + tm := files.TargetMetadata{ + // required + OS: "linux", + Arch: "pentium", + // optional + ArchVariant: "", + Distro: &files.OSDistro{Name: "nix", Version: ""}, + ID: "", + } + d := &mockDetector{ + contents: "this is just test contents really", + t: t, + HasFile: false, + } + observed := platform.EnvVarsFor(d, tm, &log.Logger{Handler: memory.New()}) + h.AssertEq(t, len(observed), 3) + }) }) }) From 4c40dcadaf738e5b31e9953eb589c4e6f378b7f7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 9 Jul 2024 14:54:19 -0400 Subject: [PATCH 16/18] Bump the go-dependencies group across 1 directory with 6 updates (#1373) * Bump the go-dependencies group across 1 directory with 6 updates Bumps the go-dependencies group with 5 updates in the / directory: | Package | From | To | | --- | --- | --- | | [github.com/GoogleContainerTools/kaniko](https://github.com/GoogleContainerTools/kaniko) | `1.23.0` | `1.23.1` | | [github.com/containerd/containerd](https://github.com/containerd/containerd) | `1.7.17` | `1.7.19` | | [github.com/google/go-containerregistry](https://github.com/google/go-containerregistry) | `0.19.1` | `0.20.0` | | [github.com/moby/buildkit](https://github.com/moby/buildkit) | `0.13.2` | `0.14.1` | | [golang.org/x/sys](https://github.com/golang/sys) | `0.20.0` | `0.22.0` | Updates `github.com/GoogleContainerTools/kaniko` from 1.23.0 to 1.23.1 - [Release notes](https://github.com/GoogleContainerTools/kaniko/releases) - [Changelog](https://github.com/GoogleContainerTools/kaniko/blob/main/CHANGELOG.md) - [Commits](https://github.com/GoogleContainerTools/kaniko/compare/v1.23.0...v1.23.1) Updates `github.com/containerd/containerd` from 1.7.17 to 1.7.19 - [Release notes](https://github.com/containerd/containerd/releases) - [Changelog](https://github.com/containerd/containerd/blob/main/RELEASES.md) - [Commits](https://github.com/containerd/containerd/compare/v1.7.17...v1.7.19) Updates `github.com/docker/docker` from 26.1.2+incompatible to 26.1.3+incompatible - [Release notes](https://github.com/docker/docker/releases) - [Commits](https://github.com/docker/docker/compare/v26.1.2...v26.1.3) Updates `github.com/google/go-containerregistry` from 0.19.1 to 0.20.0 - [Release notes](https://github.com/google/go-containerregistry/releases) - [Changelog](https://github.com/google/go-containerregistry/blob/main/.goreleaser.yml) - [Commits](https://github.com/google/go-containerregistry/compare/v0.19.1...v0.20.0) Updates `github.com/moby/buildkit` from 0.13.2 to 0.14.1 - [Release notes](https://github.com/moby/buildkit/releases) - [Commits](https://github.com/moby/buildkit/compare/v0.13.2...v0.14.1) Updates `golang.org/x/sys` from 0.20.0 to 0.22.0 - [Commits](https://github.com/golang/sys/compare/v0.20.0...v0.22.0) --- updated-dependencies: - dependency-name: github.com/GoogleContainerTools/kaniko dependency-type: direct:production update-type: version-update:semver-patch dependency-group: go-dependencies - dependency-name: github.com/containerd/containerd dependency-type: direct:production update-type: version-update:semver-patch dependency-group: go-dependencies - dependency-name: github.com/docker/docker dependency-type: direct:production update-type: version-update:semver-patch dependency-group: go-dependencies - dependency-name: github.com/google/go-containerregistry dependency-type: direct:production update-type: version-update:semver-minor dependency-group: go-dependencies - dependency-name: github.com/moby/buildkit dependency-type: direct:production update-type: version-update:semver-minor dependency-group: go-dependencies - dependency-name: golang.org/x/sys dependency-type: direct:production update-type: version-update:semver-minor dependency-group: go-dependencies ... Signed-off-by: dependabot[bot] * Stay on the same version of buildkit as kaniko Signed-off-by: Natalie Arellano --------- Signed-off-by: dependabot[bot] Signed-off-by: Natalie Arellano Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Natalie Arellano --- go.mod | 48 +++++++++++++------------ go.sum | 112 +++++++++++++++++++++++++++++---------------------------- 2 files changed, 83 insertions(+), 77 deletions(-) diff --git a/go.mod b/go.mod index ee5ac968..79cd77c8 100644 --- a/go.mod +++ b/go.mod @@ -2,23 +2,23 @@ module github.com/buildpacks/lifecycle require ( github.com/BurntSushi/toml v1.4.0 - github.com/GoogleContainerTools/kaniko v1.23.0 + github.com/GoogleContainerTools/kaniko v1.23.1 github.com/apex/log v1.9.0 github.com/awslabs/amazon-ecr-credential-helper/ecr-login v0.0.0-20240419161514-af205d85bb44 github.com/buildpacks/imgutil v0.0.0-20240605145725-186f89b2d168 github.com/chrismellard/docker-credential-acr-env v0.0.0-20230304212654-82a0ddb27589 - github.com/containerd/containerd v1.7.17 - github.com/docker/docker v26.1.2+incompatible + github.com/containerd/containerd v1.7.19 + github.com/docker/docker v26.1.4+incompatible github.com/golang/mock v1.6.0 github.com/google/go-cmp v0.6.0 - github.com/google/go-containerregistry v0.19.1 + github.com/google/go-containerregistry v0.20.0 github.com/google/uuid v1.6.0 github.com/heroku/color v0.0.6 github.com/moby/buildkit v0.13.2 github.com/pkg/errors v0.9.1 github.com/sclevine/spec v1.4.0 golang.org/x/sync v0.7.0 - golang.org/x/sys v0.20.0 + golang.org/x/sys v0.22.0 ) require ( @@ -36,38 +36,41 @@ require ( github.com/Azure/go-autorest/logger v0.2.1 // indirect github.com/Azure/go-autorest/tracing v0.6.0 // indirect github.com/Microsoft/go-winio v0.6.2 // indirect - github.com/Microsoft/hcsshim v0.11.5 // indirect + github.com/Microsoft/hcsshim v0.11.7 // indirect github.com/agext/levenshtein v1.2.3 // indirect - github.com/aws/aws-sdk-go-v2 v1.26.1 // indirect - github.com/aws/aws-sdk-go-v2/config v1.27.13 // indirect - github.com/aws/aws-sdk-go-v2/credentials v1.17.13 // indirect - github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.1 // indirect - github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.5 // indirect - github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.5 // indirect + github.com/aws/aws-sdk-go-v2 v1.27.0 // indirect + github.com/aws/aws-sdk-go-v2/config v1.27.16 // indirect + github.com/aws/aws-sdk-go-v2/credentials v1.17.16 // indirect + github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.3 // indirect + github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.7 // indirect + github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.7 // indirect github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0 // indirect github.com/aws/aws-sdk-go-v2/service/ecr v1.27.4 // indirect github.com/aws/aws-sdk-go-v2/service/ecrpublic v1.23.4 // indirect github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.2 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.7 // indirect - github.com/aws/aws-sdk-go-v2/service/sso v1.20.6 // indirect - github.com/aws/aws-sdk-go-v2/service/ssooidc v1.24.0 // indirect - github.com/aws/aws-sdk-go-v2/service/sts v1.28.7 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.9 // indirect + github.com/aws/aws-sdk-go-v2/service/sso v1.20.9 // indirect + github.com/aws/aws-sdk-go-v2/service/ssooidc v1.24.3 // indirect + github.com/aws/aws-sdk-go-v2/service/sts v1.28.10 // indirect github.com/aws/smithy-go v1.20.2 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect - github.com/cilium/ebpf v0.12.3 // indirect + github.com/cilium/ebpf v0.9.1 // indirect github.com/containerd/cgroups v1.1.0 // indirect github.com/containerd/cgroups/v3 v3.0.2 // indirect + github.com/containerd/containerd/api v1.7.19 // indirect github.com/containerd/continuity v0.4.3 // indirect + github.com/containerd/errdefs v0.1.0 // indirect github.com/containerd/fifo v1.1.0 // indirect github.com/containerd/log v0.1.0 // indirect + github.com/containerd/platforms v0.2.1 // indirect github.com/containerd/stargz-snapshotter/estargz v0.15.1 // indirect - github.com/containerd/ttrpc v1.2.4 // indirect + github.com/containerd/ttrpc v1.2.5 // indirect github.com/containerd/typeurl/v2 v2.1.1 // indirect github.com/coreos/go-systemd/v22 v22.5.0 // indirect github.com/dimchansky/utfbom v1.1.1 // indirect github.com/distribution/reference v0.6.0 // indirect - github.com/docker/cli v26.1.0+incompatible // indirect + github.com/docker/cli v26.1.4+incompatible // indirect github.com/docker/distribution v2.8.3+incompatible // indirect github.com/docker/docker-credential-helpers v0.8.1 // indirect github.com/docker/go-connections v0.5.0 // indirect @@ -126,14 +129,13 @@ require ( go.opentelemetry.io/otel/metric v1.25.0 // indirect go.opentelemetry.io/otel/trace v1.25.0 // indirect golang.org/x/crypto v0.23.0 // indirect - golang.org/x/exp v0.0.0-20240416160154-fe59bbe5cc7f // indirect golang.org/x/net v0.25.0 // indirect golang.org/x/oauth2 v0.20.0 // indirect golang.org/x/text v0.15.0 // indirect golang.org/x/time v0.5.0 // indirect - google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240429193739-8cf5692501f6 // indirect - google.golang.org/grpc v1.63.2 // indirect + google.golang.org/genproto v0.0.0-20240401170217-c3f982113cda // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240521202816-d264139d666e // indirect + google.golang.org/grpc v1.64.0 // indirect google.golang.org/protobuf v1.34.1 // indirect ) diff --git a/go.sum b/go.sum index 71d48c6c..d25443e4 100644 --- a/go.sum +++ b/go.sum @@ -35,12 +35,12 @@ github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBp github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/toml v1.4.0 h1:kuoIxZQy2WRRk1pttg9asf+WVv6tWQuBNVmK8+nqPr0= github.com/BurntSushi/toml v1.4.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho= -github.com/GoogleContainerTools/kaniko v1.23.0 h1:/YTWOF3uL40kNyK2821Wc+12Czlon1U+gmISWw9CLTM= -github.com/GoogleContainerTools/kaniko v1.23.0/go.mod h1:lTA7EDyPzSGYxcXxaxWCztINdHMb1Qxj6+eAn1vo2EI= +github.com/GoogleContainerTools/kaniko v1.23.1 h1:1N6XhVTrUB0CNVIUeruXfZ9CtpJP3TuZkxDZYg2NilA= +github.com/GoogleContainerTools/kaniko v1.23.1/go.mod h1:r3od0LXG7hnM2i/WMIX1e6kmLiKpV1D7skalBZBvsbk= 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.11.5 h1:haEcLNpj9Ka1gd3B3tAEs9CpE0c+1IhoL59w/exYU38= -github.com/Microsoft/hcsshim v0.11.5/go.mod h1:MV8xMfmECjl5HdO7U/3/hFVnkmSBjAjmA09d4bExKcU= +github.com/Microsoft/hcsshim v0.11.7 h1:vl/nj3Bar/CvJSYo7gIQPyRWc9f3c6IeSNavBTSZNZQ= +github.com/Microsoft/hcsshim v0.11.7/go.mod h1:MV8xMfmECjl5HdO7U/3/hFVnkmSBjAjmA09d4bExKcU= github.com/agext/levenshtein v1.2.3 h1:YB2fHEn0UJagG8T1rrWknE3ZQzWM06O8AMAatNn7lmo= github.com/agext/levenshtein v1.2.3/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= @@ -51,18 +51,18 @@ github.com/apex/logs v1.0.0/go.mod h1:XzxuLZ5myVHDy9SAmYpamKKRNApGj54PfYLcFrXqDw github.com/aphistic/golf v0.0.0-20180712155816-02c07f170c5a/go.mod h1:3NqKYiepwy8kCu4PNA+aP7WUV72eXWJeP9/r3/K9aLE= github.com/aphistic/sweet v0.2.0/go.mod h1:fWDlIh/isSE9n6EPsRmC0det+whmX6dJid3stzu0Xys= github.com/aws/aws-sdk-go v1.20.6/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= -github.com/aws/aws-sdk-go-v2 v1.26.1 h1:5554eUqIYVWpU0YmeeYZ0wU64H2VLBs8TlhRB2L+EkA= -github.com/aws/aws-sdk-go-v2 v1.26.1/go.mod h1:ffIFB97e2yNsv4aTSGkqtHnppsIJzw7G7BReUZ3jCXM= -github.com/aws/aws-sdk-go-v2/config v1.27.13 h1:WbKW8hOzrWoOA/+35S5okqO/2Ap8hkkFUzoW8Hzq24A= -github.com/aws/aws-sdk-go-v2/config v1.27.13/go.mod h1:XLiyiTMnguytjRER7u5RIkhIqS8Nyz41SwAWb4xEjxs= -github.com/aws/aws-sdk-go-v2/credentials v1.17.13 h1:XDCJDzk/u5cN7Aple7D/MiAhx1Rjo/0nueJ0La8mRuE= -github.com/aws/aws-sdk-go-v2/credentials v1.17.13/go.mod h1:FMNcjQrmuBYvOTZDtOLCIu0esmxjF7RuA/89iSXWzQI= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.1 h1:FVJ0r5XTHSmIHJV6KuDmdYhEpvlHpiSd38RQWhut5J4= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.1/go.mod h1:zusuAeqezXzAB24LGuzuekqMAEgWkVYukBec3kr3jUg= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.5 h1:aw39xVGeRWlWx9EzGVnhOR4yOjQDHPQ6o6NmBlscyQg= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.5/go.mod h1:FSaRudD0dXiMPK2UjknVwwTYyZMRsHv3TtkabsZih5I= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.5 h1:PG1F3OD1szkuQPzDw3CIQsRIrtTlUC3lP84taWzHlq0= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.5/go.mod h1:jU1li6RFryMz+so64PpKtudI+QzbKoIEivqdf6LNpOc= +github.com/aws/aws-sdk-go-v2 v1.27.0 h1:7bZWKoXhzI+mMR/HjdMx8ZCC5+6fY0lS5tr0bbgiLlo= +github.com/aws/aws-sdk-go-v2 v1.27.0/go.mod h1:ffIFB97e2yNsv4aTSGkqtHnppsIJzw7G7BReUZ3jCXM= +github.com/aws/aws-sdk-go-v2/config v1.27.16 h1:knpCuH7laFVGYTNd99Ns5t+8PuRjDn4HnnZK48csipM= +github.com/aws/aws-sdk-go-v2/config v1.27.16/go.mod h1:vutqgRhDUktwSge3hrC3nkuirzkJ4E/mLj5GvI0BQas= +github.com/aws/aws-sdk-go-v2/credentials v1.17.16 h1:7d2QxY83uYl0l58ceyiSpxg9bSbStqBC6BeEeHEchwo= +github.com/aws/aws-sdk-go-v2/credentials v1.17.16/go.mod h1:Ae6li/6Yc6eMzysRL2BXlPYvnrLLBg3D11/AmOjw50k= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.3 h1:dQLK4TjtnlRGb0czOht2CevZ5l6RSyRWAnKeGd7VAFE= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.3/go.mod h1:TL79f2P6+8Q7dTsILpiVST+AL9lkF6PPGI167Ny0Cjw= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.7 h1:lf/8VTF2cM+N4SLzaYJERKEWAXq8MOMpZfU6wEPWsPk= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.7/go.mod h1:4SjkU7QiqK2M9oozyMzfZ/23LmUY+h3oFqhdeP5OMiI= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.7 h1:4OYVp0705xu8yjdyoWix0r9wPIRXnIzzOoUpQVHIJ/g= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.7/go.mod h1:vd7ESTEvI76T2Na050gODNmNU7+OyKrIKroYTu4ABiI= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0 h1:hT8rVHwugYE2lEfdFE0QWVo81lF7jMrYJVDWI+f+VxU= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0/go.mod h1:8tu/lYfQfFe6IGnaOdrpVgEL2IrrDOf6/m9RQum4NkY= github.com/aws/aws-sdk-go-v2/service/ecr v1.27.4 h1:Qr9W21mzWT3RhfYn9iAux7CeRIdbnTAqmiOlASqQgZI= @@ -71,14 +71,14 @@ github.com/aws/aws-sdk-go-v2/service/ecrpublic v1.23.4 h1:aNuiieMaS2IHxqAsTdM/pj github.com/aws/aws-sdk-go-v2/service/ecrpublic v1.23.4/go.mod h1:8pvvNAklmq+hKmqyvFoMRg0bwg9sdGOvdwximmKiKP0= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.2 h1:Ji0DY1xUsUr3I8cHps0G+XM3WWU16lP6yG8qu1GAZAs= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.2/go.mod h1:5CsjAbs3NlGQyZNFACh+zztPDI7fU6eW9QsxjfnuBKg= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.7 h1:ogRAwT1/gxJBcSWDMZlgyFUM962F51A5CRhDLbxLdmo= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.7/go.mod h1:YCsIZhXfRPLFFCl5xxY+1T9RKzOKjCut+28JSX2DnAk= -github.com/aws/aws-sdk-go-v2/service/sso v1.20.6 h1:o5cTaeunSpfXiLTIBx5xo2enQmiChtu1IBbzXnfU9Hs= -github.com/aws/aws-sdk-go-v2/service/sso v1.20.6/go.mod h1:qGzynb/msuZIE8I75DVRCUXw3o3ZyBmUvMwQ2t/BrGM= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.24.0 h1:Qe0r0lVURDDeBQJ4yP+BOrJkvkiCo/3FH/t+wY11dmw= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.24.0/go.mod h1:mUYPBhaF2lGiukDEjJX2BLRRKTmoUSitGDUgM4tRxak= -github.com/aws/aws-sdk-go-v2/service/sts v1.28.7 h1:et3Ta53gotFR4ERLXXHIHl/Uuk1qYpP5uU7cvNql8ns= -github.com/aws/aws-sdk-go-v2/service/sts v1.28.7/go.mod h1:FZf1/nKNEkHdGGJP/cI2MoIMquumuRK6ol3QQJNDxmw= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.9 h1:Wx0rlZoEJR7JwlSZcHnEa7CNjrSIyVxMFWGAaXy4fJY= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.9/go.mod h1:aVMHdE0aHO3v+f/iw01fmXV/5DbfQ3Bi9nN7nd9bE9Y= +github.com/aws/aws-sdk-go-v2/service/sso v1.20.9 h1:aD7AGQhvPuAxlSUfo0CWU7s6FpkbyykMhGYMvlqTjVs= +github.com/aws/aws-sdk-go-v2/service/sso v1.20.9/go.mod h1:c1qtZUWtygI6ZdvKppzCSXsDOq5I4luJPZ0Ud3juFCA= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.24.3 h1:Pav5q3cA260Zqez42T9UhIlsd9QeypszRPwC9LdSSsQ= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.24.3/go.mod h1:9lmoVDVLz/yUZwLaQ676TK02fhCu4+PgRSmMaKR1ozk= +github.com/aws/aws-sdk-go-v2/service/sts v1.28.10 h1:69tpbPED7jKPyzMcrwSvhWcJ9bPnZsZs18NT40JwM0g= +github.com/aws/aws-sdk-go-v2/service/sts v1.28.10/go.mod h1:0Aqn1MnEuitqfsCNyKsdKLhDUOr4txD/g19EfiUqgws= github.com/aws/smithy-go v1.20.2 h1:tbp628ireGtzcHDDmLT/6ADHidqnwgF57XOXZe6tp4Q= github.com/aws/smithy-go v1.20.2/go.mod h1:krry+ya/rV9RDcV/Q16kpu6ypI4K2czasz0NC3qS14E= github.com/awslabs/amazon-ecr-credential-helper/ecr-login v0.0.0-20240419161514-af205d85bb44 h1:oNDkocd5/+6jUuxyz07jQWnKhgpNtKQoZSXKMb7emqQ= @@ -97,26 +97,32 @@ github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chrismellard/docker-credential-acr-env v0.0.0-20230304212654-82a0ddb27589 h1:krfRl01rzPzxSxyLyrChD+U+MzsBXbm0OwYYB67uF+4= github.com/chrismellard/docker-credential-acr-env v0.0.0-20230304212654-82a0ddb27589/go.mod h1:OuDyvmLnMCwa2ep4Jkm6nyA0ocJuZlGyk2gGseVzERM= -github.com/cilium/ebpf v0.12.3 h1:8ht6F9MquybnY97at+VDZb3eQQr8ev79RueWeVaEcG4= -github.com/cilium/ebpf v0.12.3/go.mod h1:TctK1ivibvI3znr66ljgi4hqOT8EYQjz1KWBfb1UVgM= +github.com/cilium/ebpf v0.9.1 h1:64sn2K3UKw8NbP/blsixRpF3nXuyhz/VjRlRzvlBRu4= +github.com/cilium/ebpf v0.9.1/go.mod h1:+OhNOIXx/Fnu1IE8bJz2dzOA+VSfyTfdNUVdlQnxUFY= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/containerd/cgroups v1.1.0 h1:v8rEWFl6EoqHB+swVNjVoCJE8o3jX7e8nqBGPLaDFBM= github.com/containerd/cgroups v1.1.0/go.mod h1:6ppBcbh/NOOUU+dMKrykgaBnK9lCIBxHqJDGwsa1mIw= github.com/containerd/cgroups/v3 v3.0.2 h1:f5WFqIVSgo5IZmtTT3qVBo6TzI1ON6sycSBKkymb9L0= github.com/containerd/cgroups/v3 v3.0.2/go.mod h1:JUgITrzdFqp42uI2ryGA+ge0ap/nxzYgkGmIcetmErE= -github.com/containerd/containerd v1.7.17 h1:KjNnn0+tAVQHAoaWRjmdak9WlvnFR/8rU1CHHy8Rm2A= -github.com/containerd/containerd v1.7.17/go.mod h1:vK+hhT4TIv2uejlcDlbVIc8+h/BqtKLIyNrtCZol8lI= +github.com/containerd/containerd v1.7.19 h1:/xQ4XRJ0tamDkdzrrBAUy/LE5nCcxFKdBm4EcPrSMEE= +github.com/containerd/containerd v1.7.19/go.mod h1:h4FtNYUUMB4Phr6v+xG89RYKj9XccvbNSCKjdufCrkc= +github.com/containerd/containerd/api v1.7.19 h1:VWbJL+8Ap4Ju2mx9c9qS1uFSB1OVYr5JJrW2yT5vFoA= +github.com/containerd/containerd/api v1.7.19/go.mod h1:fwGavl3LNwAV5ilJ0sbrABL44AQxmNjDRcwheXDb6Ig= github.com/containerd/continuity v0.4.3 h1:6HVkalIp+2u1ZLH1J/pYX2oBVXlJZvh1X1A7bEZ9Su8= github.com/containerd/continuity v0.4.3/go.mod h1:F6PTNCKepoxEaXLQp3wDAjygEnImnZ/7o4JzpodfroQ= +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/fifo v1.1.0 h1:4I2mbh5stb1u6ycIABlBw9zgtlK8viPI9QkQNRQEEmY= github.com/containerd/fifo v1.1.0/go.mod h1:bmC4NWMbXlt2EZ0Hc7Fx7QzTFxgPID13eH0Qu+MAb2o= github.com/containerd/log v0.1.0 h1:TCJt7ioM2cr/tfR8GPbGf9/VRAX8D2B4PjzCpfX540I= github.com/containerd/log v0.1.0/go.mod h1:VRRf09a7mHDIRezVKTRCrOq78v577GXq3bSa3EhrzVo= +github.com/containerd/platforms v0.2.1 h1:zvwtM3rz2YHPQsF2CHYM8+KtB5dvhISiXh5ZpSBQv6A= +github.com/containerd/platforms v0.2.1/go.mod h1:XHCb+2/hzowdiut9rkudds9bE5yJ7npe7dG/wG+uFPw= 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/coreos/go-systemd/v22 v22.5.0 h1:RrqgGjYQKalulkV8NGVIfkXQf6YYmOyiJKk8iXXhfZs= @@ -130,12 +136,12 @@ github.com/dimchansky/utfbom v1.1.1 h1:vV6w1AhK4VMnhBno/TPVCoK9U/LP0PkLCS9tbxHdi github.com/dimchansky/utfbom v1.1.1/go.mod h1:SxdoEBH5qIqFocHMyGOXVAybYJdr71b1Q/j0mACtrfE= 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/docker/cli v26.1.0+incompatible h1:+nwRy8Ocd8cYNQ60mozDDICICD8aoFGtlPXifX/UQ3Y= -github.com/docker/cli v26.1.0+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= +github.com/docker/cli v26.1.4+incompatible h1:I8PHdc0MtxEADqYJZvhBrW9bo8gawKwwenxRM7/rLu8= +github.com/docker/cli v26.1.4+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= github.com/docker/distribution v2.8.3+incompatible h1:AtKxIZ36LoNK51+Z6RpzLpddBirtxJnzDrHLEKxTAYk= github.com/docker/distribution v2.8.3+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/docker v26.1.2+incompatible h1:UVX5ZOrrfTGZZYEP+ZDq3Xn9PdHNXaSYMFPDumMqG2k= -github.com/docker/docker v26.1.2+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v26.1.4+incompatible h1:vuTpXDuoga+Z38m1OZHzl7NKisKWaWlhjQk7IDPSLsU= +github.com/docker/docker v26.1.4+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/docker-credential-helpers v0.8.1 h1:j/eKUktUltBtMzKqmfLB0PAgqYyMHOp5vfsD1807oKo= github.com/docker/docker-credential-helpers v0.8.1/go.mod h1:P3ci7E3lwkZg6XiHdRKft1KckHiO9a2rNtyFbZ/ry9M= github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c= @@ -157,8 +163,8 @@ github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7 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/frankban/quicktest v1.14.5 h1:dfYrrRyLtiqT9GyKXgdh+k4inNeTvmGbuSgZ3lx3GhA= -github.com/frankban/quicktest v1.14.5/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= +github.com/frankban/quicktest v1.14.0 h1:+cqqvzZV87b4adx/5ayVOaYZ2CrvM4ejQvUdBzPPUss= +github.com/frankban/quicktest v1.14.0/go.mod h1:NeW+ay9A/U67EYXNFA1nPE8e/tnQv/09mUdL/ijj8og= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= @@ -208,8 +214,8 @@ github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/go-containerregistry v0.19.1 h1:yMQ62Al6/V0Z7CqIrrS1iYoA5/oQCm88DeNujc7C1KY= -github.com/google/go-containerregistry v0.19.1/go.mod h1:YCMFNQeeXeLF+dnhhWkqDItx/JSkH01j1Kis4PsjzFI= +github.com/google/go-containerregistry v0.20.0 h1:wRqHpOeVh3DnenOrPy9xDOLdnLatiGuuNRVelR2gSbg= +github.com/google/go-containerregistry v0.20.0/go.mod h1:YCMFNQeeXeLF+dnhhWkqDItx/JSkH01j1Kis4PsjzFI= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= @@ -418,8 +424,6 @@ golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58 golang.org/x/crypto v0.23.0 h1:dIJU/v2J8Mdglj/8rJ6UUOM3Zc9zLZxVZwwxMooUSAI= golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20240416160154-fe59bbe5cc7f h1:99ci1mjWVBWwJiEKYY6jWa4d2nTQVIEhZIptnrVb1XY= -golang.org/x/exp v0.0.0-20240416160154-fe59bbe5cc7f/go.mod h1:/lliqkxwWAhPjf5oSOIJup2XcqJaw8RGS6k3TGEc7GI= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= @@ -427,8 +431,8 @@ 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.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA= -golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.13.0 h1:I/DsJXRlw/8l/0c24sM9yb0T4z9liZTduXvdAWYiysY= +golang.org/x/mod v0.13.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= 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= @@ -484,8 +488,8 @@ golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y= -golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.22.0 h1:RI27ohtqKCnwULzJLqkv897zojh5/DwS/ENaMzUOaWI= +golang.org/x/sys v0.22.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= @@ -509,8 +513,8 @@ golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roY 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.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.20.0 h1:hz/CVckiOxybQvFw6h7b/q80NTr9IUQb4s1IIzW7KNY= -golang.org/x/tools v0.20.0/go.mod h1:WvitBU7JJf6A4jOdg4S1tviW9bhUxkgeCui/0JHctQg= +golang.org/x/tools v0.14.0 h1:jvNa2pY0M4r62jkRQ6RwEZZyPcymeL9XZMLBbV7U2nc= +golang.org/x/tools v0.14.0/go.mod h1:uYBEerGOWcJyEORxN+Ek8+TT266gXkNlHdJBwexUsBg= 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= @@ -520,19 +524,19 @@ google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7 google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de h1:F6qOa9AZTYJXOUEr4jDysRDLrm4PHePlge4v4TGAlxY= -google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:VUhTRKeHn9wwcdrk73nvdC9gF178Tzhmt/qyaFcPLSo= -google.golang.org/genproto/googleapis/api v0.0.0-20240415180920-8c6c420018be h1:Zz7rLWqp0ApfsR/l7+zSHhY3PMiH2xqgxlfYfAfNpoU= -google.golang.org/genproto/googleapis/api v0.0.0-20240415180920-8c6c420018be/go.mod h1:dvdCTIoAGbkWbcIKBniID56/7XHTt6WfxXNMxuziJ+w= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240429193739-8cf5692501f6 h1:DujSIu+2tC9Ht0aPNA7jgj23Iq8Ewi5sgkQ++wdvonE= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240429193739-8cf5692501f6/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= +google.golang.org/genproto v0.0.0-20240401170217-c3f982113cda h1:wu/KJm9KJwpfHWhkkZGohVC6KRrc1oJNr4jwtQMOQXw= +google.golang.org/genproto v0.0.0-20240401170217-c3f982113cda/go.mod h1:g2LLCvCeCSir/JJSWosk19BR4NVxGqHUC6rxIRsd7Aw= +google.golang.org/genproto/googleapis/api v0.0.0-20240513163218-0867130af1f8 h1:W5Xj/70xIA4x60O/IFyXivR5MGqblAb8R3w26pnD6No= +google.golang.org/genproto/googleapis/api v0.0.0-20240513163218-0867130af1f8/go.mod h1:vPrPUTsDCYxXWjP7clS81mZ6/803D8K4iM9Ma27VKas= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240521202816-d264139d666e h1:Elxv5MwEkCI9f5SkoL6afed6NTdxaGoAo39eANBwHL8= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240521202816-d264139d666e/go.mod h1:EfXuqaE1J41VCDicxHzUDm+8rk+7ZdXzHV0IhO/I6s0= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= -google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= +google.golang.org/grpc v1.64.0 h1:KH3VH9y/MgNQg1dE7b3XfVK0GsPSIzJwdF617gUSbvY= +google.golang.org/grpc v1.64.0/go.mod h1:oxjF8E3FBnjp+/gVFYdWacaLDx9na1aqy9oovLpxQYg= 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= From 12e2de844951e409e3d8b08c4082703806546930 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 10 Jul 2024 09:50:09 -0400 Subject: [PATCH 17/18] Bump google.golang.org/grpc from 1.64.0 to 1.64.1 (#1375) Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.64.0 to 1.64.1. - [Release notes](https://github.com/grpc/grpc-go/releases) - [Commits](https://github.com/grpc/grpc-go/compare/v1.64.0...v1.64.1) --- updated-dependencies: - dependency-name: google.golang.org/grpc dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 8 ++++---- go.sum | 24 ++++++++++++------------ 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/go.mod b/go.mod index 79cd77c8..6907c83a 100644 --- a/go.mod +++ b/go.mod @@ -128,14 +128,14 @@ require ( go.opentelemetry.io/otel v1.25.0 // indirect go.opentelemetry.io/otel/metric v1.25.0 // indirect go.opentelemetry.io/otel/trace v1.25.0 // indirect - golang.org/x/crypto v0.23.0 // indirect - golang.org/x/net v0.25.0 // indirect + golang.org/x/crypto v0.24.0 // indirect + golang.org/x/net v0.26.0 // indirect golang.org/x/oauth2 v0.20.0 // indirect - golang.org/x/text v0.15.0 // indirect + golang.org/x/text v0.16.0 // indirect golang.org/x/time v0.5.0 // indirect google.golang.org/genproto v0.0.0-20240401170217-c3f982113cda // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20240521202816-d264139d666e // indirect - google.golang.org/grpc v1.64.0 // indirect + google.golang.org/grpc v1.64.1 // indirect google.golang.org/protobuf v1.34.1 // indirect ) diff --git a/go.sum b/go.sum index d25443e4..2a4b0f5d 100644 --- a/go.sum +++ b/go.sum @@ -421,8 +421,8 @@ golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5y golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= -golang.org/x/crypto v0.23.0 h1:dIJU/v2J8Mdglj/8rJ6UUOM3Zc9zLZxVZwwxMooUSAI= -golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8= +golang.org/x/crypto v0.24.0 h1:mnl8DM0o513X8fdIkmyFE/5hTYxbwYOjDS/+rK6qpRI= +golang.org/x/crypto v0.24.0/go.mod h1:Z1PMYSOR5nyMcyAVAIQSKCDwalqy85Aqn1x3Ws4L5DM= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= @@ -431,8 +431,8 @@ 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.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/mod v0.13.0 h1:I/DsJXRlw/8l/0c24sM9yb0T4z9liZTduXvdAWYiysY= -golang.org/x/mod v0.13.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA= +golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= 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= @@ -450,8 +450,8 @@ golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96b golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac= -golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= +golang.org/x/net v0.26.0 h1:soB7SVo0PWrY4vPW/+ay0jKDNScG2X9wFeYlXIvJsOQ= +golang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.20.0 h1:4mQdhULixXKP1rwYBW0vAijoXnkTG0BLCDRzfe1idMo= golang.org/x/oauth2 v0.20.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= @@ -499,8 +499,8 @@ golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk= -golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= +golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -513,8 +513,8 @@ golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roY 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.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.14.0 h1:jvNa2pY0M4r62jkRQ6RwEZZyPcymeL9XZMLBbV7U2nc= -golang.org/x/tools v0.14.0/go.mod h1:uYBEerGOWcJyEORxN+Ek8+TT266gXkNlHdJBwexUsBg= +golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d h1:vU5i/LfpvrRCpgM/VPfJLg5KjxD3E+hfT1SH+d9zLwg= +golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= 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= @@ -535,8 +535,8 @@ google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyac google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.64.0 h1:KH3VH9y/MgNQg1dE7b3XfVK0GsPSIzJwdF617gUSbvY= -google.golang.org/grpc v1.64.0/go.mod h1:oxjF8E3FBnjp+/gVFYdWacaLDx9na1aqy9oovLpxQYg= +google.golang.org/grpc v1.64.1 h1:LKtvyfbX3UGVPFcGqJ9ItpVWW6oN/2XqTxfAnwRRXiA= +google.golang.org/grpc v1.64.1/go.mod h1:hiQF4LFZelK2WKaP6W0L92zGHtiQdZxk8CrSdvyjeP0= 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= From a87e12e6cd609f43fe77f1753ad8ab61210325ae Mon Sep 17 00:00:00 2001 From: Natalie Arellano Date: Thu, 11 Jul 2024 09:34:05 -0400 Subject: [PATCH 18/18] Surface registry error (#1376) * Surface registry error instead of logging it as debug When permissions issues are encountered, it can be hard to determine the root cause without the error returned from the registry Signed-off-by: Natalie Arellano * Fix test expectation Signed-off-by: Natalie Arellano --------- Signed-off-by: Natalie Arellano --- acceptance/analyzer_test.go | 2 +- image/registry_handler.go | 11 ++++------- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/acceptance/analyzer_test.go b/acceptance/analyzer_test.go index 37e0345f..92e9d487 100644 --- a/acceptance/analyzer_test.go +++ b/acceptance/analyzer_test.go @@ -450,7 +450,7 @@ func testAnalyzerFunc(platformAPI string) func(t *testing.T, when spec.G, it spe output, err := cmd.CombinedOutput() h.AssertNotNil(t, err) - expected := "validating registry write access: ensure registry read/write access to " + analyzeRegFixtures.InaccessibleImage + expected := "ensure registry read/write access to " + analyzeRegFixtures.InaccessibleImage h.AssertStringContains(t, string(output), expected) }) }) diff --git a/image/registry_handler.go b/image/registry_handler.go index cbfcd563..2bf11056 100644 --- a/image/registry_handler.go +++ b/image/registry_handler.go @@ -1,12 +1,11 @@ package image import ( + "fmt" + "github.com/buildpacks/imgutil" "github.com/buildpacks/imgutil/remote" "github.com/google/go-containerregistry/pkg/authn" - "github.com/pkg/errors" - - "github.com/buildpacks/lifecycle/cmd" ) // RegistryHandler takes care of the registry settings and checks @@ -73,8 +72,7 @@ func verifyReadAccess(imageRef string, keychain authn.Keychain, opts []imgutil.I img, _ := remote.NewImage(imageRef, keychain, opts...) canRead, err := img.CheckReadAccess() if !canRead { - cmd.DefaultLogger.Debugf("Error checking read access: %s", err) - return errors.Errorf("ensure registry read access to %s", imageRef) + return fmt.Errorf("failed to ensure registry read access to %s: %w", imageRef, err) } return nil @@ -88,8 +86,7 @@ func verifyReadWriteAccess(imageRef string, keychain authn.Keychain, opts []imgu img, _ := remote.NewImage(imageRef, keychain, opts...) canReadWrite, err := img.CheckReadWriteAccess() if !canReadWrite { - cmd.DefaultLogger.Debugf("Error checking read/write access: %s", err) - return errors.Errorf("ensure registry read/write access to %s", imageRef) + return fmt.Errorf("failed to ensure registry read/write access to %s: %w", imageRef, err) } return nil }