vendor: update buildkit to a7d7b7f1

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
This commit is contained in:
Tonis Tiigi 2020-05-11 16:28:55 -07:00
parent 0803200be9
commit a76633684b
5 changed files with 31 additions and 13 deletions

View file

@ -26,7 +26,7 @@ github.com/imdario/mergo 7c29201646fa3de8506f70121347
golang.org/x/sync e225da77a7e68af35c70ccbf71af2b83e6acac3c
# buildkit
github.com/moby/buildkit 59e305aa33fd96e51d5c458f55104250b3e39f56 # v0.6.4-5-g59e305aa
github.com/moby/buildkit a7d7b7f1e6bfc102810079f13212de6a869c494b # v0.6.4-11-ga7d7b7f1
github.com/tonistiigi/fsutil 6c909ab392c173a4264ae1bfcbc0450b9aac0c7d
github.com/grpc-ecosystem/grpc-opentracing 8e809c8a86450a29b90dcc9efbf062d0fe6d9746
github.com/opentracing/opentracing-go 1361b9cd60be79c4c3a7fa9841b3c132e40066a7

View file

@ -460,7 +460,9 @@ func (lbf *llbBridgeForwarder) Solve(ctx context.Context, req *pb.SolveRequest)
return nil, errors.Errorf("solve did not return default result")
}
pbRes := &pb.Result{}
pbRes := &pb.Result{
Metadata: res.Metadata,
}
var defaultID string
lbf.mu.Lock()

View file

@ -19,6 +19,9 @@ const (
CapReadDir apicaps.CapID = "readdir"
CapStatFile apicaps.CapID = "statfile"
CapImportCaches apicaps.CapID = "importcaches"
// CapGatewaySolveMetadata can be used to check if solve calls from gateway reliably return metadata
CapGatewaySolveMetadata apicaps.CapID = "gateway.solve.metadata"
)
func init() {
@ -92,4 +95,11 @@ func init() {
Enabled: true,
Status: apicaps.CapStatusExperimental,
})
Caps.Init(apicaps.Cap{
ID: CapGatewaySolveMetadata,
Name: "gateway metadata",
Enabled: true,
Status: apicaps.CapStatusExperimental,
})
}

View file

@ -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)
}

View file

@ -34,16 +34,17 @@ func mapUserToChowner(user *copy.User, idmap *idtools.IdentityMapping) (copy.Cho
return nil, nil
}
old = &copy.User{} // root
}
if idmap != nil {
identity, err := idmap.ToHost(idtools.Identity{
UID: old.Uid,
GID: old.Gid,
})
if err != nil {
return nil, err
// non-nil old is already mapped
if idmap != nil {
identity, err := idmap.ToHost(idtools.Identity{
UID: old.Uid,
GID: old.Gid,
})
if err != nil {
return nil, err
}
return &copy.User{Uid: identity.UID, Gid: identity.GID}, nil
}
return &copy.User{Uid: identity.UID, Gid: identity.GID}, nil
}
return old, nil
}, nil