Merge pull request #49587 from crazy-max/buildkit-0.20.1

vendor: update buildkit to v0.20.1
This commit is contained in:
Akihiro Suda
2025-03-06 09:33:56 +09:00
committed by GitHub
6 changed files with 31 additions and 10 deletions

View File

@@ -556,6 +556,13 @@ func getCDIManager(specDirs []string) (*cdidevices.Manager, error) {
if err := cdiCache.Refresh(); err != nil {
return nil, err
}
if errs := cdiCache.GetErrors(); len(errs) > 0 {
for dir, errs := range errs {
for _, err := range errs {
log.L.Warnf("CDI setup error %v: %+v", dir, err)
}
}
}
return cdiCache, nil
}()
if err != nil {

View File

@@ -63,7 +63,7 @@ require (
github.com/miekg/dns v1.1.61
github.com/mistifyio/go-zfs/v3 v3.0.1
github.com/mitchellh/copystructure v1.2.0
github.com/moby/buildkit v0.20.0
github.com/moby/buildkit v0.20.1
github.com/moby/docker-image-spec v1.3.1
github.com/moby/ipvs v1.1.0
github.com/moby/locker v1.0.1
@@ -206,7 +206,7 @@ require (
github.com/tinylib/msgp v1.1.8 // indirect
github.com/tonistiigi/dchapes-mode v0.0.0-20241001053921-ca0759fec205 // indirect
github.com/tonistiigi/fsutil v0.0.0-20250113203817-b14e27f4135a // indirect
github.com/tonistiigi/go-actions-cache v0.0.0-20250219102945-1a5174abd055 // indirect
github.com/tonistiigi/go-actions-cache v0.0.0-20250228231703-3e9a6642607f // indirect
github.com/tonistiigi/go-csvvalue v0.0.0-20240710180619-ddb21b71c0b4 // indirect
github.com/tonistiigi/units v0.0.0-20180711220420-6950e57a87ea // indirect
github.com/tonistiigi/vt100 v0.0.0-20240514184818-90bafcd6abab // indirect

View File

@@ -383,8 +383,8 @@ github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:F
github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ=
github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw=
github.com/mndrix/tap-go v0.0.0-20171203230836-629fa407e90b/go.mod h1:pzzDgJWZ34fGzaAZGFW22KVZDfyrYW+QABMrWnJBnSs=
github.com/moby/buildkit v0.20.0 h1:aF5RujjQ310Pn6SLL/wQYIrSsPXy0sQ5KvWifwq1h8Y=
github.com/moby/buildkit v0.20.0/go.mod h1:HYFUIK+iGDRxRgdphZ9Nv0y1Fz7mv0HrU7xZoXx217E=
github.com/moby/buildkit v0.20.1 h1:sT0ZXhhNo5rVbMcYfgttma3TdUHfO5JjFA0UAL8p9fY=
github.com/moby/buildkit v0.20.1/go.mod h1:Rq9nB/fJImdk6QeM0niKtOHJqwKeYMrK847hTTDVuA4=
github.com/moby/docker-image-spec v1.3.1 h1:jMKff3w6PgbfSa69GfNg+zN/XLhfXJGnEx3Nl2EsFP0=
github.com/moby/docker-image-spec v1.3.1/go.mod h1:eKmb5VW8vQEh/BAr2yvVNvuiJuY6UIocYsFu/DxxRpo=
github.com/moby/ipvs v1.1.0 h1:ONN4pGaZQgAx+1Scz5RvWV4Q7Gb+mvfRh3NsPS+1XQQ=
@@ -554,8 +554,8 @@ github.com/tonistiigi/dchapes-mode v0.0.0-20241001053921-ca0759fec205 h1:eUk79E1
github.com/tonistiigi/dchapes-mode v0.0.0-20241001053921-ca0759fec205/go.mod h1:3Iuxbr0P7D3zUzBMAZB+ois3h/et0shEz0qApgHYGpY=
github.com/tonistiigi/fsutil v0.0.0-20250113203817-b14e27f4135a h1:EfGw4G0x/8qXWgtcZ6KVaPS+wpWOQMaypczzP8ojkMY=
github.com/tonistiigi/fsutil v0.0.0-20250113203817-b14e27f4135a/go.mod h1:Dl/9oEjK7IqnjAm21Okx/XIxUCFJzvh+XdVHUlBwXTw=
github.com/tonistiigi/go-actions-cache v0.0.0-20250219102945-1a5174abd055 h1:ocuqZe/ImPTYgDocnHTDOTBachfQ9m0JxvP4uGeDtBE=
github.com/tonistiigi/go-actions-cache v0.0.0-20250219102945-1a5174abd055/go.mod h1:h0oRlVs3NoFIHysRQ4rU1+RG4QmU0M2JVSwTYrB4igk=
github.com/tonistiigi/go-actions-cache v0.0.0-20250228231703-3e9a6642607f h1:q/SWz3Bz0KtAsqaBo73CHVXjaz5O8PDnmD2JHVhgYnE=
github.com/tonistiigi/go-actions-cache v0.0.0-20250228231703-3e9a6642607f/go.mod h1:h0oRlVs3NoFIHysRQ4rU1+RG4QmU0M2JVSwTYrB4igk=
github.com/tonistiigi/go-archvariant v1.0.0 h1:5LC1eDWiBNflnTF1prCiX09yfNHIxDC/aukdhCdTyb0=
github.com/tonistiigi/go-archvariant v1.0.0/go.mod h1:TxFmO5VS6vMq2kvs3ht04iPXtu2rUT/erOnGFYfk5Ho=
github.com/tonistiigi/go-csvvalue v0.0.0-20240710180619-ddb21b71c0b4 h1:7I5c2Ig/5FgqkYOh/N87NzoyI9U15qUPXhDD8uCupv8=

View File

@@ -815,6 +815,7 @@ func toDispatchState(ctx context.Context, dt []byte, opt ConvertOpt) (*dispatchS
target.image.OSFeatures = append([]string{}, platformOpt.targetPlatform.OSFeatures...)
}
}
target.image.Platform = platforms.Normalize(target.image.Platform)
return target, nil
}

View File

@@ -5,7 +5,10 @@ import (
"context"
"encoding/json"
"io"
"time"
"github.com/Azure/azure-sdk-for-go/sdk/azcore"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/policy"
"github.com/Azure/azure-sdk-for-go/sdk/storage/azblob/blob"
"github.com/Azure/azure-sdk-for-go/sdk/storage/azblob/blockblob"
"github.com/pkg/errors"
@@ -45,8 +48,18 @@ func (c *Cache) reserveV2(ctx context.Context, key string) (string, error) {
return cr.SignedUploadURL, nil
}
var azureOptions = &blockblob.ClientOptions{
ClientOptions: azcore.ClientOptions{
Retry: policy.RetryOptions{
MaxRetries: 10,
MaxRetryDelay: 2 * time.Minute,
RetryDelay: 10 * time.Second,
},
},
}
func (c *Cache) uploadV2(ctx context.Context, url string, b Blob) error {
client, err := blockblob.NewClientWithNoCredential(url, nil)
client, err := blockblob.NewClientWithNoCredential(url, azureOptions)
if err != nil {
return errors.WithStack(err)
}
@@ -62,7 +75,7 @@ func (c *Cache) uploadV2(ctx context.Context, url string, b Blob) error {
func (ce *Entry) downloadV2(ctx context.Context) ReaderAtCloser {
return toReaderAtCloser(func(offset int64) (io.ReadCloser, error) {
client, err := blockblob.NewClientWithNoCredential(ce.URL, nil)
client, err := blockblob.NewClientWithNoCredential(ce.URL, azureOptions)
if err != nil {
return nil, errors.WithStack(err)
}

4
vendor/modules.txt vendored
View File

@@ -755,7 +755,7 @@ github.com/mitchellh/hashstructure/v2
# github.com/mitchellh/reflectwalk v1.0.2
## explicit
github.com/mitchellh/reflectwalk
# github.com/moby/buildkit v0.20.0
# github.com/moby/buildkit v0.20.1
## explicit; go 1.22.0
github.com/moby/buildkit/api/services/control
github.com/moby/buildkit/api/types
@@ -1175,7 +1175,7 @@ github.com/tonistiigi/dchapes-mode
github.com/tonistiigi/fsutil
github.com/tonistiigi/fsutil/copy
github.com/tonistiigi/fsutil/types
# github.com/tonistiigi/go-actions-cache v0.0.0-20250219102945-1a5174abd055
# github.com/tonistiigi/go-actions-cache v0.0.0-20250228231703-3e9a6642607f
## explicit; go 1.22
github.com/tonistiigi/go-actions-cache
# github.com/tonistiigi/go-archvariant v1.0.0