From 1784f8456144434b347078721f0d27edeb06feab Mon Sep 17 00:00:00 2001 From: Tonis Tiigi Date: Thu, 13 Feb 2025 16:54:50 -0800 Subject: [PATCH] vendor: update buildkit to v0.20.0-rc2 Signed-off-by: Tonis Tiigi --- go.mod | 2 +- go.sum | 4 ++-- vendor/github.com/moby/buildkit/solver/pb/caps.go | 2 +- .../moby/buildkit/solver/result/result.go | 14 ++++++++++++++ .../util/appdefaults/appdefaults_windows.go | 2 +- .../moby/buildkit/util/testutil/workers/dockerd.go | 2 ++ .../buildkit/util/testutil/workers/features.go | 2 ++ vendor/modules.txt | 2 +- 8 files changed, 24 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index 7f266a81e380..abf8975590b9 100644 --- a/go.mod +++ b/go.mod @@ -29,7 +29,7 @@ require ( github.com/hashicorp/hcl/v2 v2.23.0 github.com/in-toto/in-toto-golang v0.5.0 github.com/mitchellh/hashstructure/v2 v2.0.2 - github.com/moby/buildkit v0.20.0-rc1 + github.com/moby/buildkit v0.20.0-rc2 github.com/moby/sys/mountinfo v0.7.2 github.com/moby/sys/signal v0.7.1 github.com/morikuni/aec v1.0.0 diff --git a/go.sum b/go.sum index 97360093949d..09764e31bc05 100644 --- a/go.sum +++ b/go.sum @@ -297,8 +297,8 @@ github.com/mitchellh/hashstructure/v2 v2.0.2/go.mod h1:MG3aRVU/N29oo/V/IhBX8GR/z github.com/mitchellh/mapstructure v0.0.0-20150613213606-2caf8efc9366/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/moby/buildkit v0.20.0-rc1 h1:aRO8ApLVz7EuzCVPUFmXiU5nwQkYDUPty9InUp0HJes= -github.com/moby/buildkit v0.20.0-rc1/go.mod h1:mtRqVBkksyvFm+ljU1u+cigDh36TdFvlEGfz/XbYTiI= +github.com/moby/buildkit v0.20.0-rc2 h1:QjACghvG0pSAp7dk9aQMYWioDEOljDWyyoUjyg35qfg= +github.com/moby/buildkit v0.20.0-rc2/go.mod h1:kMXf90l/f3zygRK8bYbyetfyzoJYntb6Bpi2VsLfXgQ= github.com/moby/docker-image-spec v1.3.1 h1:jMKff3w6PgbfSa69GfNg+zN/XLhfXJGnEx3Nl2EsFP0= github.com/moby/docker-image-spec v1.3.1/go.mod h1:eKmb5VW8vQEh/BAr2yvVNvuiJuY6UIocYsFu/DxxRpo= github.com/moby/locker v1.0.1 h1:fOXqR41zeveg4fFODix+1Ch4mj/gT0NE1XJbp/epuBg= diff --git a/vendor/github.com/moby/buildkit/solver/pb/caps.go b/vendor/github.com/moby/buildkit/solver/pb/caps.go index eda77165e296..173791e4dd6f 100644 --- a/vendor/github.com/moby/buildkit/solver/pb/caps.go +++ b/vendor/github.com/moby/buildkit/solver/pb/caps.go @@ -463,7 +463,7 @@ func init() { Caps.Init(apicaps.Cap{ ID: CapRemoteCacheAzBlob, - Enabled: false, + Enabled: true, Status: apicaps.CapStatusExperimental, }) diff --git a/vendor/github.com/moby/buildkit/solver/result/result.go b/vendor/github.com/moby/buildkit/solver/result/result.go index 20224427049d..7d1b66dfcd0b 100644 --- a/vendor/github.com/moby/buildkit/solver/result/result.go +++ b/vendor/github.com/moby/buildkit/solver/result/result.go @@ -110,6 +110,20 @@ func (r *Result[T]) EachRef(fn func(T) error) (err error) { return err } +// IsEmpty returns true if this result does not refer to +// any references. +func (r *Result[T]) IsEmpty() bool { + r.mu.Lock() + defer r.mu.Unlock() + + if len(r.Refs) > 0 { + return false + } + + var zero T + return r.Ref == zero +} + // EachRef iterates over references in both a and b. // a and b are assumed to be of the same size and map their references // to the same set of keys diff --git a/vendor/github.com/moby/buildkit/util/appdefaults/appdefaults_windows.go b/vendor/github.com/moby/buildkit/util/appdefaults/appdefaults_windows.go index c2103887a341..6917469fe045 100644 --- a/vendor/github.com/moby/buildkit/util/appdefaults/appdefaults_windows.go +++ b/vendor/github.com/moby/buildkit/util/appdefaults/appdefaults_windows.go @@ -18,7 +18,7 @@ var ( var ( UserCNIConfigPath = DefaultCNIConfigPath - CDISpecDirs []string + CDISpecDirs = []string{filepath.Join(os.Getenv("ProgramData"), "buildkitd", "cdi")} ) func UserAddress() string { diff --git a/vendor/github.com/moby/buildkit/util/testutil/workers/dockerd.go b/vendor/github.com/moby/buildkit/util/testutil/workers/dockerd.go index 4a1af71e1874..1a7da3c1fb6b 100644 --- a/vendor/github.com/moby/buildkit/util/testutil/workers/dockerd.go +++ b/vendor/github.com/moby/buildkit/util/testutil/workers/dockerd.go @@ -41,6 +41,7 @@ func InitDockerdWorker() { FeatureSBOM, FeatureSecurityMode, FeatureCNINetwork, + FeatureCDI, }, }) integration.Register(&Moby{ @@ -51,6 +52,7 @@ func InitDockerdWorker() { FeatureSecurityMode, FeatureCNINetwork, FeatureContentCheck, + FeatureCDI, }, }) } diff --git a/vendor/github.com/moby/buildkit/util/testutil/workers/features.go b/vendor/github.com/moby/buildkit/util/testutil/workers/features.go index 3325e623e5a6..380fe3a81dd2 100644 --- a/vendor/github.com/moby/buildkit/util/testutil/workers/features.go +++ b/vendor/github.com/moby/buildkit/util/testutil/workers/features.go @@ -31,6 +31,7 @@ const ( FeatureSourceDateEpoch = "source_date_epoch" FeatureCNINetwork = "cni_network" FeatureContentCheck = "content_check" + FeatureCDI = "cdi" ) var features = map[string]struct{}{ @@ -58,6 +59,7 @@ var features = map[string]struct{}{ FeatureSourceDateEpoch: {}, FeatureCNINetwork: {}, FeatureContentCheck: {}, + FeatureCDI: {}, } func CheckFeatureCompat(t *testing.T, sb integration.Sandbox, reason ...string) { diff --git a/vendor/modules.txt b/vendor/modules.txt index 629233a234e3..86f2d90f2ad3 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -493,7 +493,7 @@ github.com/mitchellh/go-wordwrap github.com/mitchellh/hashstructure/v2 # github.com/mitchellh/mapstructure v1.5.0 ## explicit; go 1.14 -# github.com/moby/buildkit v0.20.0-rc1 +# github.com/moby/buildkit v0.20.0-rc2 ## explicit; go 1.22.0 github.com/moby/buildkit/api/services/control github.com/moby/buildkit/api/types