diff --git a/go.mod b/go.mod index 4fcde9cd..d190b8ec 100644 --- a/go.mod +++ b/go.mod @@ -39,7 +39,7 @@ require ( github.com/mattn/go-shellwords v1.0.5 // indirect github.com/mattn/go-sqlite3 v1.10.0 // indirect github.com/miekg/pkcs11 v0.0.0-20190322140431-074fd7a1ed19 // indirect - github.com/moby/buildkit v0.7.0 + github.com/moby/buildkit v0.7.2 github.com/opencontainers/go-digest v1.0.0-rc1 github.com/opencontainers/image-spec v1.0.1 github.com/opencontainers/selinux v1.3.3 // indirect diff --git a/go.sum b/go.sum index fcd83159..2d736d64 100644 --- a/go.sum +++ b/go.sum @@ -336,8 +336,8 @@ github.com/mitchellh/hashstructure v0.0.0-20170609045927-2bca23e0e452/go.mod h1: github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE= 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.7.0 h1:5T41l8i0f+OqHvRThh2NKVXiLpclXYmgO8QePoyIJrw= -github.com/moby/buildkit v0.7.0/go.mod h1:zOhLO1TiQepuSfzoNDQ542IGJQy0CHr79T4MOJvaewY= +github.com/moby/buildkit v0.7.2 h1:wp4R0QMXSqwjTJKhhWlJNOCSQ/OVPnsCf3N8rs09+vQ= +github.com/moby/buildkit v0.7.2/go.mod h1:D3DN/Nl4DyMH1LkwpRUJuoghqdigdXd1A6HXt5aZS40= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -480,8 +480,8 @@ github.com/syndtr/gocapability v0.0.0-20180916011248-d98352740cb2/go.mod h1:hkRG github.com/theupdateframework/notary v0.6.1 h1:7wshjstgS9x9F5LuB1L5mBI2xNMObWqjz+cjWoom6l0= github.com/theupdateframework/notary v0.6.1/go.mod h1:MOfgIfmox8s7/7fduvB2xyPPMJCrjRLRizA8OFwpnKY= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= -github.com/tonistiigi/fsutil v0.0.0-20200225063759-013a9fe6aee2 h1:RCy9Kde5WFuCrGYznzS1dFANTwqvAzFDoih8L3sE0UY= -github.com/tonistiigi/fsutil v0.0.0-20200225063759-013a9fe6aee2/go.mod h1:0G1sLZ/0ttFf09xvh7GR4AEECnjifHRNJN/sYbLianU= +github.com/tonistiigi/fsutil v0.0.0-20200326231323-c2c7d7b0e144 h1:6RY1EKxCnPQShPM46xFDHta2JSOd+YKCgHyyBHtKuo8= +github.com/tonistiigi/fsutil v0.0.0-20200326231323-c2c7d7b0e144/go.mod h1:0G1sLZ/0ttFf09xvh7GR4AEECnjifHRNJN/sYbLianU= github.com/tonistiigi/units v0.0.0-20180711220420-6950e57a87ea h1:SXhTLE6pb6eld/v/cCndK0AMpt1wiVFb/YYmqB3/QG0= github.com/tonistiigi/units v0.0.0-20180711220420-6950e57a87ea/go.mod h1:WPnis/6cRcDZSUvVmezrxJPkiO87ThFYsoUiMwWNDJk= github.com/tonistiigi/vt100 v0.0.0-20190402012908-ad4c4a574305 h1:y/1cL5AL2oRcfzz8CAHHhR6kDDfIOT0WEyH5k40sccM= diff --git a/vendor/github.com/moby/buildkit/frontend/gateway/pb/caps.go b/vendor/github.com/moby/buildkit/frontend/gateway/pb/caps.go index 6e811d3d..afb51cf2 100644 --- a/vendor/github.com/moby/buildkit/frontend/gateway/pb/caps.go +++ b/vendor/github.com/moby/buildkit/frontend/gateway/pb/caps.go @@ -32,6 +32,9 @@ const ( // CapFrontendInputs is a capability to request frontend inputs from the // LLBBridge GRPC server. CapFrontendInputs apicaps.CapID = "frontend.inputs" + + // CapGatewaySolveMetadata can be used to check if solve calls from gateway reliably return metadata + CapGatewaySolveMetadata apicaps.CapID = "gateway.solve.metadata" ) func init() { @@ -126,4 +129,11 @@ func init() { Enabled: true, Status: apicaps.CapStatusExperimental, }) + + Caps.Init(apicaps.Cap{ + ID: CapGatewaySolveMetadata, + Name: "gateway metadata", + Enabled: true, + Status: apicaps.CapStatusExperimental, + }) } diff --git a/vendor/github.com/moby/buildkit/session/filesync/filesync.go b/vendor/github.com/moby/buildkit/session/filesync/filesync.go index a45abe02..51dd3c53 100644 --- a/vendor/github.com/moby/buildkit/session/filesync/filesync.go +++ b/vendor/github.com/moby/buildkit/session/filesync/filesync.go @@ -255,7 +255,7 @@ func (sp *fsSyncTarget) Register(server *grpc.Server) { RegisterFileSendServer(server, sp) } -func (sp *fsSyncTarget) DiffCopy(stream FileSend_DiffCopyServer) error { +func (sp *fsSyncTarget) DiffCopy(stream FileSend_DiffCopyServer) (err error) { if sp.outdir != "" { return syncTargetDiffCopy(stream, sp.outdir) } @@ -277,7 +277,12 @@ func (sp *fsSyncTarget) DiffCopy(stream FileSend_DiffCopyServer) error { if wc == nil { return status.Errorf(codes.AlreadyExists, "target already exists") } - defer wc.Close() + defer func() { + err1 := wc.Close() + if err != nil { + err = err1 + } + }() return writeTargetFile(stream, wc) } diff --git a/vendor/github.com/moby/buildkit/util/entitlements/entitlements.go b/vendor/github.com/moby/buildkit/util/entitlements/entitlements.go index f30b8ccc..f65b426b 100644 --- a/vendor/github.com/moby/buildkit/util/entitlements/entitlements.go +++ b/vendor/github.com/moby/buildkit/util/entitlements/entitlements.go @@ -43,7 +43,7 @@ func WhiteList(allowed, supported []Entitlement) (Set, error) { } if supported != nil { if !supm.Allowed(e) { - return nil, errors.Errorf("entitlement %s is not allowed", e) + return nil, errors.Errorf("granting entitlement %s is not allowed by build daemon configuration", e) } } m[e] = struct{}{} diff --git a/vendor/github.com/tonistiigi/fsutil/tarwriter.go b/vendor/github.com/tonistiigi/fsutil/tarwriter.go index 8dea63ba..06f28c55 100644 --- a/vendor/github.com/tonistiigi/fsutil/tarwriter.go +++ b/vendor/github.com/tonistiigi/fsutil/tarwriter.go @@ -37,7 +37,11 @@ func WriteTar(ctx context.Context, fs FS, w io.Writer) error { hdr.Linkname = stat.Linkname if hdr.Linkname != "" { hdr.Size = 0 - hdr.Typeflag = tar.TypeLink + if fi.Mode() & os.ModeSymlink != 0 { + hdr.Typeflag = tar.TypeSymlink + } else { + hdr.Typeflag = tar.TypeLink + } } if len(stat.Xattrs) > 0 { diff --git a/vendor/modules.txt b/vendor/modules.txt index ae0b9542..a4f69692 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -237,7 +237,7 @@ github.com/miekg/pkcs11 github.com/mitchellh/go-wordwrap # github.com/mitchellh/mapstructure v1.1.2 github.com/mitchellh/mapstructure -# github.com/moby/buildkit v0.7.0 +# github.com/moby/buildkit v0.7.2 github.com/moby/buildkit/api/services/control github.com/moby/buildkit/api/types github.com/moby/buildkit/client @@ -331,7 +331,7 @@ github.com/theupdateframework/notary/tuf/data github.com/theupdateframework/notary/tuf/signed github.com/theupdateframework/notary/tuf/utils github.com/theupdateframework/notary/tuf/validation -# github.com/tonistiigi/fsutil v0.0.0-20200225063759-013a9fe6aee2 +# github.com/tonistiigi/fsutil v0.0.0-20200326231323-c2c7d7b0e144 github.com/tonistiigi/fsutil github.com/tonistiigi/fsutil/types # github.com/tonistiigi/units v0.0.0-20180711220420-6950e57a87ea