Merge pull request #858 from grouville/performance-op-exec

op.#Exec hack: performance improvement
This commit is contained in:
Andrea Luzzardi 2021-07-30 13:41:55 +02:00 committed by GitHub
commit df0442c307
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 1 deletions

View File

@ -512,6 +512,10 @@ func (p *Pipeline) mount(ctx context.Context, dest string, mnt *compiler.Value)
}
// eg. mount: "/foo": { from: www.source }
if !mnt.Lookup("from").Exists() {
return nil, fmt.Errorf("invalid mount: should have %s structure",
"{from: _, path: string | *\"/\"}")
}
from := NewPipeline(mnt.Lookup("from"), p.s)
if err := from.Run(ctx); err != nil {
return nil, err

View File

@ -50,7 +50,13 @@ package op
// `true` means also ignoring the mount cache volumes
always?: true | *false
dir: string | *"/"
mount: [string]: "tmpfs" | "cache" | {from: _, path: string | *"/"} | {secret: _}
// HACK: FIXME later [Performance related]
// mount: [string]: "tmpfs" | "cache" | {from: _, path: string | *"/"} | {secret: _}
// https://github.com/dagger/dagger/issues/856
mount: [string]: {
_
...
}
// Map of hostnames to ip
hosts?: [string]: string
// User to exec with (if left empty, will default to the set user in the image)