diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index ac27aac358..e0cdca24d0 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -15,9 +15,9 @@ jobs: steps: - uses: actions/checkout@v4 - name: Set up go - uses: actions/setup-go@v4 + uses: actions/setup-go@v5 with: - go-version: "1.20" + go-version: "1.21" - name: Set up go env run: | echo "GOPATH=$(go env GOPATH)" >> $GITHUB_ENV diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5185d34088..78d4c90755 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -72,9 +72,9 @@ jobs: } shell: powershell - name: Set up go - uses: actions/setup-go@v4 + uses: actions/setup-go@v5 with: - go-version: "1.20" + go-version: "1.21" check-latest: true - name: Set up go env for Unix if: runner.os != 'Windows' @@ -156,7 +156,7 @@ jobs: env: PACK_BUILD: ${{ github.run_number }} shell: powershell - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 if: matrix.config != 'windows-lcow' with: name: pack-${{ matrix.os }} @@ -181,9 +181,9 @@ jobs: steps: - uses: actions/checkout@v4 - name: Set up go - uses: actions/setup-go@v4 + uses: actions/setup-go@v5 with: - go-version: "1.20" + go-version: "1.21" check-latest: true - name: Build run: | @@ -191,7 +191,7 @@ jobs: env PACK_VERSION=${version} GOARCH=${{ matrix.goarch }} GOOS=${{ matrix.goos }} make build env: PACK_BUILD: ${{ github.run_number }} - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: name: pack-${{ matrix.name }} path: out/${{ env.PACK_BIN }} @@ -220,7 +220,7 @@ jobs: echo "PACK_MILESTONE=${milestone}" >> $GITHUB_ENV - name: Download artifacts - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 - name: Package artifacts - macos run: | chmod +x pack-macos/pack diff --git a/.github/workflows/check-latest-release.yml b/.github/workflows/check-latest-release.yml index 36679effdd..542e03a2e9 100644 --- a/.github/workflows/check-latest-release.yml +++ b/.github/workflows/check-latest-release.yml @@ -11,7 +11,7 @@ jobs: - ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: actions/setup-go@v4 + - uses: actions/setup-go@v5 with: go-version-file: 'go.mod' - name: Read go versions @@ -25,7 +25,7 @@ jobs: LATEST_GO_VERSION=$(go version | cut -d ' ' -f 3) - LATEST_RELEASE_VERSION=$(gh release list -L 1 | cut -d $'\t' -f 1 | cut -d ' ' -f 2) + LATEST_RELEASE_VERSION=$(gh release list --exclude-drafts --exclude-pre-releases -L 1 | cut -d $'\t' -f 1 | cut -d ' ' -f 2) wget https://github.com/$GITHUB_REPOSITORY/releases/download/$LATEST_RELEASE_VERSION/pack-$LATEST_RELEASE_VERSION-linux.tgz -O out.tgz tar xzf out.tgz diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 66f1914295..e6d39ebb4b 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -34,7 +34,7 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@v2 + uses: github/codeql-action/init@v3 with: languages: ${{ matrix.language }} # If you wish to specify custom queries, you can do so here or in a config file. @@ -45,7 +45,7 @@ jobs: # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). # If this step fails, then you should remove it and run the build manually (see below) - name: Autobuild - uses: github/codeql-action/autobuild@v2 + uses: github/codeql-action/autobuild@v3 # ℹī¸ Command-line programs to run using the OS shell. # 📚 https://git.io/JvXDl @@ -59,4 +59,4 @@ jobs: # make release - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v2 + uses: github/codeql-action/analyze@v3 diff --git a/.github/workflows/compatibility.yml b/.github/workflows/compatibility.yml index a1fa6290b4..5fe6fbb194 100644 --- a/.github/workflows/compatibility.yml +++ b/.github/workflows/compatibility.yml @@ -44,9 +44,9 @@ jobs: steps: - uses: actions/checkout@v4 - name: Set up go - uses: actions/setup-go@v4 + uses: actions/setup-go@v5 with: - go-version: "1.20" + go-version: "1.21" check-latest: true - name: Set up go env run: | diff --git a/.github/workflows/delivery-docker.yml b/.github/workflows/delivery-docker.yml index a2f9452d67..a44e2cad8a 100644 --- a/.github/workflows/delivery-docker.yml +++ b/.github/workflows/delivery-docker.yml @@ -60,7 +60,7 @@ jobs: password: ${{ secrets.DOCKER_PASSWORD }} - uses: docker/setup-qemu-action@v3 - uses: docker/setup-buildx-action@v3 - - uses: buildpacks/github-actions/setup-tools@v5.5.1 + - uses: buildpacks/github-actions/setup-tools@v5.5.2 - name: Buildx Build/Publish run: | docker buildx build . \ diff --git a/.github/workflows/delivery-release-dispatch.yml b/.github/workflows/delivery-release-dispatch.yml index 4fec0332cd..71a96be5d3 100644 --- a/.github/workflows/delivery-release-dispatch.yml +++ b/.github/workflows/delivery-release-dispatch.yml @@ -13,7 +13,7 @@ jobs: repo: ['buildpacks/docs', 'buildpacks/samples', 'buildpacks/pack-orb', 'buildpacks/github-actions'] steps: - name: Repository Dispatch - uses: peter-evans/repository-dispatch@v2 + uses: peter-evans/repository-dispatch@v3 with: token: ${{ secrets.PLATFORM_GITHUB_TOKEN }} event-type: pack-release diff --git a/Makefile b/Makefile index e7321aef8d..f30109fb33 100644 --- a/Makefile +++ b/Makefile @@ -164,8 +164,8 @@ install-golangci-lint: ## mod-tidy: Tidy Go modules mod-tidy: - $(GOCMD) mod tidy -compat=1.20 - cd tools && $(GOCMD) mod tidy -compat=1.20 + $(GOCMD) mod tidy -compat=1.21 + cd tools && $(GOCMD) mod tidy -compat=1.21 ## tidy: Tidy modules and format the code tidy: mod-tidy format diff --git a/acceptance/acceptance_test.go b/acceptance/acceptance_test.go index 6990926988..05ceea2e2f 100644 --- a/acceptance/acceptance_test.go +++ b/acceptance/acceptance_test.go @@ -2929,6 +2929,56 @@ include = [ "*.jar", "media/mountain.jpg", "/media/person.png", ] }) }) }) + + when("builder create", func() { + when("--flatten=", func() { + it("should flatten together all specified buildpacks", func() { + h.SkipIf(t, !createBuilderPack.SupportsFeature(invoke.FlattenBuilderCreationV2), "pack version <= 0.33.0 fails with this test") + h.SkipIf(t, imageManager.HostOS() == "windows", "These tests are not yet compatible with Windows-based containers") + + // create a task, handled by a 'task manager' which executes our pack commands during tests. + // looks like this is used to de-dup tasks + key := taskKey( + "create-complex-flattened-builder", + append( + []string{runImageMirror, createBuilderPackConfig.Path(), lifecycle.Identifier()}, + createBuilderPackConfig.FixturePaths()..., + )..., + ) + + builderName, err := suiteManager.RunTaskOnceString(key, func() (string, error) { + return createFlattenBuilder(t, + assert, + buildpackManager, + lifecycle, + createBuilderPack, + runImageMirror) + }) + assert.Nil(err) + + // register task to be run to 'clean up' a task + suiteManager.RegisterCleanUp("clean-"+key, func() error { + imageManager.CleanupImages(builderName) + return nil + }) + + assertImage.ExistsLocally(builderName) + + // 3 layers for runtime OS + // 1 layer setting cnb, platform, layers folders + // 1 layer for lifecycle binaries + // 1 layer for order.toml + // 1 layer for run.toml + // 1 layer for stack.toml + // 1 layer status file changed + // Base Layers = 9 + + // 1 layer for 3 flattened builpacks + // 3 layers for single buildpacks not flattened + assertImage.HasLengthLayers(builderName, 13) + }) + }) + }) }) } @@ -3315,6 +3365,157 @@ func createStackImage(dockerCli client.CommonAPIClient, repoName string, dir str })) } +func createFlattenBuilder( + t *testing.T, + assert h.AssertionManager, + buildpackManager buildpacks.BuildModuleManager, + lifecycle config.LifecycleAsset, + pack *invoke.PackInvoker, + runImageMirror string, +) (string, error) { + t.Helper() + t.Log("creating flattened builder image...") + + // CREATE TEMP WORKING DIR + tmpDir, err := os.MkdirTemp("", "create-complex-test-flattened-builder") + if err != nil { + return "", err + } + defer os.RemoveAll(tmpDir) + + // ARCHIVE BUILDPACKS + builderBuildpacks := []buildpacks.TestBuildModule{ + buildpacks.BpNoop, + buildpacks.BpNoop2, + buildpacks.BpOtherStack, + buildpacks.BpReadEnv, + } + + templateMapping := map[string]interface{}{ + "run_image_mirror": runImageMirror, + } + + packageImageName := registryConfig.RepoName("nested-level-1-buildpack-" + h.RandString(8)) + nestedLevelTwoBuildpackName := registryConfig.RepoName("nested-level-2-buildpack-" + h.RandString(8)) + simpleLayersBuildpackName := registryConfig.RepoName("simple-layers-buildpack-" + h.RandString(8)) + simpleLayersBuildpackDifferentShaName := registryConfig.RepoName("simple-layers-buildpack-different-name-" + h.RandString(8)) + + templateMapping["package_id"] = "simple/nested-level-1" + templateMapping["package_image_name"] = packageImageName + templateMapping["nested_level_1_buildpack"] = packageImageName + templateMapping["nested_level_2_buildpack"] = nestedLevelTwoBuildpackName + templateMapping["simple_layers_buildpack"] = simpleLayersBuildpackName + templateMapping["simple_layers_buildpack_different_sha"] = simpleLayersBuildpackDifferentShaName + + fixtureManager := pack.FixtureManager() + + nestedLevelOneConfigFile, err := os.CreateTemp(tmpDir, "nested-level-1-package.toml") + assert.Nil(err) + fixtureManager.TemplateFixtureToFile( + "nested-level-1-buildpack_package.toml", + nestedLevelOneConfigFile, + templateMapping, + ) + err = nestedLevelOneConfigFile.Close() + assert.Nil(err) + + nestedLevelTwoConfigFile, err := os.CreateTemp(tmpDir, "nested-level-2-package.toml") + assert.Nil(err) + fixtureManager.TemplateFixtureToFile( + "nested-level-2-buildpack_package.toml", + nestedLevelTwoConfigFile, + templateMapping, + ) + + err = nestedLevelTwoConfigFile.Close() + assert.Nil(err) + + packageImageBuildpack := buildpacks.NewPackageImage( + t, + pack, + packageImageName, + nestedLevelOneConfigFile.Name(), + buildpacks.WithRequiredBuildpacks( + buildpacks.BpNestedLevelOne, + buildpacks.NewPackageImage( + t, + pack, + nestedLevelTwoBuildpackName, + nestedLevelTwoConfigFile.Name(), + buildpacks.WithRequiredBuildpacks( + buildpacks.BpNestedLevelTwo, + buildpacks.NewPackageImage( + t, + pack, + simpleLayersBuildpackName, + fixtureManager.FixtureLocation("simple-layers-buildpack_package.toml"), + buildpacks.WithRequiredBuildpacks(buildpacks.BpSimpleLayers), + ), + ), + ), + ), + ) + + simpleLayersDifferentShaBuildpack := buildpacks.NewPackageImage( + t, + pack, + simpleLayersBuildpackDifferentShaName, + fixtureManager.FixtureLocation("simple-layers-buildpack-different-sha_package.toml"), + buildpacks.WithRequiredBuildpacks(buildpacks.BpSimpleLayersDifferentSha), + ) + + defer imageManager.CleanupImages(packageImageName, nestedLevelTwoBuildpackName, simpleLayersBuildpackName, simpleLayersBuildpackDifferentShaName) + + builderBuildpacks = append( + builderBuildpacks, + packageImageBuildpack, + simpleLayersDifferentShaBuildpack, + ) + + buildpackManager.PrepareBuildModules(tmpDir, builderBuildpacks...) + + // ADD lifecycle + if lifecycle.HasLocation() { + lifecycleURI := lifecycle.EscapedPath() + t.Logf("adding lifecycle path '%s' to builder config", lifecycleURI) + templateMapping["lifecycle_uri"] = lifecycleURI + } else { + lifecycleVersion := lifecycle.Version() + t.Logf("adding lifecycle version '%s' to builder config", lifecycleVersion) + templateMapping["lifecycle_version"] = lifecycleVersion + } + + // RENDER builder.toml + builderConfigFile, err := os.CreateTemp(tmpDir, "nested_builder.toml") + if err != nil { + return "", err + } + + pack.FixtureManager().TemplateFixtureToFile("nested_builder.toml", builderConfigFile, templateMapping) + + err = builderConfigFile.Close() + if err != nil { + return "", err + } + + // NAME BUILDER + bldr := registryConfig.RepoName("test/flatten-builder-" + h.RandString(10)) + + // CREATE BUILDER + output := pack.RunSuccessfully( + "builder", "create", bldr, + "-c", builderConfigFile.Name(), + "--no-color", + "--verbose", + "--flatten", "read/env@read-env-version,noop.buildpack@noop.buildpack.version,noop.buildpack@noop.buildpack.later-version", + ) + + assert.Contains(output, fmt.Sprintf("Successfully created builder image '%s'", bldr)) + assert.Succeeds(h.PushImage(dockerCli, bldr, registryConfig)) + + return bldr, nil +} + // taskKey creates a key from the prefix and all arguments to be unique func taskKey(prefix string, args ...string) string { hash := sha256.New() diff --git a/acceptance/assertions/output.go b/acceptance/assertions/output.go index 83279dfe60..ed7a80af22 100644 --- a/acceptance/assertions/output.go +++ b/acceptance/assertions/output.go @@ -182,7 +182,6 @@ func (o OutputAssertionManager) IncludesPrefixedGoogleBuilder() { } var herokuBuilders = []string{ - "heroku/builder:20", "heroku/builder:22", } diff --git a/acceptance/invoke/pack.go b/acceptance/invoke/pack.go index caa60f136e..e10bcdfe26 100644 --- a/acceptance/invoke/pack.go +++ b/acceptance/invoke/pack.go @@ -236,6 +236,7 @@ const ( BuildpackFlatten MetaBuildpackFolder PlatformRetries + FlattenBuilderCreationV2 ) var featureTests = map[Feature]func(i *PackInvoker) bool{ @@ -266,6 +267,9 @@ var featureTests = map[Feature]func(i *PackInvoker) bool{ PlatformRetries: func(i *PackInvoker) bool { return i.atLeast("v0.32.1") }, + FlattenBuilderCreationV2: func(i *PackInvoker) bool { + return i.atLeast("v0.33.1") + }, } func (i *PackInvoker) SupportsFeature(f Feature) bool { diff --git a/acceptance/testdata/pack_fixtures/report_output.txt b/acceptance/testdata/pack_fixtures/report_output.txt index beaae617bd..d797da13a9 100644 --- a/acceptance/testdata/pack_fixtures/report_output.txt +++ b/acceptance/testdata/pack_fixtures/report_output.txt @@ -2,7 +2,7 @@ Pack: Version: {{ .Version }} OS/Arch: {{ .OS }}/{{ .Arch }} -Default Lifecycle Version: 0.17.2 +Default Lifecycle Version: 0.18.4 Supported Platform APIs: 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 0.10, 0.11, 0.12 diff --git a/builder/buildpack_identifier.go b/builder/buildpack_identifier.go new file mode 100644 index 0000000000..b32e111dc7 --- /dev/null +++ b/builder/buildpack_identifier.go @@ -0,0 +1,5 @@ +package builder + +type BpIdentifier interface { + Id() string +} diff --git a/go.mod b/go.mod index 922ad7da0e..18ac4b6cb5 100644 --- a/go.mod +++ b/go.mod @@ -5,22 +5,22 @@ require ( github.com/Masterminds/semver v1.5.0 github.com/Microsoft/go-winio v0.6.1 github.com/apex/log v1.9.0 - github.com/buildpacks/imgutil v0.0.0-20231102131059-84d632186b59 - github.com/buildpacks/lifecycle v0.17.2 + github.com/buildpacks/imgutil v0.0.0-20240118145509-e94a1b7de8a9 + github.com/buildpacks/lifecycle v0.18.4 github.com/docker/cli v24.0.7+incompatible github.com/docker/docker v24.0.7+incompatible - github.com/docker/go-connections v0.4.0 + github.com/docker/go-connections v0.5.0 github.com/dustin/go-humanize v1.0.1 - github.com/gdamore/tcell/v2 v2.6.0 - github.com/go-git/go-git/v5 v5.10.1 + github.com/gdamore/tcell/v2 v2.7.0 + github.com/go-git/go-git/v5 v5.11.0 github.com/golang/mock v1.6.0 github.com/google/go-cmp v0.6.0 - github.com/google/go-containerregistry v0.16.1 + github.com/google/go-containerregistry v0.19.0 github.com/google/go-github/v30 v30.1.0 github.com/hectane/go-acl v0.0.0-20190604041725-da78bae5fc95 github.com/heroku/color v0.0.6 github.com/mitchellh/ioprogress v0.0.0-20180201004757-6a23b12fa88e - github.com/onsi/gomega v1.30.0 + github.com/onsi/gomega v1.31.1 github.com/opencontainers/go-digest v1.0.0 github.com/opencontainers/image-spec v1.1.0-rc5 github.com/pelletier/go-toml v1.9.5 @@ -29,12 +29,12 @@ require ( github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 github.com/sclevine/spec v1.4.0 github.com/spf13/cobra v1.8.0 - golang.org/x/crypto v0.16.0 - golang.org/x/mod v0.14.0 - golang.org/x/oauth2 v0.15.0 - golang.org/x/sync v0.5.0 - golang.org/x/sys v0.15.0 - golang.org/x/term v0.15.0 + golang.org/x/crypto v0.19.0 + golang.org/x/mod v0.15.0 + golang.org/x/oauth2 v0.17.0 + golang.org/x/sync v0.6.0 + golang.org/x/sys v0.17.0 + golang.org/x/term v0.17.0 golang.org/x/text v0.14.0 gopkg.in/yaml.v3 v3.0.1 ) @@ -53,30 +53,35 @@ require ( github.com/Azure/go-autorest/tracing v0.6.0 // indirect github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371 // indirect github.com/agext/levenshtein v1.2.3 // indirect - github.com/aws/aws-sdk-go-v2 v1.18.1 // indirect - github.com/aws/aws-sdk-go-v2/config v1.18.27 // indirect - github.com/aws/aws-sdk-go-v2/credentials v1.13.26 // indirect - github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.4 // indirect - github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.34 // indirect - github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.28 // indirect - github.com/aws/aws-sdk-go-v2/internal/ini v1.3.35 // indirect - github.com/aws/aws-sdk-go-v2/service/ecr v1.18.11 // indirect - github.com/aws/aws-sdk-go-v2/service/ecrpublic v1.16.2 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.28 // indirect - github.com/aws/aws-sdk-go-v2/service/sso v1.12.12 // indirect - github.com/aws/aws-sdk-go-v2/service/ssooidc v1.14.12 // indirect - github.com/aws/aws-sdk-go-v2/service/sts v1.19.2 // indirect - github.com/aws/smithy-go v1.13.5 // indirect - github.com/awslabs/amazon-ecr-credential-helper/ecr-login v0.0.0-20230522190001-adf1bafd791a // indirect + github.com/aws/aws-sdk-go-v2 v1.21.2 // indirect + github.com/aws/aws-sdk-go-v2/config v1.19.0 // indirect + github.com/aws/aws-sdk-go-v2/credentials v1.13.43 // indirect + github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.13 // indirect + github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.43 // indirect + github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.37 // indirect + github.com/aws/aws-sdk-go-v2/internal/ini v1.3.45 // indirect + github.com/aws/aws-sdk-go-v2/service/ecr v1.20.2 // indirect + github.com/aws/aws-sdk-go-v2/service/ecrpublic v1.18.2 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.37 // indirect + github.com/aws/aws-sdk-go-v2/service/sso v1.15.2 // indirect + github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.3 // indirect + github.com/aws/aws-sdk-go-v2/service/sts v1.23.2 // indirect + github.com/aws/smithy-go v1.15.0 // indirect + github.com/awslabs/amazon-ecr-credential-helper/ecr-login v0.0.0-20231003182221-725682229e60 // indirect + github.com/beorn7/perks v1.0.1 // indirect + github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/chrismellard/docker-credential-acr-env v0.0.0-20230304212654-82a0ddb27589 // indirect - github.com/cloudflare/circl v1.3.3 // indirect - github.com/containerd/containerd v1.7.2 // indirect + github.com/cloudflare/circl v1.3.7 // indirect + github.com/containerd/containerd v1.7.7 // indirect + github.com/containerd/log v0.1.0 // indirect github.com/containerd/stargz-snapshotter/estargz v0.14.3 // indirect github.com/containerd/typeurl v1.0.2 // indirect github.com/cyphar/filepath-securejoin v0.2.4 // indirect github.com/dimchansky/utfbom v1.1.1 // indirect - github.com/docker/distribution v2.8.2+incompatible // indirect - github.com/docker/docker-credential-helpers v0.7.0 // indirect + github.com/distribution/reference v0.5.0 // indirect + github.com/docker/distribution v2.8.3+incompatible // indirect + github.com/docker/docker-credential-helpers v0.8.0 // indirect + github.com/docker/go-metrics v0.0.1 // indirect github.com/docker/go-units v0.5.0 // indirect github.com/emirpasic/gods v1.18.1 // indirect github.com/gdamore/encoding v1.0.0 // indirect @@ -87,38 +92,47 @@ require ( github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/protobuf v1.5.3 // indirect github.com/google/go-querystring v1.1.0 // indirect - github.com/google/uuid v1.3.0 // indirect + github.com/google/uuid v1.4.0 // indirect + github.com/gorilla/mux v1.8.0 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/kevinburke/ssh_config v1.2.0 // indirect - github.com/klauspost/compress v1.16.5 // indirect + github.com/klauspost/compress v1.17.1 // indirect github.com/lucasb-eyer/go-colorful v1.2.0 // indirect github.com/mattn/go-colorable v0.1.13 // indirect - github.com/mattn/go-isatty v0.0.19 // indirect - github.com/mattn/go-runewidth v0.0.14 // indirect + github.com/mattn/go-isatty v0.0.20 // indirect + github.com/mattn/go-runewidth v0.0.15 // indirect + github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect - github.com/moby/buildkit v0.11.6 // indirect - github.com/moby/patternmatcher v0.5.0 // indirect + github.com/moby/buildkit v0.12.2 // indirect + github.com/moby/patternmatcher v0.6.0 // indirect github.com/moby/sys/sequential v0.5.0 // indirect github.com/moby/term v0.5.0 // indirect github.com/morikuni/aec v1.0.0 // indirect - github.com/opencontainers/runc v1.1.7 // indirect + github.com/opencontainers/runc v1.1.9 // indirect github.com/opencontainers/selinux v1.11.0 // indirect github.com/pjbgf/sha1cd v0.3.0 // indirect + github.com/prometheus/client_golang v1.17.0 // indirect + github.com/prometheus/client_model v0.5.0 // indirect + github.com/prometheus/common v0.44.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect github.com/rivo/uniseg v0.4.3 // indirect github.com/sergi/go-diff v1.2.0 // indirect github.com/sirupsen/logrus v1.9.3 // indirect github.com/skeema/knownhosts v1.2.1 // indirect github.com/spf13/pflag v1.0.5 // indirect - github.com/vbatts/tar-split v0.11.3 // indirect + github.com/vbatts/tar-split v0.11.5 // indirect github.com/xanzy/ssh-agent v0.3.3 // indirect - golang.org/x/net v0.19.0 // indirect - golang.org/x/tools v0.13.0 // indirect - google.golang.org/appengine v1.6.7 // indirect + golang.org/x/net v0.21.0 // indirect + golang.org/x/tools v0.16.1 // indirect + google.golang.org/appengine v1.6.8 // indirect google.golang.org/protobuf v1.31.0 // indirect gopkg.in/warnings.v0 v0.1.2 // indirect gotest.tools/v3 v3.4.0 // indirect ) -go 1.20 +go 1.21 + +// Pin moby/buildkit until docker/docker is upgraded +replace github.com/moby/buildkit => github.com/moby/buildkit v0.11.6 diff --git a/go.sum b/go.sum index ad486a673b..bd8463bfeb 100644 --- a/go.sum +++ b/go.sum @@ -1,6 +1,7 @@ dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk= dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= -github.com/AdaLogics/go-fuzz-headers v0.0.0-20230106234847-43070de90fa1 h1:EKPd1INOIyr5hWOWhvpmQpY6tKjeG0hT1s3AMC/9fic= +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/Azure/azure-sdk-for-go v68.0.0+incompatible h1:fcYLmCpyNYRnvJbPerq7U0hS+6+I79yEDJBqVNcqUzU= github.com/Azure/azure-sdk-for-go v68.0.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 h1:L/gRVlceqvL25UVaW/CKtUDjefjrs0SPonmDGUVOYP0= @@ -28,7 +29,6 @@ github.com/Azure/go-autorest/logger v0.2.1 h1:IG7i4p/mDa2Ce4TRyAO8IHnVhAVF3RFU+Z github.com/Azure/go-autorest/logger v0.2.1/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= 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 v1.2.1/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/BurntSushi/toml v1.3.2 h1:o7IhLm0Msx3BaB+n3Ag7L8EVlByGnpq14C4YWiu/gL8= github.com/BurntSushi/toml v1.3.2/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/Masterminds/semver v1.5.0 h1:H65muMkzWKEuNDnfl9d70GUjFniHKHRbFPGBuZ3QEww= @@ -36,104 +36,111 @@ github.com/Masterminds/semver v1.5.0/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF0 github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v8QkMxJ6pZY= 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.10.0-rc.8 h1:YSZVvlIIDD1UxQpJp0h+dnpLUw+TrY0cx8obKsp3bek= +github.com/Microsoft/hcsshim v0.11.4 h1:68vKo2VN8DE9AdN4tnkWnmdhqdbpUFM8OF3Airm7fz8= +github.com/Microsoft/hcsshim v0.11.4/go.mod h1:smjE4dvqPX9Zldna+t5FG3rnoHhaB7QYxPRqGcpAD9w= github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371 h1:kkhsdkhsCvIsutKu5zLMgWtgh9YxGCNAw8Ad8hjwfYg= github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371/go.mod h1:EjAoLdwvbIOoOQr3ihjnSoLZRtE8azugULFRteWMNc0= 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= +github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be h1:9AeTilPcZAjCFIImctFaOjnTIavg87rW78vTPkQqLI8= +github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be/go.mod h1:ySMOLuWl6zY27l47sB3qLNK6tF2fkHG55UZxx8oIVo4= github.com/apex/log v1.9.0 h1:FHtw/xuaM8AgmvDDTI9fiwoAL25Sq2cxojnZICUU8l0= github.com/apex/log v1.9.0/go.mod h1:m82fZlWIuiWzWP04XCTXmnX0xRkYYbCdYn8jbJeLBEA= github.com/apex/logs v1.0.0/go.mod h1:XzxuLZ5myVHDy9SAmYpamKKRNApGj54PfYLcFrXqDwo= 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/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= +github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= github.com/aws/aws-sdk-go v1.20.6/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= -github.com/aws/aws-sdk-go-v2 v1.18.0/go.mod h1:uzbQtefpm44goOPmdKyAlXSNcwlRgF3ePWVW6EtJvvw= -github.com/aws/aws-sdk-go-v2 v1.18.1 h1:+tefE750oAb7ZQGzla6bLkOwfcQCEtC5y2RqoqCeqKo= -github.com/aws/aws-sdk-go-v2 v1.18.1/go.mod h1:uzbQtefpm44goOPmdKyAlXSNcwlRgF3ePWVW6EtJvvw= -github.com/aws/aws-sdk-go-v2/config v1.18.22/go.mod h1:mN7Li1wxaPxSSy4Xkr6stFuinJGf3VZW3ZSNvO0q6sI= -github.com/aws/aws-sdk-go-v2/config v1.18.27 h1:Az9uLwmssTE6OGTpsFqOnaGpLnKDqNYOJzWuC6UAYzA= -github.com/aws/aws-sdk-go-v2/config v1.18.27/go.mod h1:0My+YgmkGxeqjXZb5BYme5pc4drjTnM+x1GJ3zv42Nw= -github.com/aws/aws-sdk-go-v2/credentials v1.13.21/go.mod h1:90Dk1lJoMyspa/EDUrldTxsPns0wn6+KpRKpdAWc0uA= -github.com/aws/aws-sdk-go-v2/credentials v1.13.26 h1:qmU+yhKmOCyujmuPY7tf5MxR/RKyZrOPO3V4DobiTUk= -github.com/aws/aws-sdk-go-v2/credentials v1.13.26/go.mod h1:GoXt2YC8jHUBbA4jr+W3JiemnIbkXOfxSXcisUsZ3os= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.3/go.mod h1:4Q0UFP0YJf0NrsEuEYHpM9fTSEVnD16Z3uyEF7J9JGM= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.4 h1:LxK/bitrAr4lnh9LnIS6i7zWbCOdMsfzKFBI6LUCS0I= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.4/go.mod h1:E1hLXN/BL2e6YizK1zFlYd8vsfi2GTjbjBazinMmeaM= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.33/go.mod h1:7i0PF1ME/2eUPFcjkVIwq+DOygHEoK92t5cDqNgYbIw= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.34 h1:A5UqQEmPaCFpedKouS4v+dHCTUo2sKqhoKO9U5kxyWo= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.34/go.mod h1:wZpTEecJe0Btj3IYnDx/VlUzor9wm3fJHyvLpQF0VwY= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.27/go.mod h1:UrHnn3QV/d0pBZ6QBAEQcqFLf8FAzLmoUfPVIueOvoM= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.28 h1:srIVS45eQuewqz6fKKu6ZGXaq6FuFg5NzgQBAM6g8Y4= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.28/go.mod h1:7VRpKQQedkfIEXb4k52I7swUnZP0wohVajJMRn3vsUw= -github.com/aws/aws-sdk-go-v2/internal/ini v1.3.34/go.mod h1:Etz2dj6UHYuw+Xw830KfzCfWGMzqvUTCjUj5b76GVDc= -github.com/aws/aws-sdk-go-v2/internal/ini v1.3.35 h1:LWA+3kDM8ly001vJ1X1waCuLJdtTl48gwkPKWy9sosI= -github.com/aws/aws-sdk-go-v2/internal/ini v1.3.35/go.mod h1:0Eg1YjxE0Bhn56lx+SHJwCzhW+2JGtizsrx+lCqrfm0= -github.com/aws/aws-sdk-go-v2/service/ecr v1.18.10/go.mod h1:Ce1q2jlNm8BVpjLaOnwnm5v2RClAbK6txwPljFzyW6c= -github.com/aws/aws-sdk-go-v2/service/ecr v1.18.11 h1:wlTgmb/sCmVRJrN5De3CiHj4v/bTCgL5+qpdEd0CPtw= -github.com/aws/aws-sdk-go-v2/service/ecr v1.18.11/go.mod h1:Ce1q2jlNm8BVpjLaOnwnm5v2RClAbK6txwPljFzyW6c= -github.com/aws/aws-sdk-go-v2/service/ecrpublic v1.16.1/go.mod h1:uHtRE7aqXNmpeYL+7Ec7LacH5zC9+w2T5MBOeEKDdu0= -github.com/aws/aws-sdk-go-v2/service/ecrpublic v1.16.2 h1:yflJrGmi1pXtP9lOpOeaNZyc0vXnJTuP2sor3nJcGGo= -github.com/aws/aws-sdk-go-v2/service/ecrpublic v1.16.2/go.mod h1:uHtRE7aqXNmpeYL+7Ec7LacH5zC9+w2T5MBOeEKDdu0= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.27/go.mod h1:EOwBD4J4S5qYszS5/3DpkejfuK+Z5/1uzICfPaZLtqw= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.28 h1:bkRyG4a929RCnpVSTvLM2j/T4ls015ZhhYApbmYs15s= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.28/go.mod h1:jj7znCIg05jXlaGBlFMGP8+7UN3VtCkRBG2spnmRQkU= -github.com/aws/aws-sdk-go-v2/service/sso v1.12.9/go.mod h1:ouy2P4z6sJN70fR3ka3wD3Ro3KezSxU6eKGQI2+2fjI= -github.com/aws/aws-sdk-go-v2/service/sso v1.12.12 h1:nneMBM2p79PGWBQovYO/6Xnc2ryRMw3InnDJq1FHkSY= -github.com/aws/aws-sdk-go-v2/service/sso v1.12.12/go.mod h1:HuCOxYsF21eKrerARYO6HapNeh9GBNq7fius2AcwodY= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.14.9/go.mod h1:AFvkxc8xfBe8XA+5St5XIHHrQQtkxqrRincx4hmMHOk= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.14.12 h1:2qTR7IFk7/0IN/adSFhYu9Xthr0zVFTgBrmPldILn80= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.14.12/go.mod h1:E4VrHCPzmVB/KFXtqBGKb3c8zpbNBgKe3fisDNLAW5w= -github.com/aws/aws-sdk-go-v2/service/sts v1.18.10/go.mod h1:BgQOMsg8av8jset59jelyPW7NoZcZXLVpDsXunGDrk8= -github.com/aws/aws-sdk-go-v2/service/sts v1.19.2 h1:XFJ2Z6sNUUcAz9poj+245DMkrHE4h2j5I9/xD50RHfE= -github.com/aws/aws-sdk-go-v2/service/sts v1.19.2/go.mod h1:dp0yLPsLBOi++WTxzCjA/oZqi6NPIhoR+uF7GeMU9eg= -github.com/aws/smithy-go v1.13.5 h1:hgz0X/DX0dGqTYpGALqXJoRKRj5oQ7150i5FdTePzO8= -github.com/aws/smithy-go v1.13.5/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= -github.com/awslabs/amazon-ecr-credential-helper/ecr-login v0.0.0-20230522190001-adf1bafd791a h1:rW+dV12c0WD3+O4Zs8Qt4+oqnr8ecXeyg8g3yB73ZKA= -github.com/awslabs/amazon-ecr-credential-helper/ecr-login v0.0.0-20230522190001-adf1bafd791a/go.mod h1:1mvdZLjy932pV2fhj1jjwUSHaF5Ogq2gk5bvi/6ngEU= +github.com/aws/aws-sdk-go-v2 v1.21.2 h1:+LXZ0sgo8quN9UOKXXzAWRT3FWd4NxeXWOZom9pE7GA= +github.com/aws/aws-sdk-go-v2 v1.21.2/go.mod h1:ErQhvNuEMhJjweavOYhxVkn2RUx7kQXVATHrjKtxIpM= +github.com/aws/aws-sdk-go-v2/config v1.19.0 h1:AdzDvwH6dWuVARCl3RTLGRc4Ogy+N7yLFxVxXe1ClQ0= +github.com/aws/aws-sdk-go-v2/config v1.19.0/go.mod h1:ZwDUgFnQgsazQTnWfeLWk5GjeqTQTL8lMkoE1UXzxdE= +github.com/aws/aws-sdk-go-v2/credentials v1.13.43 h1:LU8vo40zBlo3R7bAvBVy/ku4nxGEyZe9N8MqAeFTzF8= +github.com/aws/aws-sdk-go-v2/credentials v1.13.43/go.mod h1:zWJBz1Yf1ZtX5NGax9ZdNjhhI4rgjfgsyk6vTY1yfVg= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.13 h1:PIktER+hwIG286DqXyvVENjgLTAwGgoeriLDD5C+YlQ= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.13/go.mod h1:f/Ib/qYjhV2/qdsf79H3QP/eRE4AkVyEf6sk7XfZ1tg= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.43 h1:nFBQlGtkbPzp/NjZLuFxRqmT91rLJkgvsEQs68h962Y= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.43/go.mod h1:auo+PiyLl0n1l8A0e8RIeR8tOzYPfZZH/JNlrJ8igTQ= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.37 h1:JRVhO25+r3ar2mKGP7E0LDl8K9/G36gjlqca5iQbaqc= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.37/go.mod h1:Qe+2KtKml+FEsQF/DHmDV+xjtche/hwoF75EG4UlHW8= +github.com/aws/aws-sdk-go-v2/internal/ini v1.3.45 h1:hze8YsjSh8Wl1rYa1CJpRmXP21BvOBuc76YhW0HsuQ4= +github.com/aws/aws-sdk-go-v2/internal/ini v1.3.45/go.mod h1:lD5M20o09/LCuQ2mE62Mb/iSdSlCNuj6H5ci7tW7OsE= +github.com/aws/aws-sdk-go-v2/service/ecr v1.20.2 h1:y6LX9GUoEA3mO0qpFl1ZQHj1rFyPWVphlzebiSt2tKE= +github.com/aws/aws-sdk-go-v2/service/ecr v1.20.2/go.mod h1:Q0LcmaN/Qr8+4aSBrdrXXePqoX0eOuYpJLbYpilmWnA= +github.com/aws/aws-sdk-go-v2/service/ecrpublic v1.18.2 h1:PpbXaecV3sLAS6rjQiaKw4/jyq3Z8gNzmoJupHAoBp0= +github.com/aws/aws-sdk-go-v2/service/ecrpublic v1.18.2/go.mod h1:fUHpGXr4DrXkEDpGAjClPsviWf+Bszeb0daKE0blxv8= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.37 h1:WWZA/I2K4ptBS1kg0kV1JbBtG/umed0vwHRrmcr9z7k= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.37/go.mod h1:vBmDnwWXWxNPFRMmG2m/3MKOe+xEcMDo1tanpaWCcck= +github.com/aws/aws-sdk-go-v2/service/sso v1.15.2 h1:JuPGc7IkOP4AaqcZSIcyqLpFSqBWK32rM9+a1g6u73k= +github.com/aws/aws-sdk-go-v2/service/sso v1.15.2/go.mod h1:gsL4keucRCgW+xA85ALBpRFfdSLH4kHOVSnLMSuBECo= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.3 h1:HFiiRkf1SdaAmV3/BHOFZ9DjFynPHj8G/UIO1lQS+fk= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.3/go.mod h1:a7bHA82fyUXOm+ZSWKU6PIoBxrjSprdLoM8xPYvzYVg= +github.com/aws/aws-sdk-go-v2/service/sts v1.23.2 h1:0BkLfgeDjfZnZ+MhB3ONb01u9pwFYTCZVhlsSSBvlbU= +github.com/aws/aws-sdk-go-v2/service/sts v1.23.2/go.mod h1:Eows6e1uQEsc4ZaHANmsPRzAKcVDrcmjjWiih2+HUUQ= +github.com/aws/smithy-go v1.15.0 h1:PS/durmlzvAFpQHDs4wi4sNNP9ExsqZh6IlfdHXgKK8= +github.com/aws/smithy-go v1.15.0/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= +github.com/awslabs/amazon-ecr-credential-helper/ecr-login v0.0.0-20231003182221-725682229e60 h1:ONd54l3oubhjMPcj7HpjPWvlFI6WXsu0/W7DsKCPI9w= +github.com/awslabs/amazon-ecr-credential-helper/ecr-login v0.0.0-20231003182221-725682229e60/go.mod h1:eSn65Noe23f/Z7A2ESqw3dbhAFSEyzZf38nXcKVNxtE= github.com/aybabtme/rgbterm v0.0.0-20170906152045-cc83f3b3ce59/go.mod h1:q/89r3U2H7sSsE2t6Kca0lfwTK8JdoNGS/yzM/4iH5I= -github.com/buildpacks/imgutil v0.0.0-20231102131059-84d632186b59 h1:5g+dMdOO6Ufx/bDa5gUH/Aw9FN6wt7T3HzKSkHVvue4= -github.com/buildpacks/imgutil v0.0.0-20231102131059-84d632186b59/go.mod h1:PsazEB9yz+NG/cgm0Z1oQ0Xq6rD/U7eNMt5Su41afYY= -github.com/buildpacks/lifecycle v0.17.2 h1:CfJYWHIC5v996idgjDamYHBTk+G+c1Qt7Yk80MlbWpw= -github.com/buildpacks/lifecycle v0.17.2/go.mod h1:h8MrqltqMM+HQnn2F2JOQaKWmeybZ54qvlNV3pAiAqw= +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= +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-20240118145509-e94a1b7de8a9 h1:kxe31xfMWJAIAzDfGQ3lL0j8QSSRfEHyLg7dRWIHA8I= +github.com/buildpacks/imgutil v0.0.0-20240118145509-e94a1b7de8a9/go.mod h1:PsazEB9yz+NG/cgm0Z1oQ0Xq6rD/U7eNMt5Su41afYY= +github.com/buildpacks/lifecycle v0.18.4 h1:LGl/4guzU+57hn08W8RwjLLizYtuNfCZHtxn8TP2+bE= +github.com/buildpacks/lifecycle v0.18.4/go.mod h1:DxxfyFaCi9ovbbP2fhcKBlImfbTPiPEtM5UqSlD1TJ8= github.com/bwesterb/go-ristretto v1.2.3/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0= +github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= +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/cloudflare/circl v1.3.3 h1:fE/Qz0QdIGqeWfnwq0RE0R7MI51s0M2E4Ga9kq5AEMs= github.com/cloudflare/circl v1.3.3/go.mod h1:5XYMA4rFBvNIrhs50XuiBJ15vF2pZn4nnUKZrLbUZFA= -github.com/containerd/containerd v1.7.2 h1:UF2gdONnxO8I6byZXDi5sXWiWvlW3D/sci7dTQimEJo= -github.com/containerd/containerd v1.7.2/go.mod h1:afcz74+K10M/+cjGHIVQrCt3RAQhUSCAjJ9iMYhhkuI= +github.com/cloudflare/circl v1.3.7 h1:qlCDlTPz2n9fu58M0Nh1J/JzcFpfgkFHHX3O35r5vcU= +github.com/cloudflare/circl v1.3.7/go.mod h1:sRTcRWXGLrKw6yIGJ+l7amYJFfAXbZG0kBSc8r4zxgA= +github.com/containerd/containerd v1.7.7 h1:QOC2K4A42RQpcrZyptP6z9EJZnlHfHJUfZrAAHe15q4= +github.com/containerd/containerd v1.7.7/go.mod h1:3c4XZv6VeT9qgf9GMTxNTMFxGJrGpI2vz1yk4ye+YY8= +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.14.3 h1:OqlDCK3ZVUO6C3B/5FSkDwbkEETK84kQgEeFwDC+62k= github.com/containerd/stargz-snapshotter/estargz v0.14.3/go.mod h1:KY//uOCIkSuNAHhJogcZtrNHdKrA99/FCCRjE3HD36o= github.com/containerd/typeurl v1.0.2 h1:Chlt8zIieDbzQFzXzAeBEF92KhExuE4p9p92/QmY7aY= github.com/containerd/typeurl v1.0.2/go.mod h1:9trJWW2sRlGub4wZJRTW83VtbOLS6hwcDZXTn6oPz9s= -github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.18 h1:n56/Zwd5o6whRC5PMGretI4IdRLlmBXYNjScPaBgsbY= +github.com/creack/pty v1.1.18/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4= github.com/cyphar/filepath-securejoin v0.2.4 h1:Ugdm7cg7i6ZK6x3xDF1oEu1nfkyfH53EtKeQYTC3kyg= github.com/cyphar/filepath-securejoin v0.2.4/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4= -github.com/danieljoos/wincred v1.1.2/go.mod h1:GijpziifJoIBfYh+S7BbkdUTU4LfM+QnGqR5Vl2tAx0= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/dimchansky/utfbom v1.1.1 h1:vV6w1AhK4VMnhBno/TPVCoK9U/LP0PkLCS9tbxHdi/U= github.com/dimchansky/utfbom v1.1.1/go.mod h1:SxdoEBH5qIqFocHMyGOXVAybYJdr71b1Q/j0mACtrfE= +github.com/distribution/reference v0.5.0 h1:/FUIFXtfc/x2gpa5/VGfiGLuOIdYa1t65IKK2OFGvA0= +github.com/distribution/reference v0.5.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= github.com/docker/cli v24.0.7+incompatible h1:wa/nIwYFW7BVTGa7SWPVyyXU9lgORqUb1xfI36MSkFg= github.com/docker/cli v24.0.7+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= -github.com/docker/distribution v2.8.2+incompatible h1:T3de5rq0dB1j30rp0sA2rER+m322EBzniBPB6ZIzuh8= -github.com/docker/distribution v2.8.2+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= +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 v24.0.7+incompatible h1:Wo6l37AuwP3JaMnZa226lzVXGA3F9Ig1seQen0cKYlM= github.com/docker/docker v24.0.7+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= -github.com/docker/docker-credential-helpers v0.7.0 h1:xtCHsjxogADNZcdv1pKUHXryefjlVRqWqIhk/uXJp0A= -github.com/docker/docker-credential-helpers v0.7.0/go.mod h1:rETQfLdHNT3foU5kuNkFR1R1V12OJRRO5lzt2D1b5X0= -github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= -github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= +github.com/docker/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= +github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6GLaXnqyDdmEXc= +github.com/docker/go-metrics v0.0.1 h1:AgB/0SvBxihN0X8OR4SjsblXkbMvalQ8cjmtKQ2rQV8= +github.com/docker/go-metrics v0.0.1/go.mod h1:cG1hvH2utMXtqgqqYE9plW6lDxS3/5ayHzueweSI3Vw= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= +github.com/docker/libtrust v0.0.0-20160708172513-aabc10ec26b7 h1:UhxFibDNY/bfvqU5CAUmr9zpesgbU6SWc8/B4mflAE4= +github.com/docker/libtrust v0.0.0-20160708172513-aabc10ec26b7/go.mod h1:cyGadeNEkKy96OOhEzfZl+yxihPEzKnqJwvfuSUqbZE= github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= github.com/elazarl/goproxy v0.0.0-20230808193330-2592e75ae04a h1:mATvB/9r/3gvcejNsXKSkQ6lcIaNec2nyfOdlTBR2lU= +github.com/elazarl/goproxy v0.0.0-20230808193330-2592e75ae04a/go.mod h1:Ro8st/ElPeALwNFlcTpWmkr6IoMFfkjXAvTHpevnDsM= github.com/emirpasic/gods v1.18.1 h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc= github.com/emirpasic/gods v1.18.1/go.mod h1:8tpGGwCnJ5H4r6BWwaV6OrWmMoPhUl5jm/FMNAnJvWQ= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= @@ -141,19 +148,27 @@ github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMo github.com/gdamore/encoding v1.0.0 h1:+7OoQ1Bc6eTm5niUzBa0Ctsh6JbMW6Ra+YNuAtDBdko= github.com/gdamore/encoding v1.0.0/go.mod h1:alR0ol34c49FCSBLjhosxzcPHQbf2trDkoo5dl+VrEg= github.com/gdamore/tcell/v2 v2.4.1-0.20210905002822-f057f0a857a1/go.mod h1:Az6Jt+M5idSED2YPGtwnfJV0kXohgdCBPmHGSYc1r04= -github.com/gdamore/tcell/v2 v2.6.0 h1:OKbluoP9VYmJwZwq/iLb4BxwKcwGthaa1YNBJIyCySg= -github.com/gdamore/tcell/v2 v2.6.0/go.mod h1:be9omFATkdr0D9qewWW3d+MEvl5dha+Etb5y65J2H8Y= +github.com/gdamore/tcell/v2 v2.7.0 h1:I5LiGTQuwrysAt1KS9wg1yFfOI3arI3ucFrxtd/xqaA= +github.com/gdamore/tcell/v2 v2.7.0/go.mod h1:hl/KtAANGBecfIPxk+FzKvThTqI84oplgbPEmVX60b8= github.com/gliderlabs/ssh v0.3.5 h1:OcaySEmAQJgyYcArR+gGGTHCyE7nvhEMTlYY+Dp8CpY= +github.com/gliderlabs/ssh v0.3.5/go.mod h1:8XB4KraRrX39qHhT6yxPsHedjA08I/uBVwj4xC+/+z4= github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 h1:+zs/tPmkDkHx3U66DAb0lQFJrpS6731Oaa12ikc+DiI= github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376/go.mod h1:an3vInlBmSxCcxctByoQdvwPiA7DTK7jaaFDBTtu0ic= github.com/go-git/go-billy/v5 v5.5.0 h1:yEY4yhzCDuMGSv83oGxiBotRzhwhNr8VZyphhiu+mTU= github.com/go-git/go-billy/v5 v5.5.0/go.mod h1:hmexnoNsr2SJU1Ju67OaNz5ASJY3+sHgFRpCtpDCKow= github.com/go-git/go-git-fixtures/v4 v4.3.2-0.20231010084843-55a94097c399 h1:eMje31YglSBqCdIqdhKBW8lokaMrL3uTkpGYlE2OOT4= -github.com/go-git/go-git/v5 v5.10.1 h1:tu8/D8i+TWxgKpzQ3Vc43e+kkhXqtsZCKI/egajKnxk= -github.com/go-git/go-git/v5 v5.10.1/go.mod h1:uEuHjxkHap8kAl//V5F/nNWwqIYtP/402ddd05mp0wg= +github.com/go-git/go-git-fixtures/v4 v4.3.2-0.20231010084843-55a94097c399/go.mod h1:1OCfN199q1Jm3HZlxleg+Dw/mwps2Wbk9frAWm+4FII= +github.com/go-git/go-git/v5 v5.11.0 h1:XIZc1p+8YzypNr34itUfSvYJcv+eYdTnTvOZ2vD3cA4= +github.com/go-git/go-git/v5 v5.11.0/go.mod h1:6GFcX2P3NM7FPBfpePbpLd21XxsgdAt+lKqXmCUiUCY= +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= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= -github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= +github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= +github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= +github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls= +github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang-jwt/jwt/v4 v4.0.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= @@ -168,24 +183,30 @@ github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5y github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= 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/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= 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.16.1 h1:rUEt426sR6nyrL3gt+18ibRcvYpKYdpsa5ZW7MA08dQ= -github.com/google/go-containerregistry v0.16.1/go.mod h1:u0qB2l7mvtWVR5kNcbFIhFY1hLbf8eeGapA+vbFDCtQ= +github.com/google/go-containerregistry v0.19.0 h1:uIsMRBV7m/HDkDxE/nXMnv1q+lOOSPlQ/ywc5JbB8Ic= +github.com/google/go-containerregistry v0.19.0/go.mod h1:u0qB2l7mvtWVR5kNcbFIhFY1hLbf8eeGapA+vbFDCtQ= github.com/google/go-github/v30 v30.1.0 h1:VLDx+UolQICEOKu2m4uAoMti1SxuEBAl7RSEG16L+Oo= github.com/google/go-github/v30 v30.1.0/go.mod h1:n8jBpHl45a/rlBUtRJMOG4GhNADUQFEufcolZ95JfU8= github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8= github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU= +github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38 h1:yAJXTCF9TqKcTiHJAE8dj7HMvPfh66eeA2JYW7eFpSE= +github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= -github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.4.0 h1:MtMxsa51/r9yyhkyLsVeVt0B+BGQZzpQiTQ4eHZ8bc4= +github.com/google/uuid v1.4.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= +github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= github.com/hectane/go-acl v0.0.0-20190604041725-da78bae5fc95 h1:S4qyfL2sEm5Budr4KVMyEniCy+PbS55651I/a+Kn/NQ= github.com/hectane/go-acl v0.0.0-20190604041725-da78bae5fc95/go.mod h1:QiyDdbZLaJ/mZP4Zwc9g2QsfaEA4o7XvvgZegSci5/E= github.com/heroku/color v0.0.6 h1:UTFFMrmMLFcL3OweqP1lAdp8i1y/9oHqkeHjQ/b/Ny0= @@ -201,19 +222,25 @@ github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHW github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8= github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= github.com/jpillora/backoff v0.0.0-20180909062703-3050d21c67d7/go.mod h1:2iMrUgbbvHEiQClaW2NsSzMyGHqN+rDFqY705q49KG0= +github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= +github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/kevinburke/ssh_config v1.2.0 h1:x584FjTGwHzMwvHx18PXxbBVzfnxogHaAReU4gf13a4= github.com/kevinburke/ssh_config v1.2.0/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/klauspost/compress v1.16.5 h1:IFV2oUNUzZaz+XyusxpLzpzS8Pt5rh0Z16For/djlyI= -github.com/klauspost/compress v1.16.5/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= +github.com/klauspost/compress v1.17.1 h1:NE3C767s2ak2bweCZo3+rdP4U/HoyVXLv/X9f2gPS5g= +github.com/klauspost/compress v1.17.1/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= +github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/lucasb-eyer/go-colorful v1.2.0 h1:1nnpGOrhyZZuNyfu1QjKiUICQ74+3FNCN69Aj6K7nkY= github.com/lucasb-eyer/go-colorful v1.2.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0= github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ= @@ -223,11 +250,14 @@ github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovk github.com/mattn/go-isatty v0.0.5/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= -github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA= -github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= +github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= -github.com/mattn/go-runewidth v0.0.14 h1:+xnbZSEeDbOIg5/mE6JF0w6n9duR1l3/WmbinWVwUuU= -github.com/mattn/go-runewidth v0.0.14/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= +github.com/mattn/go-runewidth v0.0.15 h1:UNAjwbU9l54TA3KzvqLGxwWjHmMgBUVhBiTjelZgg3U= +github.com/mattn/go-runewidth v0.0.15/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= +github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= +github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= +github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE= github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= @@ -235,37 +265,62 @@ github.com/mitchellh/ioprogress v0.0.0-20180201004757-6a23b12fa88e h1:Qa6dnn8Dla github.com/mitchellh/ioprogress v0.0.0-20180201004757-6a23b12fa88e/go.mod h1:waEya8ee1Ro/lgxpVhkJI4BVASzkm3UZqkx/cFJiYHM= github.com/moby/buildkit v0.11.6 h1:VYNdoKk5TVxN7k4RvZgdeM4GOyRvIi4Z8MXOY7xvyUs= github.com/moby/buildkit v0.11.6/go.mod h1:GCqKfHhz+pddzfgaR7WmHVEE3nKKZMMDPpK8mh3ZLv4= -github.com/moby/patternmatcher v0.5.0 h1:YCZgJOeULcxLw1Q+sVR636pmS7sPEn1Qo2iAN6M7DBo= -github.com/moby/patternmatcher v0.5.0/go.mod h1:hDPoyOpDY7OrrMDLaYoY3hf52gNCR/YOUYxkhApJIxc= +github.com/moby/patternmatcher v0.6.0 h1:GmP9lR19aU5GqSSFko+5pRqHi+Ohk1O69aFiKkVGiPk= +github.com/moby/patternmatcher v0.6.0/go.mod h1:hDPoyOpDY7OrrMDLaYoY3hf52gNCR/YOUYxkhApJIxc= github.com/moby/sys/sequential v0.5.0 h1:OPvI35Lzn9K04PBbCLW0g4LcFAJgHsvXsRyewg5lXtc= github.com/moby/sys/sequential v0.5.0/go.mod h1:tH2cOOs5V9MlPiXcQzRC+eEyab644PWKGRYaaV5ZZlo= github.com/moby/term v0.5.0 h1:xt8Q1nalod/v7BqbG21f8mQPqH+xAaC9C3N3wfWbVP0= github.com/moby/term v0.5.0/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y= +github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= +github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/onsi/ginkgo v1.6.0 h1:Ix8l273rp3QzYgXSR+c8d1fTG7UPgYkOSELPhiY/YGw= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo/v2 v2.13.0 h1:0jY9lJquiL8fcf3M4LAXN5aMlS/b2BV86HFFPCPMgE4= +github.com/onsi/ginkgo/v2 v2.15.0 h1:79HwNRBAZHOEwrczrgSOPy+eFTTlIGELKy5as+ClttY= +github.com/onsi/ginkgo/v2 v2.15.0/go.mod h1:HlxMHtYF57y6Dpf+mc5529KKmSq9h2FpCF+/ZkwUxKM= github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/onsi/gomega v1.30.0 h1:hvMK7xYz4D3HapigLTeGdId/NcfQx1VHMJc60ew99+8= -github.com/onsi/gomega v1.30.0/go.mod h1:9sxs+SwGrKI0+PWe4Fxa9tFQQBG5xSsSbMXOI8PPpoQ= +github.com/onsi/gomega v1.31.1 h1:KYppCUK+bUgAZwHOu7EXVBKyQA6ILvOESHkn/tgoqvo= +github.com/onsi/gomega v1.31.1/go.mod h1:y40C95dwAD1Nz36SsEnxvfFe8FFfNxzI5eJ0EYGyAy0= 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/runc v1.1.7 h1:y2EZDS8sNng4Ksf0GUYNhKbTShZJPJg1FiXJNH/uoCk= -github.com/opencontainers/runc v1.1.7/go.mod h1:CbUumNnWCuTGFukNXahoo/RFBZvDAgRh/smNYNOhA50= +github.com/opencontainers/runc v1.1.9 h1:XR0VIHTGce5eWPkaPesqTBrhW2yAcaraWfsEalNwQLM= +github.com/opencontainers/runc v1.1.9/go.mod h1:CbUumNnWCuTGFukNXahoo/RFBZvDAgRh/smNYNOhA50= github.com/opencontainers/selinux v1.11.0 h1:+5Zbo97w3Lbmb3PeqQtpmTkMwsW5nRI3YaLpt7tQ7oU= github.com/opencontainers/selinux v1.11.0/go.mod h1:E5dMC3VPuVvVHDYmi78qvhJp8+M586T4DlDRYpFkyec= github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8= github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= github.com/pjbgf/sha1cd v0.3.0 h1:4D5XXmUUBUl/xQ6IjCkEAbqXskkq/4O7LmGn0AqMDs4= github.com/pjbgf/sha1cd v0.3.0/go.mod h1:nZ1rrWOcGJ5uZgEEVL1VUM9iRQiZvWdbZjkKyFzPPsI= +github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= +github.com/prometheus/client_golang v1.1.0/go.mod h1:I1FGZT9+L76gKKOs5djB6ezCbFQP1xR9D75/vuwEF3g= +github.com/prometheus/client_golang v1.17.0 h1:rl2sfwZMtSthVU752MqfjQozy7blglC+1SOtjMAMh+Q= +github.com/prometheus/client_golang v1.17.0/go.mod h1:VeL+gMmOAxkS2IqfCq0ZmHSL+LjWfWDUmp1mBz9JgUY= +github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.5.0 h1:VQw1hfvPvk3Uv6Qf29VrPF32JB6rtbgI6cYPYQjL0Qw= +github.com/prometheus/client_model v0.5.0/go.mod h1:dTiFglRmd66nLR9Pv9f0mZi7B7fk5Pm3gvsjB5tr+kI= +github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.6.0/go.mod h1:eBmuwkDJBwy6iBfxCBob6t6dR6ENT/y+J+Zk0j9GMYc= +github.com/prometheus/common v0.44.0 h1:+5BrQJwiBB9xsMygAB3TNvpQKOwlkc25LbISbrdOOfY= +github.com/prometheus/common v0.44.0/go.mod h1:ofAIvZbQ1e/nugmZGz4/qCb9Ap1VoSTIO7x0VV9VvuY= +github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/procfs v0.0.3/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ= +github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= +github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= github.com/rivo/tview v0.0.0-20220307222120-9994674d60a8 h1:xe+mmCnDN82KhC010l3NfYlA8ZbOuzbXAzSYBa6wbMc= github.com/rivo/tview v0.0.0-20220307222120-9994674d60a8/go.mod h1:WIfMkQNY+oq/mWwtsjOYHIZBuwthioY2srOmljJkTnk= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= @@ -273,6 +328,7 @@ github.com/rivo/uniseg v0.4.3 h1:utMvzDsuh3suAEnhH0RdHmoPbU648o6CvXxTx4SBMOw= github.com/rivo/uniseg v0.4.3/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= github.com/rogpeppe/fastuuid v1.1.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= +github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 h1:OkMGxebDjyw0ULyrTYWeN0UNCCkmCWfjPnIA2W6oviI= github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06/go.mod h1:+ePHsJ1keEjQtpvf9HHw0f4ZeJ0TLRsxhunSI2hYJSs= @@ -281,8 +337,8 @@ github.com/sclevine/spec v1.4.0/go.mod h1:LvpgJaFyvQzRvc1kaDs0bulYwzC70PbiYjC4Qn github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ= github.com/sergi/go-diff v1.2.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= +github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= -github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/skeema/knownhosts v1.2.1 h1:SHWdIUa82uGZz+F+47k8SY4QhhI291cXCpopT1lK2AQ= @@ -295,6 +351,7 @@ github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyh github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= @@ -304,9 +361,9 @@ github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.8.3 h1:RP3t2pwF7cMEbC1dqtB6poj3niw/9gnV4Cjg5oW5gtY= +github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/tj/assert v0.0.0-20171129193455-018094318fb0/go.mod h1:mZ9/Rh9oLWpLLDRpvE+3b7gP/C2YyLFYxNmcLnPTMe0= github.com/tj/assert v0.0.3 h1:Df/BlaZ20mq6kuai7f5z2TvPFiwC3xaWJSDQNiIS3Rk= github.com/tj/assert v0.0.3/go.mod h1:Ne6X72Q+TB1AteidzQncjw9PabbMp4PBMZ1k+vd1Pvk= @@ -314,15 +371,15 @@ github.com/tj/go-buffer v1.1.0/go.mod h1:iyiJpfFcR2B9sXu7KvjbT9fpM4mOelRSDTbntVj github.com/tj/go-elastic v0.0.0-20171221160941-36157cbbebc2/go.mod h1:WjeM0Oo1eNAjXGDx2yma7uG2XoyRZTq1uv3M/o7imD0= github.com/tj/go-kinesis v0.0.0-20171128231115-08b17f58cb1b/go.mod h1:/yhzCV0xPfx6jb1bBgRFjl5lytqVqZXEaeqWP8lTEao= github.com/tj/go-spin v1.1.0/go.mod h1:Mg1mzmePZm4dva8Qz60H2lHwmJ2loum4VIrLgVnKwh4= -github.com/urfave/cli v1.22.12/go.mod h1:sSBEIC79qR6OvcmsD4U3KABeOTxDqQtdDnaFuUN30b8= -github.com/vbatts/tar-split v0.11.3 h1:hLFqsOLQ1SsppQNTMpkpPXClLDfC2A3Zgy9OUU+RVck= -github.com/vbatts/tar-split v0.11.3/go.mod h1:9QlHN18E+fEH7RdG+QAJJcuya3rqT7eXSTY7wGrAokY= +github.com/vbatts/tar-split v0.11.5 h1:3bHCTIheBm1qFTcgh9oPu+nNBtX+XJIupG/vacinCts= +github.com/vbatts/tar-split v0.11.5/go.mod h1:yZbwRsSeGjusneWgA781EKej9HF8vme8okylkAeNKLk= github.com/xanzy/ssh-agent v0.3.3 h1:+/15pJfg/RsTxqYcX6fHqOXZwwMP+2VyYWJeWM2qQFM= github.com/xanzy/ssh-agent v0.3.3/go.mod h1:6dzNDKs0J9rVPHPhaGCukekBHKqfl+L3KghI1Bc68Uw= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= +golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190426145343-a29dc8fdc734/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= @@ -334,19 +391,20 @@ golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0 golang.org/x/crypto v0.3.1-0.20221117191849-2c476679df9a/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= -golang.org/x/crypto v0.16.0 h1:mMMrFzRSCF0GvB7Ne27XVtVAaXLrPmgPC7/v0tkwHaY= -golang.org/x/crypto v0.16.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= +golang.org/x/crypto v0.19.0 h1:ENy+Az/9Y1vSrlrvBSyna3PITt4tiZLf7sgCjZBX7Wo= +golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU= 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.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -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.15.0 h1:SernR4v+D55NyBH2QiEQrlBAnj1ECL6AGrA5+dPaMY8= +golang.org/x/mod v0.15.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= @@ -357,25 +415,30 @@ golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= -golang.org/x/net v0.19.0 h1:zTwKpTd2XuCqf8huc7Fo2iSy+4RHPd10s4KzeTnVr1c= -golang.org/x/net v0.19.0/go.mod h1:CfAk/cbD4CthTvqiEl8NpboMuiuOYsAr/7NOjZJtv1U= +golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= +golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.15.0 h1:s8pnnxNVzjWyrvYdFUQq5llS1PX2zhPXmccZv99h7uQ= -golang.org/x/oauth2 v0.15.0/go.mod h1:q48ptWNTY5XWf+JNten23lcvHpLJ0ZSxF5ttTHKVCAM= +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/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= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.5.0 h1:60k92dhOjHxJkrqnwsfl8KuaHbn/5dl0lUPUklKo3qE= -golang.org/x/sync v0.5.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ= +golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190529164535-6a60838ec259/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190801041406-cbf593c0f2f3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -387,19 +450,17 @@ golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210819135213-f52c844e1c1c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220825204002-c680a09ffe64/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220906165534-d0df966e6959/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.3.0/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.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc= golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= +golang.org/x/sys v0.17.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-20201210144234-2321bbc49cbf/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= @@ -407,19 +468,22 @@ golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuX golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= -golang.org/x/term v0.15.0 h1:y/Oo/a/q3IXu26lQgl04j/gjuBDOBlx7X6Om1j2CPW4= golang.org/x/term v0.15.0/go.mod h1:BDl952bC7+uMoWR75FIrCDx79TPU9oHkTZ9yRbYOrX0= +golang.org/x/term v0.17.0 h1:mkTF7LCd6WGJNL3K1Ad7kwxNfYAW6a8a8QqtMblp/4U= +golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= 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.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= 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/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= +golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= @@ -428,22 +492,24 @@ golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= 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.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= -golang.org/x/tools v0.13.0 h1:Iey4qkscZuv0VvIt8E0neZjtPVQFSc870HQ448QgEmQ= -golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= +golang.org/x/tools v0.16.1 h1:TLyB3WofjdOEepBHAU20JdNC1Zbg87elYofWYAY5oZA= +golang.org/x/tools v0.16.1/go.mod h1:kYVVN6I1mBNoB1OX+noeBjbRk4IUEPa7JJ+TJMEooJ0= 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.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= -google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= +google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= 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.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +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= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/warnings.v0 v0.1.2 h1:wFXVbFY8DY5/xOe1ECiWdKCzZlxgshcYVNkBHstARME= diff --git a/internal/build/fakes/fake_builder.go b/internal/build/fakes/fake_builder.go index 2bcd9db86a..6cdbe4c51c 100644 --- a/internal/build/fakes/fake_builder.go +++ b/internal/build/fakes/fake_builder.go @@ -122,3 +122,9 @@ func WithBuilder(builder *FakeBuilder) func(*build.LifecycleOptions) { opts.Builder = builder } } + +func WithMacAddresss(macAddresss string) func(*build.LifecycleOptions) { + return func(opts *build.LifecycleOptions) { + opts.MacAddress = macAddresss + } +} diff --git a/internal/build/lifecycle_executor.go b/internal/build/lifecycle_executor.go index 66574b9040..89de72a0f3 100644 --- a/internal/build/lifecycle_executor.go +++ b/internal/build/lifecycle_executor.go @@ -98,6 +98,7 @@ type LifecycleOptions struct { Workspace string GID int UID int + MacAddress string PreviousImage string ReportDestinationDir string SBOMDestinationDir string diff --git a/internal/build/phase_config_provider.go b/internal/build/phase_config_provider.go index 1ab35f6f1c..ad8c3af56d 100644 --- a/internal/build/phase_config_provider.go +++ b/internal/build/phase_config_provider.go @@ -47,6 +47,11 @@ func NewPhaseConfigProvider(name string, lifecycleExec *LifecycleExecution, ops provider.ctrConf.Image = lifecycleExec.opts.Builder.Name() provider.ctrConf.Labels = map[string]string{"author": "pack"} + if lifecycleExec.opts.MacAddress != "" { + provider.ctrConf.MacAddress = lifecycleExec.opts.MacAddress + lifecycleExec.logger.Debugf("MAC Address: %s", style.Symbol(lifecycleExec.opts.MacAddress)) + } + if lifecycleExec.os == "windows" { provider.hostConf.Isolation = container.IsolationProcess } diff --git a/internal/build/phase_config_provider_test.go b/internal/build/phase_config_provider_test.go index ed54a6ea1e..07a92239e8 100644 --- a/internal/build/phase_config_provider_test.go +++ b/internal/build/phase_config_provider_test.go @@ -75,6 +75,17 @@ func testPhaseConfigProvider(t *testing.T, when spec.G, it spec.S) { }) }) + when("mac address is set", func() { + it("should set MacAddress in LifecycleOptions", func() { + expectedMacAddress := "01:23:45:67:89:ab" + lifecycle := newTestLifecycleExec(t, false, "some-temp-dir", fakes.WithMacAddresss(expectedMacAddress)) + + phaseConfigProvider := build.NewPhaseConfigProvider("some-name", lifecycle) + + h.AssertEq(t, phaseConfigProvider.ContainerConfig().MacAddress, expectedMacAddress) + }) + }) + when("building with interactive mode", func() { it("returns a phase config provider with interactive args", func() { handler := func(bodyChan <-chan container.WaitResponse, errChan <-chan error, reader io.Reader) error { diff --git a/internal/builder/builder.go b/internal/builder/builder.go index 32906973bc..88330845f2 100644 --- a/internal/builder/builder.go +++ b/internal/builder/builder.go @@ -68,24 +68,23 @@ const ( // Builder represents a pack builder, used to build images type Builder struct { - baseImageName string - buildConfigEnv map[string]string - image imgutil.Image - layerWriterFactory archive.TarWriterFactory - lifecycle Lifecycle - lifecycleDescriptor LifecycleDescriptor - additionalBuildpacks buildpack.ManagedCollection - additionalExtensions buildpack.ManagedCollection - flattenExcludeBuildpacks []string - metadata Metadata - mixins []string - env map[string]string - uid, gid int - StackID string - replaceOrder bool - order dist.Order - orderExtensions dist.Order - validateMixins bool + baseImageName string + buildConfigEnv map[string]string + image imgutil.Image + layerWriterFactory archive.TarWriterFactory + lifecycle Lifecycle + lifecycleDescriptor LifecycleDescriptor + additionalBuildpacks buildpack.ManagedCollection + additionalExtensions buildpack.ManagedCollection + metadata Metadata + mixins []string + env map[string]string + uid, gid int + StackID string + replaceOrder bool + order dist.Order + orderExtensions dist.Order + validateMixins bool } type orderTOML struct { @@ -103,8 +102,8 @@ type moduleWithDiffID struct { type BuilderOption func(*options) error type options struct { - flatten bool - exclude []string + toFlatten buildpack.FlattenModuleInfos + labels map[string]string } // FromImage constructs a builder from a builder image @@ -141,18 +140,24 @@ func constructBuilder(img imgutil.Image, newName string, errOnMissingLabel bool, return nil, err } + for labelKey, labelValue := range opts.labels { + err = img.SetLabel(labelKey, labelValue) + if err != nil { + return nil, errors.Wrapf(err, "adding label %s=%s", labelKey, labelValue) + } + } + bldr := &Builder{ - baseImageName: img.Name(), - image: img, - layerWriterFactory: layerWriterFactory, - metadata: metadata, - lifecycleDescriptor: constructLifecycleDescriptor(metadata), - env: map[string]string{}, - buildConfigEnv: map[string]string{}, - validateMixins: true, - additionalBuildpacks: *buildpack.NewModuleManager(opts.flatten), - additionalExtensions: *buildpack.NewModuleManager(opts.flatten), - flattenExcludeBuildpacks: opts.exclude, + baseImageName: img.Name(), + image: img, + layerWriterFactory: layerWriterFactory, + metadata: metadata, + lifecycleDescriptor: constructLifecycleDescriptor(metadata), + env: map[string]string{}, + buildConfigEnv: map[string]string{}, + validateMixins: true, + additionalBuildpacks: buildpack.NewManagedCollectionV2(opts.toFlatten), + additionalExtensions: buildpack.NewManagedCollectionV2(opts.toFlatten), } if err := addImgLabelsToBuildr(bldr); err != nil { @@ -166,17 +171,16 @@ func constructBuilder(img imgutil.Image, newName string, errOnMissingLabel bool, return bldr, nil } -func FlattenAll() BuilderOption { +func WithFlattened(modules buildpack.FlattenModuleInfos) BuilderOption { return func(o *options) error { - o.flatten = true + o.toFlatten = modules return nil } } -func DoNotFlatten(exclude []string) BuilderOption { +func WithLabels(labels map[string]string) BuilderOption { return func(o *options) error { - o.flatten = true - o.exclude = exclude + o.labels = labels return nil } } @@ -306,14 +310,14 @@ func (b *Builder) AllModules(kind string) []buildpack.BuildModule { return b.moduleManager(kind).AllModules() } -func (b *Builder) moduleManager(kind string) *buildpack.ManagedCollection { +func (b *Builder) moduleManager(kind string) buildpack.ManagedCollection { switch kind { case buildpack.KindBuildpack: - return &b.additionalBuildpacks + return b.additionalBuildpacks case buildpack.KindExtension: - return &b.additionalExtensions + return b.additionalExtensions } - return &buildpack.ManagedCollection{} + return nil } func (b *Builder) FlattenedModules(kind string) [][]buildpack.BuildModule { @@ -662,7 +666,6 @@ func (b *Builder) addFlattenedModules(kind string, logger logging.Logger, tmpDir ) buildModuleWriter := buildpack.NewBuildModuleWriter(logger, b.layerWriterFactory) - excludedModules := buildpack.Set(b.flattenExcludeBuildpacks) for i, additionalModules := range flattenModules { modFlattenTmpDir := filepath.Join(tmpDir, fmt.Sprintf("%s-%s-flatten", kind, strconv.Itoa(i))) @@ -670,7 +673,7 @@ func (b *Builder) addFlattenedModules(kind string, logger logging.Logger, tmpDir return nil, errors.Wrap(err, "creating flatten temp dir") } - finalTarPath, buildModuleExcluded, err = buildModuleWriter.NToLayerTar(modFlattenTmpDir, fmt.Sprintf("%s-flatten-%s", kind, strconv.Itoa(i)), additionalModules, excludedModules) + finalTarPath, buildModuleExcluded, err = buildModuleWriter.NToLayerTar(modFlattenTmpDir, fmt.Sprintf("%s-flatten-%s", kind, strconv.Itoa(i)), additionalModules, nil) if err != nil { return nil, errors.Wrapf(err, "writing layer %s", finalTarPath) } diff --git a/internal/builder/builder_test.go b/internal/builder/builder_test.go index abdfa8120f..80d39d03ff 100644 --- a/internal/builder/builder_test.go +++ b/internal/builder/builder_test.go @@ -1852,6 +1852,7 @@ func testBuilder(t *testing.T, when spec.G, it spec.S) { var ( bldr *builder.Builder builderImage imgutil.Image + deps []buildpack.BuildModule ) it.Before(func() { @@ -1869,16 +1870,50 @@ func testBuilder(t *testing.T, when spec.G, it spec.S) { )) builderImage = baseImage + deps = []buildpack.BuildModule{bp2v1, bp1v2} }) - when("all", func() { + when("buildpacks to be flattened are NOT defined", func() { it.Before(func() { var err error - bldr, err = builder.New(builderImage, "some-builder", builder.FlattenAll()) + bldr, err = builder.New(builderImage, "some-builder") h.AssertNil(t, err) - // Let's add some buildpacks - deps := []buildpack.BuildModule{bp2v1, bp1v2} + // Let's add the buildpacks + bldr.AddBuildpacks(bp1v1, deps) + }) + + when("#FlattenedModules", func() { + it("it return an empty array", func() { + h.AssertEq(t, len(bldr.FlattenedModules(buildpack.KindBuildpack)), 0) + }) + }) + + when("#AllModules", func() { + it("it returns each buildpack individually", func() { + h.AssertEq(t, len(bldr.AllModules(buildpack.KindBuildpack)), 3) + }) + }) + + when("#ShouldFlatten", func() { + it("it returns false for each buildpack", func() { + h.AssertFalse(t, bldr.ShouldFlatten(bp1v1)) + h.AssertFalse(t, bldr.ShouldFlatten(bp2v1)) + h.AssertFalse(t, bldr.ShouldFlatten(bp1v2)) + }) + }) + }) + + when("buildpacks to be flattened are defined", func() { + it.Before(func() { + var err error + flattenModules, err := buildpack.ParseFlattenBuildModules([]string{"buildpack-1-id@buildpack-1-version-1,buildpack-1-id@buildpack-1-version-2,buildpack-2-id@buildpack-2-version-1"}) + h.AssertNil(t, err) + + bldr, err = builder.New(builderImage, "some-builder", builder.WithFlattened(flattenModules)) + h.AssertNil(t, err) + + // Let's add the buildpacks bldr.AddBuildpacks(bp1v1, deps) }) @@ -1904,6 +1939,34 @@ func testBuilder(t *testing.T, when spec.G, it spec.S) { }) }) }) + + when("labels", func() { + var ( + customLabels, imageLabels map[string]string + err error + ) + it.Before(func() { + h.AssertNil(t, baseImage.SetEnv("CNB_USER_ID", "1234")) + h.AssertNil(t, baseImage.SetEnv("CNB_GROUP_ID", "4321")) + h.AssertNil(t, baseImage.SetLabel("io.buildpacks.stack.id", "some.stack.id")) + h.AssertNil(t, baseImage.SetLabel("io.buildpacks.stack.mixins", `["mixinX", "mixinY", "build:mixinA"]`)) + }) + + it.After(func() { + h.AssertNilE(t, baseImage.Cleanup()) + }) + + it("should set labels to the image", func() { + customLabels = map[string]string{"test.label.one": "1", "test.label.two": "2"} + subject, err = builder.New(baseImage, "some/builder", builder.WithLabels(customLabels)) + h.AssertNil(t, err) + + imageLabels, err = baseImage.Labels() + h.AssertNil(t, err) + h.AssertEq(t, imageLabels["test.label.one"], "1") + h.AssertEq(t, imageLabels["test.label.two"], "2") + }) + }) } func assertImageHasBPLayer(t *testing.T, image *fakes.Image, bp buildpack.BuildModule) { diff --git a/internal/builder/suggested_builder.go b/internal/builder/known_builder.go similarity index 75% rename from internal/builder/suggested_builder.go rename to internal/builder/known_builder.go index 9495ce0a5b..5d07b8abd6 100644 --- a/internal/builder/suggested_builder.go +++ b/internal/builder/known_builder.go @@ -1,45 +1,61 @@ package builder -type SuggestedBuilder struct { +type KnownBuilder struct { Vendor string Image string DefaultDescription string + Suggested bool + Trusted bool } -var SuggestedBuilders = []SuggestedBuilder{ +var KnownBuilders = []KnownBuilder{ { Vendor: "Google", Image: "gcr.io/buildpacks/builder:v1", DefaultDescription: "GCP Builder for all runtimes", + Suggested: true, + Trusted: true, }, { Vendor: "Heroku", Image: "heroku/builder:22", DefaultDescription: "Heroku-22 (Ubuntu 22.04) base image with buildpacks for Go, Java, Node.js, PHP, Python, Ruby & Scala", + Suggested: true, + Trusted: true, }, { Vendor: "Heroku", Image: "heroku/builder:20", DefaultDescription: "Heroku-20 (Ubuntu 20.04) base image with buildpacks for Go, Java, Node.js, PHP, Python, Ruby & Scala", + Suggested: false, + Trusted: true, }, { Vendor: "Paketo Buildpacks", Image: "paketobuildpacks/builder-jammy-base", DefaultDescription: "Small base image with buildpacks for Java, Node.js, Golang, .NET Core, Python & Ruby", + Suggested: true, + Trusted: true, }, { Vendor: "Paketo Buildpacks", Image: "paketobuildpacks/builder-jammy-full", DefaultDescription: "Larger base image with buildpacks for Java, Node.js, Golang, .NET Core, Python, Ruby, & PHP", + Suggested: true, + Trusted: true, }, { Vendor: "Paketo Buildpacks", Image: "paketobuildpacks/builder-jammy-tiny", DefaultDescription: "Tiny base image (jammy build image, distroless run image) with buildpacks for Golang & Java", + Suggested: true, + Trusted: true, }, { Vendor: "Paketo Buildpacks", Image: "paketobuildpacks/builder-jammy-buildpackless-static", DefaultDescription: "Static base image (jammy build image, distroless run image) suitable for static binaries like Go or Rust", + Suggested: true, + Trusted: true, }, } diff --git a/internal/builder/lifecycle.go b/internal/builder/lifecycle.go index 6c3193d47b..c87d14ff0f 100644 --- a/internal/builder/lifecycle.go +++ b/internal/builder/lifecycle.go @@ -14,7 +14,7 @@ import ( // A snapshot of the latest tested lifecycle version values const ( - DefaultLifecycleVersion = "0.17.2" + DefaultLifecycleVersion = "0.18.4" DefaultBuildpackAPIVersion = "0.2" ) diff --git a/internal/commands/build.go b/internal/commands/build.go index ff6e960489..f5a6f37f86 100644 --- a/internal/commands/build.go +++ b/internal/commands/build.go @@ -3,6 +3,7 @@ package commands import ( "os" "path/filepath" + "regexp" "strconv" "strings" "time" @@ -49,6 +50,7 @@ type BuildFlags struct { Workspace string GID int UID int + MacAddress string PreviousImage string SBOMDestinationDir string ReportDestinationDir string @@ -57,6 +59,8 @@ type BuildFlags struct { PostBuildpacks []string } +var macAddressRegex = regexp.MustCompile(`^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})$`) + // Build an image from source code func Build(logger logging.Logger, cfg config.Config, packClient PackClient) *cobra.Command { var flags BuildFlags @@ -185,6 +189,7 @@ func Build(logger logging.Logger, cfg config.Config, packClient PackClient) *cob LifecycleImage: lifecycleImage, GroupID: gid, UserID: uid, + MacAddress: flags.MacAddress, PreviousImage: inputPreviousImage.Name(), Interactive: flags.Interactive, SBOMDestinationDir: flags.SBOMDestinationDir, @@ -266,6 +271,7 @@ This option may set DOCKER_HOST environment variable for the build container if cmd.Flags().StringVar(&buildFlags.Workspace, "workspace", "", "Location at which to mount the app dir in the build image") cmd.Flags().IntVar(&buildFlags.GID, "gid", 0, `Override GID of user's group in the stack's build and run images. The provided value must be a positive number`) cmd.Flags().IntVar(&buildFlags.UID, "uid", 0, `Override UID of user in the stack's build and run images. The provided value must be a positive number`) + cmd.Flags().StringVar(&buildFlags.MacAddress, "mac-address", "", "MAC address to set for the build container network configuration") cmd.Flags().StringVar(&buildFlags.PreviousImage, "previous-image", "", "Set previous image to a particular tag reference, digest reference, or (when performing a daemon build) image ID") cmd.Flags().StringVar(&buildFlags.SBOMDestinationDir, "sbom-output-dir", "", "Path to export SBoM contents.\nOmitting the flag will yield no SBoM content.") cmd.Flags().StringVar(&buildFlags.ReportDestinationDir, "report-output-dir", "", "Path to export build report.toml.\nOmitting the flag yield no report file.") @@ -306,6 +312,10 @@ func validateBuildFlags(flags *BuildFlags, cfg config.Config, inputImageRef clie return errors.New("uid flag must be in the range of 0-2147483647") } + if flags.MacAddress != "" && !isValidMacAddress(flags.MacAddress) { + return errors.New("invalid MAC address provided") + } + if flags.Interactive && !cfg.Experimental { return client.NewExperimentError("Interactive mode is currently experimental.") } @@ -380,3 +390,7 @@ func parseProjectToml(appPath, descriptorPath string) (projectTypes.Descriptor, descriptor, err := project.ReadProjectDescriptor(actualPath) return descriptor, actualPath, err } + +func isValidMacAddress(macAddress string) bool { + return macAddressRegex.MatchString(macAddress) +} diff --git a/internal/commands/build_test.go b/internal/commands/build_test.go index 6a59810004..c3afe2d60c 100644 --- a/internal/commands/build_test.go +++ b/internal/commands/build_test.go @@ -763,6 +763,37 @@ builder = "my-builder" }) }) + when("mac-address flag is provided", func() { + when("mac-address is a valid value", func() { + it("should set MacAddress in BuildOptions", func() { + mockClient.EXPECT(). + Build(gomock.Any(), EqBuildOptionsWithMacAddress("01:23:45:67:89:ab")). + Return(nil) + + command.SetArgs([]string{"--builder", "my-builder", "image", "--mac-address", "01:23:45:67:89:ab"}) + h.AssertNil(t, command.Execute()) + }) + }) + when("mac-address is an invalid value", func() { + it("should throw an error", func() { + command.SetArgs([]string{"--builder", "my-builder", "image", "--mac-address", "invalid-mac"}) + err := command.Execute() + h.AssertError(t, err, "invalid MAC address") + }) + }) + }) + + when("mac-address flag is not provided", func() { + it("should not set MacAddress in BuildOptions", func() { + mockClient.EXPECT(). + Build(gomock.Any(), EqBuildOptionsWithMacAddress("")). + Return(nil) + + command.SetArgs([]string{"--builder", "my-builder", "image"}) + h.AssertNil(t, command.Execute()) + }) + }) + when("previous-image flag is provided", func() { when("image is invalid", func() { it("error must be thrown", func() { @@ -1076,6 +1107,15 @@ func EqBuildOptionsWithOverrideGroupID(gid int) gomock.Matcher { } } +func EqBuildOptionsWithMacAddress(macAddress string) gomock.Matcher { + return buildOptionsMatcher{ + description: fmt.Sprintf("MacAddress=%s", macAddress), + equals: func(o client.BuildOptions) bool { + return o.MacAddress == macAddress + }, + } +} + func EqBuildOptionsWithPreviousImage(prevImage string) gomock.Matcher { return buildOptionsMatcher{ description: fmt.Sprintf("Previous image=%s", prevImage), diff --git a/internal/commands/builder_create.go b/internal/commands/builder_create.go index 647892c827..56ac071fe2 100644 --- a/internal/commands/builder_create.go +++ b/internal/commands/builder_create.go @@ -3,7 +3,6 @@ package commands import ( "fmt" "path/filepath" - "strings" "github.com/pkg/errors" "github.com/spf13/cobra" @@ -11,6 +10,7 @@ import ( "github.com/buildpacks/pack/builder" "github.com/buildpacks/pack/internal/config" "github.com/buildpacks/pack/internal/style" + "github.com/buildpacks/pack/pkg/buildpack" "github.com/buildpacks/pack/pkg/client" "github.com/buildpacks/pack/pkg/image" "github.com/buildpacks/pack/pkg/logging" @@ -18,12 +18,12 @@ import ( // BuilderCreateFlags define flags provided to the CreateBuilder command type BuilderCreateFlags struct { - Flatten bool Publish bool BuilderTomlPath string Registry string Policy string - FlattenExclude []string + Flatten []string + Label map[string]string } // CreateBuilder creates a builder image, based on a builder config @@ -82,6 +82,11 @@ Creating a custom builder allows you to control what buildpacks are used and wha return err } + toFlatten, err := buildpack.ParseFlattenBuildModules(flags.Flatten) + if err != nil { + return err + } + imageName := args[0] if err := pack.CreateBuilder(cmd.Context(), client.CreateBuilderOptions{ RelativeBaseDir: relativeBaseDir, @@ -91,8 +96,8 @@ Creating a custom builder allows you to control what buildpacks are used and wha Publish: flags.Publish, Registry: flags.Registry, PullPolicy: pullPolicy, - Flatten: flags.Flatten, - FlattenExclude: flags.FlattenExclude, + Flatten: toFlatten, + Labels: flags.Label, }); err != nil { return err } @@ -109,8 +114,8 @@ Creating a custom builder allows you to control what buildpacks are used and wha cmd.Flags().StringVarP(&flags.BuilderTomlPath, "config", "c", "", "Path to builder TOML file (required)") cmd.Flags().BoolVar(&flags.Publish, "publish", false, "Publish the builder directly to the container registry specified in , instead of the daemon.") cmd.Flags().StringVar(&flags.Policy, "pull-policy", "", "Pull policy to use. Accepted values are always, never, and if-not-present. The default is always") - cmd.Flags().BoolVar(&flags.Flatten, "flatten", false, "Flatten each composite buildpack into a single layer") - cmd.Flags().StringSliceVarP(&flags.FlattenExclude, "flatten-exclude", "e", nil, "Buildpacks to exclude from flattening, in the form of '@'") + cmd.Flags().StringArrayVar(&flags.Flatten, "flatten", nil, "List of buildpacks to flatten together into a single layer (format: '@,@'") + cmd.Flags().StringToStringVarP(&flags.Label, "label", "l", nil, "Labels to add to the builder image, in the form of '='") AddHelpFlag(cmd, "create") return cmd @@ -133,13 +138,5 @@ func validateCreateFlags(flags *BuilderCreateFlags, cfg config.Config) error { return errors.Errorf("Please provide a builder config path, using --config.") } - if flags.Flatten && len(flags.FlattenExclude) > 0 { - for _, exclude := range flags.FlattenExclude { - if strings.Count(exclude, "@") != 1 { - return errors.Errorf("invalid format %s; please use '@' to exclude buildpack from flattening", exclude) - } - } - } - return nil } diff --git a/internal/commands/builder_create_test.go b/internal/commands/builder_create_test.go index 4ddf115b32..b89e7ab534 100644 --- a/internal/commands/builder_create_test.go +++ b/internal/commands/builder_create_test.go @@ -408,20 +408,36 @@ func testCreateCommand(t *testing.T, when spec.G, it spec.S) { }) }) - when("flatten is set to true", func() { + when("--flatten", func() { it.Before(func() { h.AssertNil(t, os.WriteFile(builderConfigPath, []byte(validConfig), 0666)) }) - when("flatten exclude doesn't have format @", func() { + when("requested buildpack doesn't have format @", func() { it("errors with a descriptive message", func() { command.SetArgs([]string{ "some/builder", "--config", builderConfigPath, - "--flatten", - "--flatten-exclude", "some-buildpack", + "--flatten", "some-buildpack", }) - h.AssertError(t, command.Execute(), fmt.Sprintf("invalid format %s; please use '@' to exclude buildpack from flattening", "some-buildpack")) + h.AssertError(t, command.Execute(), fmt.Sprintf("invalid format %s; please use '@' to add buildpacks to be flattened", "some-buildpack")) + }) + }) + }) + + when("--label", func() { + when("can not be parsed", func() { + it("errors with a descriptive message", func() { + cmd := packageCommand() + cmd.SetArgs([]string{ + "some/builder", + "--config", builderConfigPath, + "--label", "name+value", + }) + + err := cmd.Execute() + h.AssertNotNil(t, err) + h.AssertError(t, err, "invalid argument \"name+value\" for \"-l, --label\" flag: name+value must be formatted as key=value") }) }) }) diff --git a/internal/commands/builder_inspect_test.go b/internal/commands/builder_inspect_test.go index aef3b4b242..73a18a1c34 100644 --- a/internal/commands/builder_inspect_test.go +++ b/internal/commands/builder_inspect_test.go @@ -254,7 +254,6 @@ func testBuilderInspectCommand(t *testing.T, when spec.G, it spec.S) { assert.Matches(outBuf.String(), regexp.MustCompile(`Paketo Buildpacks:\s+'paketobuildpacks/builder-jammy-base'`)) assert.Matches(outBuf.String(), regexp.MustCompile(`Paketo Buildpacks:\s+'paketobuildpacks/builder-jammy-full'`)) - assert.Matches(outBuf.String(), regexp.MustCompile(`Heroku:\s+'heroku/builder:20'`)) assert.Matches(outBuf.String(), regexp.MustCompile(`Heroku:\s+'heroku/builder:22'`)) }) }) diff --git a/internal/commands/builder_suggest_test.go b/internal/commands/builder_suggest_test.go index f12bb0b164..75a9db7aff 100644 --- a/internal/commands/builder_suggest_test.go +++ b/internal/commands/builder_suggest_test.go @@ -47,7 +47,7 @@ func testSuggestCommand(t *testing.T, when spec.G, it spec.S) { }) it("displays descriptions from metadata", func() { - commands.WriteSuggestedBuilder(logger, mockClient, []bldr.SuggestedBuilder{{ + commands.WriteSuggestedBuilder(logger, mockClient, []bldr.KnownBuilder{{ Vendor: "Builder", Image: "gcr.io/some/builder:latest", DefaultDescription: "Default description", @@ -65,7 +65,7 @@ func testSuggestCommand(t *testing.T, when spec.G, it spec.S) { }) it("displays default descriptions", func() { - commands.WriteSuggestedBuilder(logger, mockClient, []bldr.SuggestedBuilder{{ + commands.WriteSuggestedBuilder(logger, mockClient, []bldr.KnownBuilder{{ Vendor: "Builder", Image: "gcr.io/some/builder:latest", DefaultDescription: "Default description", @@ -81,7 +81,7 @@ func testSuggestCommand(t *testing.T, when spec.G, it spec.S) { }) it("displays default descriptions", func() { - commands.WriteSuggestedBuilder(logger, mockClient, []bldr.SuggestedBuilder{{ + commands.WriteSuggestedBuilder(logger, mockClient, []bldr.KnownBuilder{{ Vendor: "Builder", Image: "gcr.io/some/builder:latest", DefaultDescription: "Default description", diff --git a/internal/commands/config_trusted_builder.go b/internal/commands/config_trusted_builder.go index fe50041e65..3de01d3824 100644 --- a/internal/commands/config_trusted_builder.go +++ b/internal/commands/config_trusted_builder.go @@ -102,8 +102,10 @@ func listTrustedBuilders(args []string, logger logging.Logger, cfg config.Config logger.Info("Trusted Builders:") var trustedBuilders []string - for _, builder := range bldr.SuggestedBuilders { - trustedBuilders = append(trustedBuilders, builder.Image) + for _, knownBuilder := range bldr.KnownBuilders { + if knownBuilder.Trusted { + trustedBuilders = append(trustedBuilders, knownBuilder.Image) + } } for _, builder := range cfg.TrustedBuilders { diff --git a/internal/commands/inspect_builder_test.go b/internal/commands/inspect_builder_test.go index e70b7404e4..2b92f0137b 100644 --- a/internal/commands/inspect_builder_test.go +++ b/internal/commands/inspect_builder_test.go @@ -215,7 +215,6 @@ func testInspectBuilderCommand(t *testing.T, when spec.G, it spec.S) { assert.Matches(outBuf.String(), regexp.MustCompile(`Paketo Buildpacks:\s+'paketobuildpacks/builder-jammy-base'`)) assert.Matches(outBuf.String(), regexp.MustCompile(`Paketo Buildpacks:\s+'paketobuildpacks/builder-jammy-full'`)) - assert.Matches(outBuf.String(), regexp.MustCompile(`Heroku:\s+'heroku/builder:20'`)) assert.Matches(outBuf.String(), regexp.MustCompile(`Heroku:\s+'heroku/builder:22'`)) }) }) diff --git a/internal/commands/suggest_builders.go b/internal/commands/suggest_builders.go index 0d8772ed92..d5e8fb657d 100644 --- a/internal/commands/suggest_builders.go +++ b/internal/commands/suggest_builders.go @@ -39,10 +39,16 @@ func suggestSettingBuilder(logger logging.Logger, inspector BuilderInspector) { } func suggestBuilders(logger logging.Logger, client BuilderInspector) { - WriteSuggestedBuilder(logger, client, bldr.SuggestedBuilders) + suggestedBuilders := []bldr.KnownBuilder{} + for _, knownBuilder := range bldr.KnownBuilders { + if knownBuilder.Suggested { + suggestedBuilders = append(suggestedBuilders, knownBuilder) + } + } + WriteSuggestedBuilder(logger, client, suggestedBuilders) } -func WriteSuggestedBuilder(logger logging.Logger, inspector BuilderInspector, builders []bldr.SuggestedBuilder) { +func WriteSuggestedBuilder(logger logging.Logger, inspector BuilderInspector, builders []bldr.KnownBuilder) { sort.Slice(builders, func(i, j int) bool { if builders[i].Vendor == builders[j].Vendor { return builders[i].Image < builders[j].Image @@ -60,7 +66,7 @@ func WriteSuggestedBuilder(logger logging.Logger, inspector BuilderInspector, bu wg.Add(len(builders)) for i, builder := range builders { - go func(w *sync.WaitGroup, i int, builder bldr.SuggestedBuilder) { + go func(w *sync.WaitGroup, i int, builder bldr.KnownBuilder) { descriptions[i] = getBuilderDescription(builder, inspector) w.Done() }(&wg, i, builder) @@ -78,7 +84,7 @@ func WriteSuggestedBuilder(logger logging.Logger, inspector BuilderInspector, bu logger.Info("\tpack builder inspect ") } -func getBuilderDescription(builder bldr.SuggestedBuilder, inspector BuilderInspector) string { +func getBuilderDescription(builder bldr.KnownBuilder, inspector BuilderInspector) string { info, err := inspector.InspectBuilder(builder.Image, false) if err == nil && info != nil && info.Description != "" { return info.Description @@ -88,8 +94,8 @@ func getBuilderDescription(builder bldr.SuggestedBuilder, inspector BuilderInspe } func isSuggestedBuilder(builder string) bool { - for _, sugBuilder := range bldr.SuggestedBuilders { - if builder == sugBuilder.Image { + for _, knownBuilder := range bldr.KnownBuilders { + if builder == knownBuilder.Image && knownBuilder.Suggested { return true } } diff --git a/internal/commands/suggest_builders_test.go b/internal/commands/suggest_builders_test.go index 6759e21de1..12d38c16e2 100644 --- a/internal/commands/suggest_builders_test.go +++ b/internal/commands/suggest_builders_test.go @@ -47,7 +47,7 @@ func testSuggestBuildersCommand(t *testing.T, when spec.G, it spec.S) { }) it("displays descriptions from metadata", func() { - commands.WriteSuggestedBuilder(logger, mockClient, []bldr.SuggestedBuilder{{ + commands.WriteSuggestedBuilder(logger, mockClient, []bldr.KnownBuilder{{ Vendor: "Builder", Image: "gcr.io/some/builder:latest", DefaultDescription: "Default description", @@ -65,7 +65,7 @@ func testSuggestBuildersCommand(t *testing.T, when spec.G, it spec.S) { }) it("displays default descriptions", func() { - commands.WriteSuggestedBuilder(logger, mockClient, []bldr.SuggestedBuilder{{ + commands.WriteSuggestedBuilder(logger, mockClient, []bldr.KnownBuilder{{ Vendor: "Builder", Image: "gcr.io/some/builder:latest", DefaultDescription: "Default description", @@ -81,7 +81,7 @@ func testSuggestBuildersCommand(t *testing.T, when spec.G, it spec.S) { }) it("displays default descriptions", func() { - commands.WriteSuggestedBuilder(logger, mockClient, []bldr.SuggestedBuilder{{ + commands.WriteSuggestedBuilder(logger, mockClient, []bldr.KnownBuilder{{ Vendor: "Builder", Image: "gcr.io/some/builder:latest", DefaultDescription: "Default description", diff --git a/pkg/buildpack/build_module_info.go b/pkg/buildpack/build_module_info.go new file mode 100644 index 0000000000..1549579cd2 --- /dev/null +++ b/pkg/buildpack/build_module_info.go @@ -0,0 +1,68 @@ +package buildpack + +import ( + "strings" + + "github.com/pkg/errors" + + "github.com/buildpacks/pack/pkg/dist" +) + +type ModuleInfos interface { + BuildModule() []dist.ModuleInfo +} + +type FlattenModuleInfos interface { + FlattenModules() []ModuleInfos +} + +type flattenModules struct { + modules []ModuleInfos +} + +func (fl *flattenModules) FlattenModules() []ModuleInfos { + return fl.modules +} + +type buildModuleInfosImpl struct { + modules []dist.ModuleInfo +} + +func (b *buildModuleInfosImpl) BuildModule() []dist.ModuleInfo { + return b.modules +} + +func ParseFlattenBuildModules(buildpacksID []string) (FlattenModuleInfos, error) { + var buildModuleInfos []ModuleInfos + for _, ids := range buildpacksID { + modules, err := parseBuildpackName(ids) + if err != nil { + return nil, err + } + buildModuleInfos = append(buildModuleInfos, modules) + } + return &flattenModules{modules: buildModuleInfos}, nil +} + +func parseBuildpackName(names string) (ModuleInfos, error) { + var buildModuleInfos []dist.ModuleInfo + ids := strings.Split(names, ",") + for _, id := range ids { + if strings.Count(id, "@") != 1 { + return nil, errors.Errorf("invalid format %s; please use '@' to add buildpacks to be flattened", id) + } + bpFullName := strings.Split(id, "@") + idFromName := strings.TrimSpace(bpFullName[0]) + versionFromName := strings.TrimSpace(bpFullName[1]) + if idFromName == "" || versionFromName == "" { + return nil, errors.Errorf("invalid format %s; '' and '' must be specified", id) + } + + bpID := dist.ModuleInfo{ + ID: idFromName, + Version: versionFromName, + } + buildModuleInfos = append(buildModuleInfos, bpID) + } + return &buildModuleInfosImpl{modules: buildModuleInfos}, nil +} diff --git a/pkg/buildpack/build_module_info_test.go b/pkg/buildpack/build_module_info_test.go new file mode 100644 index 0000000000..2f1dd6760a --- /dev/null +++ b/pkg/buildpack/build_module_info_test.go @@ -0,0 +1,93 @@ +package buildpack_test + +import ( + "fmt" + "testing" + + "github.com/heroku/color" + "github.com/sclevine/spec" + "github.com/sclevine/spec/report" + + "github.com/buildpacks/pack/pkg/buildpack" + h "github.com/buildpacks/pack/testhelpers" +) + +func TestBuildModuleInfo(t *testing.T) { + color.Disable(true) + defer color.Disable(false) + spec.Run(t, "BuildModuleInfo", testBuildModuleInfo, spec.Parallel(), spec.Report(report.Terminal{})) +} + +func testBuildModuleInfo(t *testing.T, when spec.G, it spec.S) { + when("#ParseFlattenBuildModules", func() { + when("buildpacksID have format @", func() { + var buildModules []string + when("one buildpackID is provided", func() { + it.Before(func() { + buildModules = []string{"some-buildpack@version-1"} + }) + + it("parses successfully", func() { + flattenModuleInfos, err := buildpack.ParseFlattenBuildModules(buildModules) + h.AssertNil(t, err) + h.AssertNotNil(t, flattenModuleInfos) + h.AssertTrue(t, len(flattenModuleInfos.FlattenModules()) == 1) + h.AssertEq(t, flattenModuleInfos.FlattenModules()[0].BuildModule()[0].ID, "some-buildpack") + h.AssertEq(t, flattenModuleInfos.FlattenModules()[0].BuildModule()[0].Version, "version-1") + }) + }) + + when("more than one buildpackID is provided", func() { + it.Before(func() { + buildModules = []string{"some-buildpack@version-1, another-buildpack@version-2"} + }) + + it("parses multiple buildpackIDs", func() { + flattenModuleInfos, err := buildpack.ParseFlattenBuildModules(buildModules) + h.AssertNil(t, err) + h.AssertNotNil(t, flattenModuleInfos) + h.AssertTrue(t, len(flattenModuleInfos.FlattenModules()) == 1) + h.AssertTrue(t, len(flattenModuleInfos.FlattenModules()[0].BuildModule()) == 2) + h.AssertEq(t, flattenModuleInfos.FlattenModules()[0].BuildModule()[0].ID, "some-buildpack") + h.AssertEq(t, flattenModuleInfos.FlattenModules()[0].BuildModule()[0].Version, "version-1") + h.AssertEq(t, flattenModuleInfos.FlattenModules()[0].BuildModule()[1].ID, "another-buildpack") + h.AssertEq(t, flattenModuleInfos.FlattenModules()[0].BuildModule()[1].Version, "version-2") + }) + }) + }) + + when("buildpacksID don't have format @", func() { + when("@ is missing", func() { + it("errors with a descriptive message", func() { + _, err := buildpack.ParseFlattenBuildModules([]string{"some-buildpack"}) + h.AssertNotNil(t, err) + h.AssertError(t, err, fmt.Sprintf("invalid format %s; please use '@' to add buildpacks to be flattened", "some-buildpack")) + }) + }) + + when(" is missing", func() { + it("errors with a descriptive message", func() { + _, err := buildpack.ParseFlattenBuildModules([]string{"some-buildpack@"}) + h.AssertNotNil(t, err) + h.AssertError(t, err, fmt.Sprintf("invalid format %s; '' and '' must be specified", "some-buildpack@")) + }) + }) + + when(" is missing", func() { + it("errors with a descriptive message", func() { + _, err := buildpack.ParseFlattenBuildModules([]string{"@version-1"}) + h.AssertNotNil(t, err) + h.AssertError(t, err, fmt.Sprintf("invalid format %s; '' and '' must be specified", "@version-1")) + }) + }) + + when("multiple @ are used", func() { + it("errors with a descriptive message", func() { + _, err := buildpack.ParseFlattenBuildModules([]string{"some-buildpack@@version-1"}) + h.AssertNotNil(t, err) + h.AssertError(t, err, fmt.Sprintf("invalid format %s; please use '@' to add buildpacks to be flattened", "some-buildpack@@version-1")) + }) + }) + }) + }) +} diff --git a/pkg/buildpack/builder.go b/pkg/buildpack/builder.go index 2980adbab2..443f0de322 100644 --- a/pkg/buildpack/builder.go +++ b/pkg/buildpack/builder.go @@ -99,10 +99,10 @@ func NewBuilder(imageFactory ImageFactory, ops ...PackageBuilderOption) *Package return nil } } - moduleManager := NewModuleManager(opts.flatten) + moduleManager := NewManagedCollectionV1(opts.flatten) return &PackageBuilder{ imageFactory: imageFactory, - dependencies: *moduleManager, + dependencies: moduleManager, flattenAllBuildpacks: opts.flatten, flattenExcludeBuildpacks: opts.exclude, logger: opts.logger, diff --git a/pkg/buildpack/managed_collection.go b/pkg/buildpack/managed_collection.go index 4c1e6416f9..5896caeb63 100644 --- a/pkg/buildpack/managed_collection.go +++ b/pkg/buildpack/managed_collection.go @@ -1,60 +1,150 @@ package buildpack -type ManagedCollection struct { +// ManagedCollection keeps track of build modules and the manner in which they should be added to an OCI image (as flattened or exploded). +type ManagedCollection interface { + // AllModules returns all build modules handled by the manager. + AllModules() []BuildModule + + // ExplodedModules returns all build modules that will be added to the output artifact as a single layer + // containing a single module. + ExplodedModules() []BuildModule + + // AddModules adds module information to the collection as flattened or not, depending on how the collection is configured. + AddModules(main BuildModule, deps ...BuildModule) + + // FlattenedModules returns all build modules that will be added to the output artifact as a single layer + // containing multiple modules. + FlattenedModules() [][]BuildModule + + // ShouldFlatten returns true if the given module should be flattened. + ShouldFlatten(module BuildModule) bool +} + +type managedCollection struct { explodedModules []BuildModule - flattenedModules []BuildModule - flatten bool + flattenedModules [][]BuildModule } -func NewModuleManager(flatten bool) *ManagedCollection { - return &ManagedCollection{ - flatten: flatten, - explodedModules: []BuildModule{}, - flattenedModules: []BuildModule{}, - } +func (f *managedCollection) ExplodedModules() []BuildModule { + return f.explodedModules +} + +func (f *managedCollection) FlattenedModules() [][]BuildModule { + return f.flattenedModules } -// AllModules returns all explodedModules handle by the manager -func (f *ManagedCollection) AllModules() []BuildModule { +func (f *managedCollection) AllModules() []BuildModule { all := f.explodedModules - all = append(all, f.flattenedModules...) + for _, modules := range f.flattenedModules { + all = append(all, modules...) + } return all } -// ExplodedModules returns all modules that will be added to the output artifact as a single layer containing a single module. -func (f *ManagedCollection) ExplodedModules() []BuildModule { - return f.explodedModules +func (f *managedCollection) ShouldFlatten(module BuildModule) bool { + for _, modules := range f.flattenedModules { + for _, v := range modules { + if v == module { + return true + } + } + } + return false +} + +// managedCollectionV1 can be used to flatten all the flattenModuleInfos or none of them. +type managedCollectionV1 struct { + managedCollection + flattenAll bool } -// FlattenedModules returns all modules that will be added to the output artifact as a single layer containing multiple modules. -func (f *ManagedCollection) FlattenedModules() [][]BuildModule { - if f.flatten { - modules := [][]BuildModule{} - modules = append(modules, f.flattenedModules) - return modules +// NewManagedCollectionV1 will create a manager instance responsible for flattening Buildpack Packages. +func NewManagedCollectionV1(flattenAll bool) ManagedCollection { + return &managedCollectionV1{ + flattenAll: flattenAll, + managedCollection: managedCollection{ + explodedModules: []BuildModule{}, + flattenedModules: [][]BuildModule{}, + }, } - return nil } -// AddModules determines whether the explodedModules must be added as flattened or not. -func (f *ManagedCollection) AddModules(main BuildModule, deps ...BuildModule) { - if !f.flatten { +func (f *managedCollectionV1) AddModules(main BuildModule, deps ...BuildModule) { + if !f.flattenAll { // default behavior f.explodedModules = append(f.explodedModules, append([]BuildModule{main}, deps...)...) } else { // flatten all - f.flattenedModules = append(f.flattenedModules, append([]BuildModule{main}, deps...)...) + if len(f.flattenedModules) == 1 { + // we already have data in the array, append to the first element + f.flattenedModules[0] = append(f.flattenedModules[0], append([]BuildModule{main}, deps...)...) + } else { + // the array is empty, create the first element + f.flattenedModules = append(f.flattenedModules, append([]BuildModule{main}, deps...)) + } } } -// ShouldFlatten returns true if the given module is flattened. -func (f *ManagedCollection) ShouldFlatten(module BuildModule) bool { - if f.flatten { - for _, v := range f.flattenedModules { - if v == module { - return true +// NewManagedCollectionV2 will create a manager instance responsible for flattening buildpacks inside a Builder. +// The flattened build modules provided are the groups of buildpacks that must be put together in a single layer; the manager +// will take care of keeping them in the correct group (flattened or exploded) once they are added. +func NewManagedCollectionV2(modules FlattenModuleInfos) ManagedCollection { + flattenGroups := 0 + if modules != nil { + flattenGroups = len(modules.FlattenModules()) + } + + return &managedCollectionV2{ + flattenModuleInfos: modules, + managedCollection: managedCollection{ + explodedModules: []BuildModule{}, + flattenedModules: make([][]BuildModule, flattenGroups), + }, + } +} + +// managedCollectionV2 can be used when the build modules to be flattened are known at the point of initialization. +// The flattened build modules are provided when the collection is initialized and the collection will take care of +// keeping them in the correct group (flattened or exploded) once they are added. +type managedCollectionV2 struct { + managedCollection + flattenModuleInfos FlattenModuleInfos +} + +func (ff *managedCollectionV2) flattenGroups() []ModuleInfos { + return ff.flattenModuleInfos.FlattenModules() +} + +func (ff *managedCollectionV2) AddModules(main BuildModule, deps ...BuildModule) { + var allModules []BuildModule + allModules = append(allModules, append([]BuildModule{main}, deps...)...) + for _, module := range allModules { + if ff.flattenModuleInfos != nil && len(ff.flattenGroups()) > 0 { + pos := ff.flattenedLayerFor(module) + if pos >= 0 { + ff.flattenedModules[pos] = append(ff.flattenedModules[pos], module) + } else { + // this module must not be flattened + ff.explodedModules = append(ff.explodedModules, module) } + } else { + // we don't want to flatten anything + ff.explodedModules = append(ff.explodedModules, module) } } - return false +} + +// flattenedLayerFor given a module will try to determine which row (layer) this module must be added to in order to be flattened. +// If the layer is not found, it means the module must not be flattened at all. +func (ff *managedCollectionV2) flattenedLayerFor(module BuildModule) int { + // flattenGroups is a two-dimensional array, where each row represents + // a group of module infos that must be flattened together in the same layer. + for i, flattenGroup := range ff.flattenGroups() { + for _, buildModuleInfo := range flattenGroup.BuildModule() { + if buildModuleInfo.FullName() == module.Descriptor().Info().FullName() { + return i + } + } + } + return -1 } diff --git a/pkg/buildpack/managed_collection_test.go b/pkg/buildpack/managed_collection_test.go index eeae8fedaf..96357f61c5 100644 --- a/pkg/buildpack/managed_collection_test.go +++ b/pkg/buildpack/managed_collection_test.go @@ -30,15 +30,16 @@ func testModuleManager(t *testing.T, when spec.G, it spec.S) { * bp31 */ var ( - moduleManager *buildpack.ManagedCollection - compositeBP1 buildpack.BuildModule - bp1 buildpack.BuildModule - compositeBP2 buildpack.BuildModule - bp21 buildpack.BuildModule - bp22 buildpack.BuildModule - compositeBP3 buildpack.BuildModule - bp31 buildpack.BuildModule - err error + moduleManager buildpack.ManagedCollection + compositeBP1 buildpack.BuildModule + bp1 buildpack.BuildModule + compositeBP2 buildpack.BuildModule + bp21 buildpack.BuildModule + bp22 buildpack.BuildModule + compositeBP3 buildpack.BuildModule + bp31 buildpack.BuildModule + flattenBuildModules buildpack.FlattenModuleInfos + err error ) it.Before(func() { @@ -137,101 +138,217 @@ func testModuleManager(t *testing.T, when spec.G, it spec.S) { }) when("manager is configured in flatten mode", func() { - when("flatten all", func() { - it.Before(func() { - moduleManager = buildpack.NewModuleManager(true) - moduleManager.AddModules(compositeBP1, []buildpack.BuildModule{bp1, compositeBP2, bp21, bp22, compositeBP3, bp31}...) + when("V1 is used", func() { + when("flatten all", func() { + it.Before(func() { + moduleManager = buildpack.NewManagedCollectionV1(true) + moduleManager.AddModules(compositeBP1, []buildpack.BuildModule{bp1, compositeBP2, bp21, bp22, compositeBP3, bp31}...) + }) + + when("#FlattenedModules", func() { + it("returns one flatten module (1 layer)", func() { + modules := moduleManager.FlattenedModules() + h.AssertEq(t, len(modules), 1) + h.AssertEq(t, len(modules[0]), 7) + }) + }) + + when("#ExplodedModules", func() { + it("returns empty", func() { + modules := moduleManager.ExplodedModules() + h.AssertEq(t, len(modules), 0) + }) + }) + + when("#AllModules", func() { + it("returns all explodedModules", func() { + modules := moduleManager.AllModules() + h.AssertEq(t, len(modules), 7) + }) + }) + + when("#ShouldFlatten", func() { + it("returns true for flatten explodedModules", func() { + h.AssertTrue(t, moduleManager.ShouldFlatten(compositeBP1)) + h.AssertTrue(t, moduleManager.ShouldFlatten(bp1)) + h.AssertTrue(t, moduleManager.ShouldFlatten(compositeBP2)) + h.AssertTrue(t, moduleManager.ShouldFlatten(bp21)) + h.AssertTrue(t, moduleManager.ShouldFlatten(bp22)) + h.AssertTrue(t, moduleManager.ShouldFlatten(compositeBP3)) + h.AssertTrue(t, moduleManager.ShouldFlatten(bp31)) + }) + }) }) + }) - when("#FlattenedModules", func() { - it("returns one flatten module (1 layer)", func() { - modules := moduleManager.FlattenedModules() - h.AssertEq(t, len(modules), 1) - h.AssertEq(t, len(modules[0]), 7) + when("V2 is used", func() { + when("flattened build modules are provided", func() { + it.Before(func() { + flattenBuildModules, err = buildpack.ParseFlattenBuildModules([]string{"composite-buildpack-3-id@composite-buildpack-3-version,buildpack-31-id@buildpack-31-version", "composite-buildpack-2-id@composite-buildpack-2-version,buildpack-21-id@buildpack-21-version,buildpack-22-id@buildpack-22-version"}) + h.AssertNil(t, err) + + moduleManager = buildpack.NewManagedCollectionV2(flattenBuildModules) + moduleManager.AddModules(compositeBP1, []buildpack.BuildModule{bp1, compositeBP2, bp21, bp22, compositeBP3, bp31}...) + }) + + when("#FlattenedModules", func() { + it("returns two flattened modules (2 layers)", func() { + modules := moduleManager.FlattenedModules() + h.AssertEq(t, len(modules), 2) + h.AssertTrue(t, len(modules[0]) == 2 || len(modules[0]) == 3) + if len(modules[0]) == 2 { + h.AssertEq(t, len(modules[1]), 3) + } else if len(modules[0]) == 3 { + h.AssertEq(t, len(modules[1]), 2) + } + }) + }) + + when("#ExplodedModules", func() { + it("returns two exploded modules: compositeBP1 and bp1", func() { + modules := moduleManager.ExplodedModules() + h.AssertEq(t, len(modules), 2) + }) + }) + + when("#AllModules", func() { + it("returns all modules", func() { + modules := moduleManager.AllModules() + h.AssertEq(t, len(modules), 7) + }) + }) + + when("#ShouldFlatten", func() { + it("returns true for flattened modules", func() { + // exploded modules + h.AssertFalse(t, moduleManager.ShouldFlatten(compositeBP1)) + h.AssertFalse(t, moduleManager.ShouldFlatten(bp1)) + + // flattened modules + h.AssertTrue(t, moduleManager.ShouldFlatten(compositeBP2)) + h.AssertTrue(t, moduleManager.ShouldFlatten(bp21)) + h.AssertTrue(t, moduleManager.ShouldFlatten(bp22)) + h.AssertTrue(t, moduleManager.ShouldFlatten(compositeBP3)) + h.AssertTrue(t, moduleManager.ShouldFlatten(bp31)) + }) }) }) + }) + }) + + when("manager is not configured in flatten mode", func() { + when("V1 is used", func() { + it.Before(func() { + moduleManager = buildpack.NewManagedCollectionV1(false) + }) when("#ExplodedModules", func() { - it("returns empty", func() { + it("returns nil when no explodedModules are added", func() { modules := moduleManager.ExplodedModules() h.AssertEq(t, len(modules), 0) }) + + when("explodedModules are added", func() { + it.Before(func() { + moduleManager.AddModules(compositeBP1, []buildpack.BuildModule{bp1, compositeBP2, bp21, bp22, compositeBP3, bp31}...) + }) + it("returns all explodedModules added", func() { + modules := moduleManager.ExplodedModules() + h.AssertEq(t, len(modules), 7) + }) + }) }) - when("#AllModules", func() { - it("returns all explodedModules", func() { - modules := moduleManager.AllModules() - h.AssertEq(t, len(modules), 7) + when("#FlattenedModules", func() { + it("returns nil when no explodedModules are added", func() { + modules := moduleManager.FlattenedModules() + h.AssertEq(t, len(modules), 0) + }) + + when("explodedModules are added", func() { + it.Before(func() { + moduleManager.AddModules(compositeBP1, []buildpack.BuildModule{bp1, compositeBP2, bp21, bp22, compositeBP3, bp31}...) + }) + it("returns nil", func() { + modules := moduleManager.FlattenedModules() + h.AssertEq(t, len(modules), 0) + }) }) }) when("#ShouldFlatten", func() { - it("returns true for flatten explodedModules", func() { - h.AssertTrue(t, moduleManager.ShouldFlatten(compositeBP1)) - h.AssertTrue(t, moduleManager.ShouldFlatten(bp1)) - h.AssertTrue(t, moduleManager.ShouldFlatten(compositeBP2)) - h.AssertTrue(t, moduleManager.ShouldFlatten(bp21)) - h.AssertTrue(t, moduleManager.ShouldFlatten(bp22)) - h.AssertTrue(t, moduleManager.ShouldFlatten(compositeBP3)) - h.AssertTrue(t, moduleManager.ShouldFlatten(bp31)) + it("returns false when no explodedModules are added", func() { + h.AssertFalse(t, moduleManager.ShouldFlatten(bp1)) }) - }) - }) - }) - when("manager is not configured in flatten mode", func() { - it.Before(func() { - moduleManager = buildpack.NewModuleManager(false) + when("explodedModules are added", func() { + it.Before(func() { + moduleManager.AddModules(compositeBP1, []buildpack.BuildModule{bp1, compositeBP2, bp21, bp22, compositeBP3, bp31}...) + }) + it("returns false", func() { + h.AssertFalse(t, moduleManager.ShouldFlatten(bp1)) + h.AssertFalse(t, moduleManager.ShouldFlatten(bp21)) + h.AssertFalse(t, moduleManager.ShouldFlatten(bp22)) + h.AssertFalse(t, moduleManager.ShouldFlatten(bp31)) + }) + }) + }) }) - when("#ExplodedModules", func() { - it("returns nil when no explodedModules are added", func() { - modules := moduleManager.ExplodedModules() - h.AssertEq(t, len(modules), 0) + when("V2 is used", func() { + it.Before(func() { + moduleManager = buildpack.NewManagedCollectionV2(nil) }) - when("explodedModules are added", func() { - it.Before(func() { - moduleManager.AddModules(compositeBP1, []buildpack.BuildModule{bp1, compositeBP2, bp21, bp22, compositeBP3, bp31}...) - }) - it("returns all explodedModules added", func() { + when("#ExplodedModules", func() { + it("returns nil when no explodedModules are added", func() { modules := moduleManager.ExplodedModules() - h.AssertEq(t, len(modules), 7) + h.AssertEq(t, len(modules), 0) }) - }) - }) - when("#FlattenedModules", func() { - it("returns nil when no explodedModules are added", func() { - modules := moduleManager.FlattenedModules() - h.AssertEq(t, len(modules), 0) + when("explodedModules are added", func() { + it.Before(func() { + moduleManager.AddModules(compositeBP1, []buildpack.BuildModule{bp1, compositeBP2, bp21, bp22, compositeBP3, bp31}...) + }) + it("returns all explodedModules added", func() { + modules := moduleManager.ExplodedModules() + h.AssertEq(t, len(modules), 7) + }) + }) }) - when("explodedModules are added", func() { - it.Before(func() { - moduleManager.AddModules(compositeBP1, []buildpack.BuildModule{bp1, compositeBP2, bp21, bp22, compositeBP3, bp31}...) - }) - it("returns nil", func() { + when("#FlattenedModules", func() { + it("returns nil when no explodedModules are added", func() { modules := moduleManager.FlattenedModules() h.AssertEq(t, len(modules), 0) }) - }) - }) - when("#ShouldFlatten", func() { - it("returns false when no explodedModules are added", func() { - h.AssertFalse(t, moduleManager.ShouldFlatten(bp1)) + when("explodedModules are added", func() { + it.Before(func() { + moduleManager.AddModules(compositeBP1, []buildpack.BuildModule{bp1, compositeBP2, bp21, bp22, compositeBP3, bp31}...) + }) + it("returns nil", func() { + modules := moduleManager.FlattenedModules() + h.AssertEq(t, len(modules), 0) + }) + }) }) - when("explodedModules are added", func() { - it.Before(func() { - moduleManager.AddModules(compositeBP1, []buildpack.BuildModule{bp1, compositeBP2, bp21, bp22, compositeBP3, bp31}...) - }) - it("returns false", func() { + when("#ShouldFlatten", func() { + it("returns false when no explodedModules are added", func() { h.AssertFalse(t, moduleManager.ShouldFlatten(bp1)) - h.AssertFalse(t, moduleManager.ShouldFlatten(bp21)) - h.AssertFalse(t, moduleManager.ShouldFlatten(bp22)) - h.AssertFalse(t, moduleManager.ShouldFlatten(bp31)) + }) + + when("explodedModules are added", func() { + it.Before(func() { + moduleManager.AddModules(compositeBP1, []buildpack.BuildModule{bp1, compositeBP2, bp21, bp22, compositeBP3, bp31}...) + }) + it("returns false", func() { + h.AssertFalse(t, moduleManager.ShouldFlatten(bp1)) + h.AssertFalse(t, moduleManager.ShouldFlatten(bp21)) + h.AssertFalse(t, moduleManager.ShouldFlatten(bp22)) + h.AssertFalse(t, moduleManager.ShouldFlatten(bp31)) + }) }) }) }) diff --git a/pkg/client/build.go b/pkg/client/build.go index 9b94706fb9..a4ebef86c0 100644 --- a/pkg/client/build.go +++ b/pkg/client/build.go @@ -204,6 +204,9 @@ type BuildOptions struct { // Directory to output the report.toml metadata artifact ReportDestinationDir string + // For storing the mac-address to later pass on docker config structure + MacAddress string + // Desired create time in the output image config CreationTime *time.Time @@ -274,9 +277,9 @@ type layoutPathConfig struct { targetRunImagePath string } -var IsSuggestedBuilderFunc = func(b string) bool { - for _, suggestedBuilder := range builder.SuggestedBuilders { - if b == suggestedBuilder.Image { +var IsTrustedBuilderFunc = func(b string) bool { + for _, knownBuilder := range builder.KnownBuilders { + if b == knownBuilder.Image && knownBuilder.Trusted { return true } } @@ -384,7 +387,7 @@ func (c *Client) Build(ctx context.Context, opts BuildOptions) error { // Default mode: if the TrustBuilder option is not set, trust the suggested builders. if opts.TrustBuilder == nil { - opts.TrustBuilder = IsSuggestedBuilderFunc + opts.TrustBuilder = IsTrustedBuilderFunc } // Ensure the builder's platform APIs are supported @@ -543,6 +546,7 @@ func (c *Client) Build(ctx context.Context, opts BuildOptions) error { Workspace: opts.Workspace, GID: opts.GroupID, UID: opts.UserID, + MacAddress: opts.MacAddress, PreviousImage: opts.PreviousImage, Interactive: opts.Interactive, Termui: termui.NewTermui(imageName, ephemeralBuilder, runImageName), diff --git a/pkg/client/build_test.go b/pkg/client/build_test.go index 275707accb..27cd02d236 100644 --- a/pkg/client/build_test.go +++ b/pkg/client/build_test.go @@ -1903,7 +1903,7 @@ api = "0.2" it("builder order-extensions is overwritten", func() { additionalEx := ifakes.CreateExtensionTar(t, tmpDir, dist.ExtensionDescriptor{ - WithAPI: api.MustParse("0.3"), + WithAPI: api.MustParse("0.7"), WithInfo: dist.ModuleInfo{ ID: "extension.add.1.id", Version: "extension.add.1.version", @@ -2119,7 +2119,7 @@ api = "0.2" h.AssertTrue(t, true) }) it("parses the versions correctly", func() { - fakeLifecycleImage.SetLabel("io.buildpacks.lifecycle.apis", "{\"platform\":{\"deprecated\":[\"0.1\"],\"supported\":[\"0.2\",\"0.3\",\"0.4\",\"0.5\"]}}") + fakeLifecycleImage.SetLabel("io.buildpacks.lifecycle.apis", "{\"platform\":{\"deprecated\":[\"0.1\",\"0.2\",\"0.3\",\"0.4\",\"0.5\",\"0.6\"],\"supported\":[\"0.7\",\"0.8\",\"0.9\",\"0.10\",\"0.11\",\"0.12\"]}}") h.AssertNil(t, subject.Build(context.TODO(), BuildOptions{ Image: "some/app", @@ -2127,7 +2127,7 @@ api = "0.2" Publish: true, TrustBuilder: func(string) bool { return false }, })) - h.AssertSliceContainsInOrder(t, fakeLifecycle.Opts.LifecycleApis, "0.1", "0.2", "0.3", "0.4", "0.5") + h.AssertSliceContainsInOrder(t, fakeLifecycle.Opts.LifecycleApis, "0.1", "0.2", "0.3", "0.4", "0.5", "0.6", "0.7", "0.8", "0.9", "0.10", "0.11", "0.12") }) }) diff --git a/pkg/client/create_builder.go b/pkg/client/create_builder.go index 237f114406..ee1062bc4f 100644 --- a/pkg/client/create_builder.go +++ b/pkg/client/create_builder.go @@ -32,6 +32,9 @@ type CreateBuilderOptions struct { // BuildConfigEnv for Builder BuildConfigEnv map[string]string + // Map of labels to add to the Buildpack + Labels map[string]string + // Configuration that defines the functionality a builder provides. Config pubbldr.Config @@ -45,11 +48,8 @@ type CreateBuilderOptions struct { // Strategy for updating images before a build. PullPolicy image.PullPolicy - // Flatten layers - Flatten bool - - // List of buildpack images to exclude from the package been flatten. - FlattenExclude []string + // List of modules to be flattened + Flatten buildpack.FlattenModuleInfos } // CreateBuilder creates and saves a builder image to a registry with the provided options. @@ -154,9 +154,13 @@ func (c *Client) createBaseBuilder(ctx context.Context, opts CreateBuilderOption c.logger.Debugf("Creating builder %s from build-image %s", style.Symbol(opts.BuilderName), style.Symbol(baseImage.Name())) var builderOpts []builder.BuilderOption - if opts.Flatten { - builderOpts = append(builderOpts, builder.DoNotFlatten(opts.FlattenExclude)) + if opts.Flatten != nil && len(opts.Flatten.FlattenModules()) > 0 { + builderOpts = append(builderOpts, builder.WithFlattened(opts.Flatten)) } + if opts.Labels != nil && len(opts.Labels) > 0 { + builderOpts = append(builderOpts, builder.WithLabels(opts.Labels)) + } + bldr, err := builder.New(baseImage, opts.BuilderName, builderOpts...) if err != nil { return nil, errors.Wrap(err, "invalid build-image") diff --git a/pkg/client/create_builder_test.go b/pkg/client/create_builder_test.go index a8b1d190cf..34f5bc7aa8 100644 --- a/pkg/client/create_builder_test.go +++ b/pkg/client/create_builder_test.go @@ -791,6 +791,20 @@ func testCreateBuilder(t *testing.T, when spec.G, it spec.S) { h.AssertNotContains(t, out.String(), "is using deprecated Buildpacks API version") }) + it("should set labels", func() { + opts.Labels = map[string]string{"test.label.one": "1", "test.label.two": "2"} + prepareFetcherWithBuildImage() + prepareFetcherWithRunImages() + + err := subject.CreateBuilder(context.TODO(), opts) + h.AssertNil(t, err) + + imageLabels, err := fakeBuildImage.Labels() + h.AssertNil(t, err) + h.AssertEq(t, imageLabels["test.label.one"], "1") + h.AssertEq(t, imageLabels["test.label.two"], "2") + }) + when("Buildpack dependencies are provided", func() { var ( bp1v1 buildpack.BuildModule @@ -997,6 +1011,7 @@ func testCreateBuilder(t *testing.T, when spec.G, it spec.S) { */ var ( fakeLayerImage *h.FakeAddedLayerImage + err error ) var successfullyCreateFlattenBuilder = func() { @@ -1070,7 +1085,8 @@ func testCreateBuilder(t *testing.T, when spec.G, it spec.S) { when("flatten all", func() { it("creates 1 layer for all buildpacks", func() { prepareFetcherWithRunImages() - opts.Flatten = true + opts.Flatten, err = buildpack.ParseFlattenBuildModules([]string{"flatten/bp-1@1,flatten/bp-2@2,flatten/bp-4@4,flatten/bp-6@6,flatten/bp-7@7,flatten/bp-3@3,flatten/bp-5@5"}) + h.AssertNil(t, err) successfullyCreateFlattenBuilder() @@ -1078,18 +1094,29 @@ func testCreateBuilder(t *testing.T, when spec.G, it spec.S) { h.AssertEq(t, len(layers), 1) }) + }) - when("with exclude", func() { - it("creates 1 layer for buildpacks and 1 layer for buildpack excluded", func() { - prepareFetcherWithRunImages() - opts.Flatten = true - opts.FlattenExclude = []string{"flatten/bp-7@7"} + when("only some modules are flattened", func() { + it("creates 1 layer for buildpacks [1,2,3,4,5,6] and 1 layer for buildpack [7]", func() { + prepareFetcherWithRunImages() + opts.Flatten, err = buildpack.ParseFlattenBuildModules([]string{"flatten/bp-1@1,flatten/bp-2@2,flatten/bp-4@4,flatten/bp-6@6,flatten/bp-3@3,flatten/bp-5@5"}) + h.AssertNil(t, err) - successfullyCreateFlattenBuilder() + successfullyCreateFlattenBuilder() - layers := fakeLayerImage.AddedLayersOrder() - h.AssertEq(t, len(layers), 2) - }) + layers := fakeLayerImage.AddedLayersOrder() + h.AssertEq(t, len(layers), 2) + }) + + it("creates 1 layer for buildpacks [1,2,3] and 1 layer for [4,5,6] and 1 layer for [7]", func() { + prepareFetcherWithRunImages() + opts.Flatten, err = buildpack.ParseFlattenBuildModules([]string{"flatten/bp-1@1,flatten/bp-2@2,flatten/bp-3@3", "flatten/bp-4@4,flatten/bp-6@6,flatten/bp-5@5"}) + h.AssertNil(t, err) + + successfullyCreateFlattenBuilder() + + layers := fakeLayerImage.AddedLayersOrder() + h.AssertEq(t, len(layers), 3) }) }) }) diff --git a/pkg/client/rebase.go b/pkg/client/rebase.go index 903cbaa5a9..8f3f8cf5bd 100644 --- a/pkg/client/rebase.go +++ b/pkg/client/rebase.go @@ -7,7 +7,7 @@ import ( "path/filepath" "github.com/BurntSushi/toml" - "github.com/buildpacks/lifecycle" + "github.com/buildpacks/lifecycle/phase" "github.com/buildpacks/lifecycle/platform" "github.com/buildpacks/lifecycle/platform/files" "github.com/pkg/errors" @@ -113,7 +113,7 @@ func (c *Client) Rebase(ctx context.Context, opts RebaseOptions) error { } c.logger.Infof("Rebasing %s on run image %s", style.Symbol(appImage.Name()), style.Symbol(baseImage.Name())) - rebaser := &lifecycle.Rebaser{Logger: c.logger, PlatformAPI: build.SupportedPlatformAPIVersions.Latest(), Force: opts.Force} + rebaser := &phase.Rebaser{Logger: c.logger, PlatformAPI: build.SupportedPlatformAPIVersions.Latest(), Force: opts.Force} report, err := rebaser.Rebase(appImage, baseImage, appImage.Name(), nil) if err != nil { return err diff --git a/tools/go.mod b/tools/go.mod index eecbd8a2a0..3e82a1789f 100644 --- a/tools/go.mod +++ b/tools/go.mod @@ -1,6 +1,6 @@ module github.com/buildpacks/pack/tools -go 1.20 +go 1.21 require ( github.com/golang/mock v1.6.0