mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-07-09 21:17:09 +08:00
vendor: update buildkit to v0.19.0-rc1
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
This commit is contained in:
14
vendor/github.com/moby/buildkit/client/llb/exec.go
generated
vendored
14
vendor/github.com/moby/buildkit/client/llb/exec.go
generated
vendored
@ -51,7 +51,7 @@ type mount struct {
|
||||
}
|
||||
|
||||
type ExecOp struct {
|
||||
MarshalCache
|
||||
cache MarshalCache
|
||||
proxyEnv *ProxyEnv
|
||||
root Output
|
||||
mounts []*mount
|
||||
@ -63,6 +63,9 @@ type ExecOp struct {
|
||||
}
|
||||
|
||||
func (e *ExecOp) AddMount(target string, source Output, opt ...MountOption) Output {
|
||||
cache := e.cache.Acquire()
|
||||
defer cache.Release()
|
||||
|
||||
m := &mount{
|
||||
target: target,
|
||||
source: source,
|
||||
@ -84,7 +87,7 @@ func (e *ExecOp) AddMount(target string, source Output, opt ...MountOption) Outp
|
||||
}
|
||||
m.output = o
|
||||
}
|
||||
e.Store(nil, nil, nil, nil)
|
||||
cache.Store(nil, nil, nil, nil)
|
||||
e.isValidated = false
|
||||
return m.output
|
||||
}
|
||||
@ -128,7 +131,10 @@ func (e *ExecOp) Validate(ctx context.Context, c *Constraints) error {
|
||||
}
|
||||
|
||||
func (e *ExecOp) Marshal(ctx context.Context, c *Constraints) (digest.Digest, []byte, *pb.OpMetadata, []*SourceLocation, error) {
|
||||
if dgst, dt, md, srcs, err := e.Load(c); err == nil {
|
||||
cache := e.cache.Acquire()
|
||||
defer cache.Release()
|
||||
|
||||
if dgst, dt, md, srcs, err := cache.Load(c); err == nil {
|
||||
return dgst, dt, md, srcs, nil
|
||||
}
|
||||
|
||||
@ -446,7 +452,7 @@ func (e *ExecOp) Marshal(ctx context.Context, c *Constraints) (digest.Digest, []
|
||||
if err != nil {
|
||||
return "", nil, nil, nil, err
|
||||
}
|
||||
return e.Store(dt, md, e.constraints.SourceLocations, c)
|
||||
return cache.Store(dt, md, e.constraints.SourceLocations, c)
|
||||
}
|
||||
|
||||
func (e *ExecOp) Output() Output {
|
||||
|
Reference in New Issue
Block a user