diff --git a/stdlib/dagger/dagger.cue b/stdlib/dagger/dagger.cue index 2f66e734..39128169 100644 --- a/stdlib/dagger/dagger.cue +++ b/stdlib/dagger/dagger.cue @@ -1,14 +1,17 @@ package dagger import ( + "dagger.io/dagger/op" ) -// "dagger.io/dagger/op" // An artifact such as source code checkout, container image, binary archive... // May be passed as user input, or computed by a buildkit pipeline -// FIXME (perf). See https://github.com/dagger/dagger/issues/445 -#Artifact: _ +#Artifact: { + #up: [...op.#Op] + _ + ... +} // Secret value // FIXME: currently aliased as a string to mark secrets diff --git a/stdlib/dagger/op/op.cue b/stdlib/dagger/op/op.cue index b590160e..18f1e3ee 100644 --- a/stdlib/dagger/op/op.cue +++ b/stdlib/dagger/op/op.cue @@ -2,7 +2,16 @@ package op // One operation in a pipeline -#Op: #Export | +// +// #Op does not enforce the op spec at full resolution, to avoid triggering performance issues. +// See https://github.com/dagger/dagger/issues/445 +#Op: { + do: string + ... +} + +// Full resolution schema enforciong the complete op spec +#OpFull: #Export | #FetchContainer | #PushContainer | #FetchGit | @@ -48,10 +57,7 @@ package op // `true` means also ignoring the mount cache volumes always?: true | *false dir: string | *"/" - // FIXME (perf): complex schema in low-level ops causes explosive perf issues - // see https://github.com/dagger/dagger/issues/445 - // mount: [string]: "tmpfs" | "cache" | {from: _, path: string | *"/"} - mount: [string]: _ + mount: [string]: "tmpfs" | "cache" | {from: _, path: 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) diff --git a/stdlib/os/container.cue b/stdlib/os/container.cue index 92fddc52..f13185f8 100644 --- a/stdlib/os/container.cue +++ b/stdlib/os/container.cue @@ -50,8 +50,7 @@ import ( // Mount is active when executing `command`, but not `setup`. mount: [string]: { - // FIXME(perf) should be #Artifact. See https://github.com/dagger/dagger/issues/445 - from: {...} + from: dagger.#Artifact // FIXME: support source path }