diff --git a/.github/workflows/buildkit.yml b/.github/workflows/buildkit.yml index 93fb09611e..ba9b81aadd 100644 --- a/.github/workflows/buildkit.yml +++ b/.github/workflows/buildkit.yml @@ -70,9 +70,7 @@ jobs: name: BuildKit ref run: | echo "BUILDKIT_REPO=moby/buildkit" >> $GITHUB_ENV - # FIXME(thaJeztah) remove when updating BuildKit to v0.11.3 - # echo "BUILDKIT_REF=$(./hack/buildkit-ref)" >> $GITHUB_ENV - echo "BUILDKIT_REF=09223a2c58d06e0333b48107be5490397d11e65a" >> $GITHUB_ENV + echo "BUILDKIT_REF=$(./hack/buildkit-ref)" >> $GITHUB_ENV working-directory: moby - name: Checkout BuildKit ${{ env.BUILDKIT_REF }} diff --git a/vendor.mod b/vendor.mod index 48812e7b85..562a4b53f8 100644 --- a/vendor.mod +++ b/vendor.mod @@ -56,7 +56,7 @@ require ( github.com/klauspost/compress v1.15.12 github.com/miekg/dns v1.1.43 github.com/mistifyio/go-zfs v2.1.2-0.20190413222219-f784269be439+incompatible - github.com/moby/buildkit v0.11.2 // FIXME(thaJeztah): remove override from .github/workflows/buildkit.yml when updating to v0.11.3 + github.com/moby/buildkit v0.11.3-0.20230206194711-49992f513921 github.com/moby/ipvs v1.1.0 github.com/moby/locker v1.0.1 github.com/moby/patternmatcher v0.5.0 diff --git a/vendor.sum b/vendor.sum index 77b0674eb3..d218304cb9 100644 --- a/vendor.sum +++ b/vendor.sum @@ -754,8 +754,8 @@ github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0Qu github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/osext v0.0.0-20151018003038-5e2d6d41470f/go.mod h1:OkQIRizQZAeMln+1tSwduZz7+Af5oFlKirV/MSYes2A= -github.com/moby/buildkit v0.11.2 h1:hNNsYuRssvFnp/qJ8FifStEUzROl5riPAEwk7cRzMjg= -github.com/moby/buildkit v0.11.2/go.mod h1:b5hR8j3BZaOj5+gf6yielP9YLT9mU92zy3zZtdoUTrw= +github.com/moby/buildkit v0.11.3-0.20230206194711-49992f513921 h1:B6x+BCRpTTUhEsHtvBpi2IsRnrLCJ7xoJ3oZrO8oQEU= +github.com/moby/buildkit v0.11.3-0.20230206194711-49992f513921/go.mod h1:P8MqGq7YrIDldCdZLhK8M/vPcrFYZ6GX1crX0j4hOmQ= github.com/moby/ipvs v1.1.0 h1:ONN4pGaZQgAx+1Scz5RvWV4Q7Gb+mvfRh3NsPS+1XQQ= github.com/moby/ipvs v1.1.0/go.mod h1:4VJMWuf098bsUMmZEiD4Tjk/O7mOn3l1PTD3s4OoYAs= github.com/moby/locker v1.0.1 h1:fOXqR41zeveg4fFODix+1Ch4mj/gT0NE1XJbp/epuBg= diff --git a/vendor/github.com/moby/buildkit/cache/remotecache/inline/inline.go b/vendor/github.com/moby/buildkit/cache/remotecache/inline/inline.go index 59631a9d54..036ec059f7 100644 --- a/vendor/github.com/moby/buildkit/cache/remotecache/inline/inline.go +++ b/vendor/github.com/moby/buildkit/cache/remotecache/inline/inline.go @@ -56,16 +56,20 @@ func (ce *exporter) ExportForLayers(ctx context.Context, layers []digest.Digest) return nil, err } + layerBlobDigests := make([]digest.Digest, len(layers)) + descs2 := map[digest.Digest]v1.DescriptorProviderPair{} - for _, k := range layers { + for i, k := range layers { if v, ok := descs[k]; ok { descs2[k] = v + layerBlobDigests[i] = k continue } // fallback for uncompressed digests for _, v := range descs { if uc := v.Descriptor.Annotations["containerd.io/uncompressed"]; uc == string(k) { descs2[v.Descriptor.Digest] = v + layerBlobDigests[i] = v.Descriptor.Digest } } } @@ -87,7 +91,7 @@ func (ce *exporter) ExportForLayers(ctx context.Context, layers []digest.Digest) // reorder layers based on the order in the image blobIndexes := make(map[digest.Digest]int, len(layers)) - for i, blob := range layers { + for i, blob := range layerBlobDigests { blobIndexes[blob] = i } diff --git a/vendor/modules.txt b/vendor/modules.txt index f0038410f7..ff416c54f2 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -540,7 +540,7 @@ github.com/mistifyio/go-zfs # github.com/mitchellh/hashstructure/v2 v2.0.2 ## explicit; go 1.14 github.com/mitchellh/hashstructure/v2 -# github.com/moby/buildkit v0.11.2 +# github.com/moby/buildkit v0.11.3-0.20230206194711-49992f513921 ## explicit; go 1.18 github.com/moby/buildkit/api/services/control github.com/moby/buildkit/api/types