Merge pull request #385 from tonistiigi/cache-mount

llb: add support for persistent cache mounts
docker-18.09
Akihiro Suda 2018-05-17 11:17:32 +09:00 committed by GitHub
commit 74ab4583ec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 521 additions and 96 deletions

View File

@ -47,6 +47,7 @@ func TestClientIntegration(t *testing.T) {
testInvalidExporter,
testReadonlyRootFS,
testBasicCacheImportExport,
testCachedMounts,
})
}
@ -623,6 +624,68 @@ func testBasicCacheImportExport(t *testing.T, sb integration.Sandbox) {
require.Equal(t, string(dt), string(dt2))
}
func testCachedMounts(t *testing.T, sb integration.Sandbox) {
requiresLinux(t)
t.Parallel()
c, err := New(sb.Address())
require.NoError(t, err)
defer c.Close()
busybox := llb.Image("busybox:latest")
// setup base for one of the cache sources
st := busybox.Run(llb.Shlex(`sh -c "echo -n base > baz"`), llb.Dir("/wd"))
base := st.AddMount("/wd", llb.Scratch())
st = busybox.Run(llb.Shlex(`sh -c "echo -n first > foo"`), llb.Dir("/wd"))
st.AddMount("/wd", llb.Scratch(), llb.AsPersistentCacheDir("mycache1"))
st = st.Run(llb.Shlex(`sh -c "cat foo && echo -n second > /wd2/bar"`), llb.Dir("/wd"))
st.AddMount("/wd", llb.Scratch(), llb.AsPersistentCacheDir("mycache1"))
st.AddMount("/wd2", base, llb.AsPersistentCacheDir("mycache2"))
def, err := st.Marshal()
require.NoError(t, err)
_, err = c.Solve(context.TODO(), def, SolveOpt{}, nil)
require.NoError(t, err)
// repeat to make sure cache works
_, err = c.Solve(context.TODO(), def, SolveOpt{}, nil)
require.NoError(t, err)
// second build using cache directories
st = busybox.Run(llb.Shlex(`sh -c "cp /src0/foo . && cp /src1/bar . && cp /src1/baz ."`), llb.Dir("/wd"))
out := st.AddMount("/wd", llb.Scratch())
st.AddMount("/src0", llb.Scratch(), llb.AsPersistentCacheDir("mycache1"))
st.AddMount("/src1", base, llb.AsPersistentCacheDir("mycache2"))
destDir, err := ioutil.TempDir("", "buildkit")
require.NoError(t, err)
defer os.RemoveAll(destDir)
def, err = out.Marshal()
require.NoError(t, err)
_, err = c.Solve(context.TODO(), def, SolveOpt{
Exporter: ExporterLocal,
ExporterOutputDir: destDir,
}, nil)
require.NoError(t, err)
dt, err := ioutil.ReadFile(filepath.Join(destDir, "foo"))
require.NoError(t, err)
require.Equal(t, string(dt), "first")
dt, err = ioutil.ReadFile(filepath.Join(destDir, "bar"))
require.NoError(t, err)
require.Equal(t, string(dt), "second")
dt, err = ioutil.ReadFile(filepath.Join(destDir, "baz"))
require.NoError(t, err)
require.Equal(t, string(dt), "base")
checkAllReleasable(t, c, sb, true)
}
// containerd/containerd#2119
func testDuplicateWhiteouts(t *testing.T, sb integration.Sandbox) {
requiresLinux(t)

View File

@ -40,6 +40,7 @@ type mount struct {
source Output
output Output
selector string
cacheID string
// hasOutput bool
}
@ -156,7 +157,7 @@ func (e *ExecOp) Marshal() (digest.Digest, []byte, *OpMetadata, error) {
}
outputIndex := pb.OutputIndex(-1)
if !m.readonly {
if !m.readonly && m.cacheID == "" {
outputIndex = pb.OutputIndex(outIndex)
outIndex++
}
@ -168,6 +169,12 @@ func (e *ExecOp) Marshal() (digest.Digest, []byte, *OpMetadata, error) {
Output: outputIndex,
Selector: m.selector,
}
if m.cacheID != "" {
pm.MountType = pb.MountType_CACHE
pm.CacheOpt = &pb.CacheOpt{
ID: m.cacheID,
}
}
peo.Mounts = append(peo.Mounts, pm)
}
@ -206,7 +213,7 @@ func (e *ExecOp) getMountIndexFn(m *mount) func() (pb.OutputIndex, error) {
i := 0
for _, m2 := range e.mounts {
if m2.readonly {
if m2.readonly || m2.cacheID != "" {
continue
}
if m == m2 {
@ -214,7 +221,7 @@ func (e *ExecOp) getMountIndexFn(m *mount) func() (pb.OutputIndex, error) {
}
i++
}
return pb.OutputIndex(0), errors.Errorf("invalid mount")
return pb.OutputIndex(0), errors.Errorf("invalid mount: %s", m.target)
}
}
@ -247,6 +254,12 @@ func SourcePath(src string) MountOption {
}
}
func AsPersistentCacheDir(id string) MountOption {
return func(m *mount) {
m.cacheID = id
}
}
type RunOption interface {
SetRunOption(es *ExecInfo)
}

View File

@ -10,7 +10,9 @@ import (
"sort"
"strings"
"github.com/boltdb/bolt"
"github.com/moby/buildkit/cache"
"github.com/moby/buildkit/cache/metadata"
"github.com/moby/buildkit/executor"
"github.com/moby/buildkit/solver"
"github.com/moby/buildkit/solver/llbsolver"
@ -19,6 +21,7 @@ import (
"github.com/moby/buildkit/worker"
digest "github.com/opencontainers/go-digest"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
)
const execCacheType = "buildkit.exec.v0"
@ -26,15 +29,17 @@ const execCacheType = "buildkit.exec.v0"
type execOp struct {
op *pb.ExecOp
cm cache.Manager
md *metadata.Store
exec executor.Executor
w worker.Worker
numInputs int
}
func NewExecOp(v solver.Vertex, op *pb.Op_Exec, cm cache.Manager, exec executor.Executor, w worker.Worker) (solver.Op, error) {
func NewExecOp(v solver.Vertex, op *pb.Op_Exec, cm cache.Manager, md *metadata.Store, exec executor.Executor, w worker.Worker) (solver.Op, error) {
return &execOp{
op: op.Exec,
cm: cm,
md: md,
exec: exec,
numInputs: len(v.Inputs()),
w: w,
@ -153,6 +158,47 @@ func (e *execOp) getMountDeps() ([]dep, error) {
return deps, nil
}
func (e *execOp) getRefCacheDir(ctx context.Context, ref cache.ImmutableRef, id string, m *pb.Mount) (cache.MutableRef, error) {
makeMutable := func(cache.ImmutableRef) (cache.MutableRef, error) {
desc := fmt.Sprintf("cached mount %s from exec %s", m.Dest, strings.Join(e.op.Meta.Args, " "))
return e.cm.New(ctx, ref, cache.WithDescription(desc), cache.CachePolicyRetain)
}
key := "cache-dir:" + id
if ref != nil {
key += ":" + ref.ID()
}
sis, err := e.md.Search(key)
if err != nil {
return nil, err
}
for _, si := range sis {
if mRef, err := e.cm.GetMutable(ctx, si.ID()); err == nil {
logrus.Debugf("reusing ref for cache dir: %s", mRef.ID())
return mRef, nil
}
}
mRef, err := makeMutable(ref)
if err != nil {
return nil, err
}
si, _ := e.md.Get(mRef.ID())
v, err := metadata.NewValue(key)
if err != nil {
mRef.Release(context.TODO())
return nil, err
}
v.Index = key
if err := si.Update(func(b *bolt.Bucket) error {
return si.SetValue(b, key, v)
}); err != nil {
mRef.Release(context.TODO())
return nil, err
}
return mRef, nil
}
func (e *execOp) Exec(ctx context.Context, inputs []solver.Result) ([]solver.Result, error) {
var mounts []executor.Mount
var root cache.Mountable
@ -168,9 +214,16 @@ func (e *execOp) Exec(ctx context.Context, inputs []solver.Result) ([]solver.Res
}
}()
// loop over all mounts, fill in mounts, root and outputs
for _, m := range e.op.Mounts {
var mountable cache.Mountable
var ref cache.ImmutableRef
if m.Dest == pb.RootMount && m.MountType != pb.MountType_BIND {
return nil, errors.Errorf("invalid mount type %s for %s", m.MountType.String(), m.Dest)
}
// if mount is based on input validate and load it
if m.Input != pb.Empty {
if int(m.Input) > len(inputs) {
return nil, errors.Errorf("missing input %d", m.Input)
@ -184,33 +237,58 @@ func (e *execOp) Exec(ctx context.Context, inputs []solver.Result) ([]solver.Res
mountable = ref
}
activate := func(cache.ImmutableRef) (cache.MutableRef, error) {
makeMutable := func(cache.ImmutableRef) (cache.MutableRef, error) {
desc := fmt.Sprintf("mount %s from exec %s", m.Dest, strings.Join(e.op.Meta.Args, " "))
return e.cm.New(ctx, ref, cache.WithDescription(desc))
}
if m.Output != pb.SkipOutput {
if m.Readonly && ref != nil && m.Dest != pb.RootMount { // exclude read-only rootfs
outputs = append(outputs, ref.Clone())
} else {
active, err := activate(ref)
if err != nil {
return nil, err
switch m.MountType {
case pb.MountType_BIND:
// if mount creates an output
if m.Output != pb.SkipOutput {
// it it is readonly and not root then output is the input
if m.Readonly && ref != nil && m.Dest != pb.RootMount {
outputs = append(outputs, ref.Clone())
} else {
// otherwise output and mount is the mutable child
active, err := makeMutable(ref)
if err != nil {
return nil, err
}
outputs = append(outputs, active)
mountable = active
}
outputs = append(outputs, active)
mountable = active
}
case pb.MountType_CACHE:
if m.CacheOpt == nil {
return nil, errors.Errorf("missing cache mount options")
}
mRef, err := e.getRefCacheDir(ctx, ref, m.CacheOpt.ID, m)
if err != nil {
return nil, err
}
mountable = mRef
defer func() {
go mRef.Release(context.TODO())
}()
if m.Output != pb.SkipOutput && ref != nil {
outputs = append(outputs, ref.Clone())
}
default:
return nil, errors.Errorf("mount type %s not implemented", m.MountType)
}
// validate that there is a mount
if mountable == nil {
return nil, errors.Errorf("mount %s has no input", m.Dest)
}
// if dest is root we need mutable ref even if there is no output
if m.Dest == pb.RootMount {
root = mountable
readonlyRootFS = m.Readonly
if m.Output == pb.SkipOutput && readonlyRootFS {
active, err := activate(ref)
active, err := makeMutable(ref)
if err != nil {
return nil, err
}
@ -224,6 +302,7 @@ func (e *execOp) Exec(ctx context.Context, inputs []solver.Result) ([]solver.Res
}
}
// sort mounts so parents are mounted first
sort.Slice(mounts, func(i, j int) bool {
return mounts[i].Dest < mounts[j].Dest
})

View File

@ -16,6 +16,7 @@
ExecOp
Meta
Mount
CacheOpt
CopyOp
CopySource
SourceOp
@ -48,6 +49,33 @@ var _ = math.Inf
// proto package needs to be updated.
const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
type MountType int32
const (
MountType_BIND MountType = 0
MountType_SECRET MountType = 1
MountType_SSH MountType = 2
MountType_CACHE MountType = 3
)
var MountType_name = map[int32]string{
0: "BIND",
1: "SECRET",
2: "SSH",
3: "CACHE",
}
var MountType_value = map[string]int32{
"BIND": 0,
"SECRET": 1,
"SSH": 2,
"CACHE": 3,
}
func (x MountType) String() string {
return proto.EnumName(MountType_name, int32(x))
}
func (MountType) EnumDescriptor() ([]byte, []int) { return fileDescriptorOps, []int{0} }
// Op represents a vertex of the LLB DAG.
type Op struct {
// inputs is a set of input edges.
@ -326,11 +354,13 @@ func (m *Meta) GetUser() string {
// Mount specifies how to mount an input Op as a filesystem.
type Mount struct {
Input InputIndex `protobuf:"varint,1,opt,name=input,proto3,customtype=InputIndex" json:"input"`
Selector string `protobuf:"bytes,2,opt,name=selector,proto3" json:"selector,omitempty"`
Dest string `protobuf:"bytes,3,opt,name=dest,proto3" json:"dest,omitempty"`
Output OutputIndex `protobuf:"varint,4,opt,name=output,proto3,customtype=OutputIndex" json:"output"`
Readonly bool `protobuf:"varint,5,opt,name=readonly,proto3" json:"readonly,omitempty"`
Input InputIndex `protobuf:"varint,1,opt,name=input,proto3,customtype=InputIndex" json:"input"`
Selector string `protobuf:"bytes,2,opt,name=selector,proto3" json:"selector,omitempty"`
Dest string `protobuf:"bytes,3,opt,name=dest,proto3" json:"dest,omitempty"`
Output OutputIndex `protobuf:"varint,4,opt,name=output,proto3,customtype=OutputIndex" json:"output"`
Readonly bool `protobuf:"varint,5,opt,name=readonly,proto3" json:"readonly,omitempty"`
MountType MountType `protobuf:"varint,6,opt,name=mountType,proto3,enum=pb.MountType" json:"mountType,omitempty"`
CacheOpt *CacheOpt `protobuf:"bytes,20,opt,name=cacheOpt" json:"cacheOpt,omitempty"`
}
func (m *Mount) Reset() { *m = Mount{} }
@ -359,6 +389,36 @@ func (m *Mount) GetReadonly() bool {
return false
}
func (m *Mount) GetMountType() MountType {
if m != nil {
return m.MountType
}
return MountType_BIND
}
func (m *Mount) GetCacheOpt() *CacheOpt {
if m != nil {
return m.CacheOpt
}
return nil
}
type CacheOpt struct {
ID string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"`
}
func (m *CacheOpt) Reset() { *m = CacheOpt{} }
func (m *CacheOpt) String() string { return proto.CompactTextString(m) }
func (*CacheOpt) ProtoMessage() {}
func (*CacheOpt) Descriptor() ([]byte, []int) { return fileDescriptorOps, []int{5} }
func (m *CacheOpt) GetID() string {
if m != nil {
return m.ID
}
return ""
}
// CopyOp copies files across Ops.
type CopyOp struct {
Src []*CopySource `protobuf:"bytes,1,rep,name=src" json:"src,omitempty"`
@ -368,7 +428,7 @@ type CopyOp struct {
func (m *CopyOp) Reset() { *m = CopyOp{} }
func (m *CopyOp) String() string { return proto.CompactTextString(m) }
func (*CopyOp) ProtoMessage() {}
func (*CopyOp) Descriptor() ([]byte, []int) { return fileDescriptorOps, []int{5} }
func (*CopyOp) Descriptor() ([]byte, []int) { return fileDescriptorOps, []int{6} }
func (m *CopyOp) GetSrc() []*CopySource {
if m != nil {
@ -393,7 +453,7 @@ type CopySource struct {
func (m *CopySource) Reset() { *m = CopySource{} }
func (m *CopySource) String() string { return proto.CompactTextString(m) }
func (*CopySource) ProtoMessage() {}
func (*CopySource) Descriptor() ([]byte, []int) { return fileDescriptorOps, []int{6} }
func (*CopySource) Descriptor() ([]byte, []int) { return fileDescriptorOps, []int{7} }
func (m *CopySource) GetSelector() string {
if m != nil {
@ -414,7 +474,7 @@ type SourceOp struct {
func (m *SourceOp) Reset() { *m = SourceOp{} }
func (m *SourceOp) String() string { return proto.CompactTextString(m) }
func (*SourceOp) ProtoMessage() {}
func (*SourceOp) Descriptor() ([]byte, []int) { return fileDescriptorOps, []int{7} }
func (*SourceOp) Descriptor() ([]byte, []int) { return fileDescriptorOps, []int{8} }
func (m *SourceOp) GetIdentifier() string {
if m != nil {
@ -441,7 +501,7 @@ type BuildOp struct {
func (m *BuildOp) Reset() { *m = BuildOp{} }
func (m *BuildOp) String() string { return proto.CompactTextString(m) }
func (*BuildOp) ProtoMessage() {}
func (*BuildOp) Descriptor() ([]byte, []int) { return fileDescriptorOps, []int{8} }
func (*BuildOp) Descriptor() ([]byte, []int) { return fileDescriptorOps, []int{9} }
func (m *BuildOp) GetInputs() map[string]*BuildInput {
if m != nil {
@ -472,7 +532,7 @@ type BuildInput struct {
func (m *BuildInput) Reset() { *m = BuildInput{} }
func (m *BuildInput) String() string { return proto.CompactTextString(m) }
func (*BuildInput) ProtoMessage() {}
func (*BuildInput) Descriptor() ([]byte, []int) { return fileDescriptorOps, []int{9} }
func (*BuildInput) Descriptor() ([]byte, []int) { return fileDescriptorOps, []int{10} }
// OpMetadata is a per-vertex metadata entry, which can be defined for arbitrary Op vertex and overridable on the run time.
type OpMetadata struct {
@ -487,7 +547,7 @@ type OpMetadata struct {
func (m *OpMetadata) Reset() { *m = OpMetadata{} }
func (m *OpMetadata) String() string { return proto.CompactTextString(m) }
func (*OpMetadata) ProtoMessage() {}
func (*OpMetadata) Descriptor() ([]byte, []int) { return fileDescriptorOps, []int{10} }
func (*OpMetadata) Descriptor() ([]byte, []int) { return fileDescriptorOps, []int{11} }
func (m *OpMetadata) GetIgnoreCache() bool {
if m != nil {
@ -524,7 +584,7 @@ type ExportCache struct {
func (m *ExportCache) Reset() { *m = ExportCache{} }
func (m *ExportCache) String() string { return proto.CompactTextString(m) }
func (*ExportCache) ProtoMessage() {}
func (*ExportCache) Descriptor() ([]byte, []int) { return fileDescriptorOps, []int{11} }
func (*ExportCache) Descriptor() ([]byte, []int) { return fileDescriptorOps, []int{12} }
func (m *ExportCache) GetValue() bool {
if m != nil {
@ -541,7 +601,7 @@ type WorkerConstraint struct {
func (m *WorkerConstraint) Reset() { *m = WorkerConstraint{} }
func (m *WorkerConstraint) String() string { return proto.CompactTextString(m) }
func (*WorkerConstraint) ProtoMessage() {}
func (*WorkerConstraint) Descriptor() ([]byte, []int) { return fileDescriptorOps, []int{12} }
func (*WorkerConstraint) Descriptor() ([]byte, []int) { return fileDescriptorOps, []int{13} }
func (m *WorkerConstraint) GetFilter() []string {
if m != nil {
@ -562,7 +622,7 @@ type Definition struct {
func (m *Definition) Reset() { *m = Definition{} }
func (m *Definition) String() string { return proto.CompactTextString(m) }
func (*Definition) ProtoMessage() {}
func (*Definition) Descriptor() ([]byte, []int) { return fileDescriptorOps, []int{13} }
func (*Definition) Descriptor() ([]byte, []int) { return fileDescriptorOps, []int{14} }
func (m *Definition) GetDef() [][]byte {
if m != nil {
@ -584,6 +644,7 @@ func init() {
proto.RegisterType((*ExecOp)(nil), "pb.ExecOp")
proto.RegisterType((*Meta)(nil), "pb.Meta")
proto.RegisterType((*Mount)(nil), "pb.Mount")
proto.RegisterType((*CacheOpt)(nil), "pb.CacheOpt")
proto.RegisterType((*CopyOp)(nil), "pb.CopyOp")
proto.RegisterType((*CopySource)(nil), "pb.CopySource")
proto.RegisterType((*SourceOp)(nil), "pb.SourceOp")
@ -593,6 +654,7 @@ func init() {
proto.RegisterType((*ExportCache)(nil), "pb.ExportCache")
proto.RegisterType((*WorkerConstraint)(nil), "pb.WorkerConstraint")
proto.RegisterType((*Definition)(nil), "pb.Definition")
proto.RegisterEnum("pb.MountType", MountType_name, MountType_value)
}
func (m *Op) Marshal() (dAtA []byte, err error) {
size := m.Size()
@ -863,6 +925,47 @@ func (m *Mount) MarshalTo(dAtA []byte) (int, error) {
}
i++
}
if m.MountType != 0 {
dAtA[i] = 0x30
i++
i = encodeVarintOps(dAtA, i, uint64(m.MountType))
}
if m.CacheOpt != nil {
dAtA[i] = 0xa2
i++
dAtA[i] = 0x1
i++
i = encodeVarintOps(dAtA, i, uint64(m.CacheOpt.Size()))
n7, err := m.CacheOpt.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n7
}
return i, nil
}
func (m *CacheOpt) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *CacheOpt) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if len(m.ID) > 0 {
dAtA[i] = 0xa
i++
i = encodeVarintOps(dAtA, i, uint64(len(m.ID)))
i += copy(dAtA[i:], m.ID)
}
return i, nil
}
@ -1012,11 +1115,11 @@ func (m *BuildOp) MarshalTo(dAtA []byte) (int, error) {
dAtA[i] = 0x12
i++
i = encodeVarintOps(dAtA, i, uint64(v.Size()))
n7, err := v.MarshalTo(dAtA[i:])
n8, err := v.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n7
i += n8
}
}
}
@ -1024,11 +1127,11 @@ func (m *BuildOp) MarshalTo(dAtA []byte) (int, error) {
dAtA[i] = 0x1a
i++
i = encodeVarintOps(dAtA, i, uint64(m.Def.Size()))
n8, err := m.Def.MarshalTo(dAtA[i:])
n9, err := m.Def.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n8
i += n9
}
if len(m.Attrs) > 0 {
for k, _ := range m.Attrs {
@ -1119,21 +1222,21 @@ func (m *OpMetadata) MarshalTo(dAtA []byte) (int, error) {
dAtA[i] = 0x1a
i++
i = encodeVarintOps(dAtA, i, uint64(m.WorkerConstraint.Size()))
n9, err := m.WorkerConstraint.MarshalTo(dAtA[i:])
n10, err := m.WorkerConstraint.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n9
i += n10
}
if m.ExportCache != nil {
dAtA[i] = 0x22
i++
i = encodeVarintOps(dAtA, i, uint64(m.ExportCache.Size()))
n10, err := m.ExportCache.MarshalTo(dAtA[i:])
n11, err := m.ExportCache.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n10
i += n11
}
return i, nil
}
@ -1241,11 +1344,11 @@ func (m *Definition) MarshalTo(dAtA []byte) (int, error) {
dAtA[i] = 0x12
i++
i = encodeVarintOps(dAtA, i, uint64((&v).Size()))
n11, err := (&v).MarshalTo(dAtA[i:])
n12, err := (&v).MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n11
i += n12
}
}
return i, nil
@ -1386,6 +1489,23 @@ func (m *Mount) Size() (n int) {
if m.Readonly {
n += 2
}
if m.MountType != 0 {
n += 1 + sovOps(uint64(m.MountType))
}
if m.CacheOpt != nil {
l = m.CacheOpt.Size()
n += 2 + l + sovOps(uint64(l))
}
return n
}
func (m *CacheOpt) Size() (n int) {
var l int
_ = l
l = len(m.ID)
if l > 0 {
n += 1 + l + sovOps(uint64(l))
}
return n
}
@ -2291,6 +2411,137 @@ func (m *Mount) Unmarshal(dAtA []byte) error {
}
}
m.Readonly = bool(v != 0)
case 6:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field MountType", wireType)
}
m.MountType = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowOps
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.MountType |= (MountType(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
case 20:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field CacheOpt", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowOps
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthOps
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.CacheOpt == nil {
m.CacheOpt = &CacheOpt{}
}
if err := m.CacheOpt.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipOps(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthOps
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *CacheOpt) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowOps
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: CacheOpt: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: CacheOpt: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowOps
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthOps
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.ID = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipOps(dAtA[iNdEx:])
@ -3842,60 +4093,66 @@ var (
func init() { proto.RegisterFile("ops.proto", fileDescriptorOps) }
var fileDescriptorOps = []byte{
// 877 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x55, 0xcd, 0x8e, 0x1b, 0x45,
0x10, 0xde, 0x19, 0xff, 0xc4, 0xae, 0x59, 0xc0, 0x34, 0x51, 0xb0, 0xac, 0xc8, 0x6b, 0x26, 0x08,
0x2d, 0x21, 0xeb, 0x95, 0x8c, 0x84, 0x22, 0x0e, 0x91, 0xd6, 0xbb, 0x91, 0x58, 0x50, 0xb4, 0x52,
0x23, 0xc1, 0x31, 0x1a, 0xcf, 0xb4, 0x9d, 0x56, 0xbc, 0xd3, 0xad, 0x9e, 0x9e, 0xac, 0x7d, 0xe1,
0xc0, 0x13, 0x20, 0xf1, 0x14, 0xf0, 0x0e, 0x70, 0xce, 0x91, 0x2b, 0x1c, 0x02, 0x5a, 0x5e, 0x04,
0x55, 0x75, 0xdb, 0x33, 0x59, 0x82, 0x94, 0x15, 0x39, 0xb9, 0xab, 0xea, 0xeb, 0xaf, 0xaa, 0xbe,
0xae, 0x1a, 0x43, 0x57, 0xe9, 0x62, 0xac, 0x8d, 0xb2, 0x8a, 0x85, 0x7a, 0x36, 0x38, 0x58, 0x48,
0xfb, 0xa4, 0x9c, 0x8d, 0x53, 0x75, 0x7e, 0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0xee, 0xcc, 0xda, 0xf4, 0x07, 0xfd, 0xe9, 0x3f,
0x01, 0x00, 0x00, 0xff, 0xff, 0xc0, 0x1c, 0x9d, 0x57, 0xe0, 0x07, 0x00, 0x00,
// 972 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0x5f, 0x8f, 0xdb, 0x44,
0x10, 0x3f, 0x3b, 0x89, 0x2f, 0x1e, 0x5f, 0x8f, 0xb0, 0x9c, 0x4a, 0x14, 0x55, 0xb9, 0xe0, 0x22,
0x14, 0xae, 0xbd, 0x9c, 0x14, 0x04, 0xaa, 0x78, 0xa8, 0x74, 0xf9, 0x23, 0x5d, 0x40, 0x25, 0xd2,
0x5e, 0x05, 0x8f, 0x95, 0x63, 0x6f, 0x52, 0xab, 0x39, 0xef, 0xca, 0x5e, 0xf7, 0x2e, 0x2f, 0x48,
0xf0, 0x09, 0x90, 0xf8, 0x14, 0x7c, 0x08, 0x78, 0xee, 0x23, 0xaf, 0xf0, 0x50, 0xd0, 0xf1, 0x45,
0xd0, 0xce, 0x6e, 0x6c, 0xf7, 0x28, 0x52, 0x2b, 0x78, 0xca, 0xee, 0xcc, 0xec, 0x6f, 0x66, 0x7e,
0xfb, 0xdb, 0x71, 0xc0, 0xe5, 0x22, 0x1b, 0x88, 0x94, 0x4b, 0x4e, 0x6c, 0xb1, 0xe8, 0x1c, 0xaf,
0x62, 0xf9, 0x34, 0x5f, 0x0c, 0x42, 0x7e, 0x71, 0xb2, 0xe2, 0x2b, 0x7e, 0x82, 0xae, 0x45, 0xbe,
0xc4, 0x1d, 0x6e, 0x70, 0xa5, 0x8f, 0xf8, 0xbf, 0x58, 0x60, 0xcf, 0x05, 0xf9, 0x00, 0x9c, 0x38,
0x11, 0xb9, 0xcc, 0xda, 0x56, 0xaf, 0xd6, 0xf7, 0x86, 0xee, 0x40, 0x2c, 0x06, 0x33, 0x65, 0xa1,
0xc6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a, 0x68, 0xf6, 0xd5, 0xa4, 0xb5, 0x43, 0x00, 0x9c, 0xf3,
0xe9, 0x98, 0x4e, 0x1f, 0xb7, 0x2c, 0xb2, 0x0b, 0xb5, 0xf3, 0xf3, 0xb3, 0x96, 0x4d, 0x5c, 0x68,
0x8c, 0x4f, 0xc7, 0x67, 0xd3, 0x56, 0x6d, 0xd4, 0x7a, 0x71, 0xdd, 0xb5, 0x7e, 0xbd, 0xee, 0x5a,
0x7f, 0x5e, 0x77, 0xad, 0x1f, 0xfe, 0xea, 0xee, 0x2c, 0x1c, 0xfc, 0x2b, 0xf1, 0xc9, 0xdf, 0x01,
0x00, 0x00, 0xff, 0xff, 0xd8, 0x84, 0x48, 0xaf, 0x8a, 0x08, 0x00, 0x00,
}

View File

@ -49,6 +49,19 @@ message Mount {
string dest = 3;
int64 output = 4 [(gogoproto.customtype) = "OutputIndex", (gogoproto.nullable) = false];
bool readonly = 5;
MountType mountType = 6;
CacheOpt cacheOpt = 20;
}
enum MountType {
BIND = 0;
SECRET = 1;
SSH = 2;
CACHE = 3;
}
message CacheOpt {
string ID = 1;
}
// CopyOp copies files across Ops.

View File

@ -210,7 +210,7 @@ func (w *Worker) ResolveOp(v solver.Vertex, s frontend.FrontendLLBBridge) (solve
case *pb.Op_Source:
return ops.NewSourceOp(v, op, w.SourceManager, w)
case *pb.Op_Exec:
return ops.NewExecOp(v, op, w.CacheManager, w.Executor, w)
return ops.NewExecOp(v, op, w.CacheManager, w.MetadataStore, w.Executor, w)
case *pb.Op_Build:
return ops.NewBuildOp(v, op, s, w)
default: