stdlib: simpler and cleaner performance workaround

Signed-off-by: Solomon Hykes <solomon@dagger.io>
This commit is contained in:
Solomon Hykes 2021-05-13 23:20:58 +00:00 committed by Solomon Hykes
parent 78dbb64e6a
commit b526093929
3 changed files with 18 additions and 10 deletions

View File

@ -1,14 +1,17 @@
package dagger package dagger
import ( import (
"dagger.io/dagger/op"
) )
// "dagger.io/dagger/op"
// An artifact such as source code checkout, container image, binary archive... // An artifact such as source code checkout, container image, binary archive...
// May be passed as user input, or computed by a buildkit pipeline // 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 // Secret value
// FIXME: currently aliased as a string to mark secrets // FIXME: currently aliased as a string to mark secrets

View File

@ -2,7 +2,16 @@
package op package op
// One operation in a pipeline // 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 | #FetchContainer |
#PushContainer | #PushContainer |
#FetchGit | #FetchGit |
@ -48,10 +57,7 @@ package op
// `true` means also ignoring the mount cache volumes // `true` means also ignoring the mount cache volumes
always?: true | *false always?: true | *false
dir: string | *"/" dir: string | *"/"
// FIXME (perf): complex schema in low-level ops causes explosive perf issues mount: [string]: "tmpfs" | "cache" | {from: _, path: string | *"/"}
// see https://github.com/dagger/dagger/issues/445
// mount: [string]: "tmpfs" | "cache" | {from: _, path: string | *"/"}
mount: [string]: _
// Map of hostnames to ip // Map of hostnames to ip
hosts?: [string]: string hosts?: [string]: string
// User to exec with (if left empty, will default to the set user in the image) // User to exec with (if left empty, will default to the set user in the image)

View File

@ -50,8 +50,7 @@ import (
// Mount is active when executing `command`, but not `setup`. // Mount is active when executing `command`, but not `setup`.
mount: [string]: { mount: [string]: {
// FIXME(perf) should be #Artifact. See https://github.com/dagger/dagger/issues/445 from: dagger.#Artifact
from: {...}
// FIXME: support source path // FIXME: support source path
} }