DX: change "#dagger: compute: " to "#compute: "

Signed-off-by: Solomon Hykes <sh.github.6811@hykes.org>
This commit is contained in:
Solomon Hykes
2021-02-12 23:22:41 +00:00
parent 3f445f2421
commit 7a77466a66
81 changed files with 176 additions and 229 deletions

View File

@@ -1,3 +1,3 @@
package testing
#dagger: compute: true
#compute: true

View File

@@ -1,3 +1,3 @@
package testing
#dagger: compute: 123
#compute: 123

View File

@@ -1,16 +0,0 @@
package testing
bar: #dagger: {
#new_def: "lala"
compute: [{
do: "fetch-container"
ref: "busybox"
},
{
do: "exec"
args: ["true"]
dir: "/"
}]
}

View File

@@ -1,16 +0,0 @@
package testing
bar: #dagger: {
new_prop: "lala"
compute: [{
do: "fetch-container"
ref: "busybox"
},
{
do: "exec"
args: ["true"]
dir: "/"
}]
}

View File

@@ -1,3 +1,3 @@
package testing
#dagger: compute: "whatever"
#compute: "whatever"

View File

@@ -1,3 +1,3 @@
package testing
#dagger: compute: whatever: "wrong"
#compute: whatever: "wrong"

View File

@@ -1,11 +1,6 @@
package testing
// no-op, should not error
realempty: {
#dagger: {}
}
// no-op, should not error
empty: {
#dagger: compute: []
#compute: []
}

View File

@@ -6,7 +6,7 @@ new_prop: "lala"
new_prop_too: string
#new_def_too: string
#dagger: compute: [{
#compute: [{
do: "fetch-container"
ref: "busybox"
},

View File

@@ -7,7 +7,7 @@ foo: {
new_prop_too: string
#new_def_too: string
#dagger: compute: [{
#compute: [{
do: "fetch-container"
ref: "busybox"
},

View File

@@ -1,6 +1,6 @@
package testing
#dagger: compute: [
#compute: [
{
do: "fetch-container"
ref: "busybox"

View File

@@ -3,7 +3,7 @@ package testing
test1: {
string
#dagger: compute: [
#compute: [
{
do: "fetch-container"
ref: "busybox"
@@ -25,7 +25,7 @@ test1: {
test2: {
string
#dagger: compute: [
#compute: [
{
do: "fetch-container"
ref: "busybox"

View File

@@ -1,6 +1,6 @@
package testing
component: #dagger: compute: [{
component: #compute: [{
do: "fetch-container"
ref: "alpine"
}, {
@@ -14,7 +14,7 @@ component: #dagger: compute: [{
test1: {
string
#dagger: compute: [
#compute: [
{
do: "fetch-container"
ref: "busybox"
@@ -36,14 +36,14 @@ test1: {
test2: {
string
#dagger: compute: [
#compute: [
{
do: "fetch-container"
ref: "busybox"
},
{
do: "copy"
from: #dagger: compute: [{
from: #compute: [{
do: "fetch-container"
ref: "alpine"
}, {

View File

@@ -3,7 +3,7 @@ package testing
test: {
string
#dagger: compute: [
#compute: [
{
do: "fetch-container"
ref: "busybox"

View File

@@ -3,7 +3,7 @@ package testing
A: {
result: string
#dagger: compute: [
#compute: [
{
do: "fetch-container"
ref: "alpine"
@@ -28,7 +28,7 @@ A: {
B: {
result: string
#dagger: compute: [
#compute: [
{
do: "fetch-container"
ref: "alpine"

View File

@@ -3,7 +3,7 @@ package testing
A: {
result: string
#dagger: compute: [
#compute: [
{
do: "fetch-container"
ref: "alpine"
@@ -28,7 +28,7 @@ A: {
B: {
result: string
#dagger: compute: [
#compute: [
{
do: "fetch-container"
ref: "alpine"

View File

@@ -5,7 +5,7 @@ import "encoding/json"
A: {
string
#dagger: compute: [
#compute: [
{
do: "fetch-container"
ref: "alpine"
@@ -32,7 +32,7 @@ unmarshalled: json.Unmarshal(A)
B: {
result: string
#dagger: compute: [
#compute: [
{
do: "fetch-container"
ref: "alpine"

View File

@@ -5,7 +5,7 @@ import "dagger.io/dagger"
// Set to `--input-dir=./tests/dockerbuild/testdata`
TestData: dagger.#Dir
TestInlinedDockerfile: #dagger: compute: [
TestInlinedDockerfile: #compute: [
dagger.#DockerBuild & {
dockerfile: """
FROM alpine:latest@sha256:ab00606a42621fb68f2ed6ad3c88be54397f981a7b70a79db3d1172b11c4367d
@@ -14,7 +14,7 @@ TestInlinedDockerfile: #dagger: compute: [
},
]
TestOpChaining: #dagger: compute: [
TestOpChaining: #compute: [
dagger.#DockerBuild & {
dockerfile: """
FROM alpine:latest@sha256:ab00606a42621fb68f2ed6ad3c88be54397f981a7b70a79db3d1172b11c4367d
@@ -26,7 +26,7 @@ TestOpChaining: #dagger: compute: [
}
]
TestBuildContext: #dagger: compute: [
TestBuildContext: #compute: [
dagger.#DockerBuild & {
context: TestData
},
@@ -35,7 +35,7 @@ TestBuildContext: #dagger: compute: [
}
]
TestBuildContextAndDockerfile: #dagger: compute: [
TestBuildContextAndDockerfile: #compute: [
dagger.#DockerBuild & {
context: TestData
dockerfile: """
@@ -48,7 +48,7 @@ TestBuildContextAndDockerfile: #dagger: compute: [
}
]
TestDockerfilePath: #dagger: compute: [
TestDockerfilePath: #compute: [
dagger.#DockerBuild & {
context: TestData
dockerfilePath: "./dockerfilepath/Dockerfile.custom"
@@ -58,7 +58,7 @@ TestDockerfilePath: #dagger: compute: [
}
]
TestBuildArgs: #dagger: compute: [
TestBuildArgs: #compute: [
dagger.#DockerBuild & {
dockerfile: """
FROM alpine:latest@sha256:ab00606a42621fb68f2ed6ad3c88be54397f981a7b70a79db3d1172b11c4367d
@@ -70,7 +70,7 @@ TestBuildArgs: #dagger: compute: [
]
// FIXME: this doesn't test anything beside not crashing
TestBuildLabels: #dagger: compute: [
TestBuildLabels: #compute: [
dagger.#DockerBuild & {
dockerfile: """
FROM alpine:latest@sha256:ab00606a42621fb68f2ed6ad3c88be54397f981a7b70a79db3d1172b11c4367d
@@ -80,7 +80,7 @@ TestBuildLabels: #dagger: compute: [
]
// FIXME: this doesn't test anything beside not crashing
TestBuildPlatform: #dagger: compute: [
TestBuildPlatform: #compute: [
dagger.#DockerBuild & {
dockerfile: """
FROM alpine:latest@sha256:ab00606a42621fb68f2ed6ad3c88be54397f981a7b70a79db3d1172b11c4367d

View File

@@ -1,6 +1,6 @@
package testing
#dagger: compute: [
#compute: [
{
do: "fetch-container"
ref: "alpine"

View File

@@ -1,6 +1,6 @@
package testing
#dagger: compute: [
#compute: [
{
do: "fetch-container"
ref: "alpine"

View File

@@ -1,6 +1,6 @@
package testing
#dagger: compute: [
#compute: [
{
do: "fetch-container"
ref: "alpine"

View File

@@ -1,6 +1,6 @@
package testing
#dagger: compute: [
#compute: [
{
do: "fetch-container"
ref: "alpine"

View File

@@ -2,7 +2,7 @@ package testing
bar: string
#dagger: compute: [
#compute: [
{
do: "fetch-container"
ref: "alpine"

View File

@@ -1,6 +1,6 @@
package testing
#dagger: compute: [
#compute: [
{
do: "fetch-container"
ref: "alpine"

View File

@@ -1,6 +1,6 @@
package testing
#dagger: compute: [
#compute: [
{
do: "fetch-container"
ref: "alpine"

View File

@@ -1,6 +1,6 @@
package testing
#dagger: compute: [
#compute: [
{
do: "fetch-container"
ref: "alpine"

View File

@@ -1,6 +1,6 @@
package testing
#dagger: compute: [
#compute: [
{
do: "fetch-container"
ref: "alpine"

View File

@@ -1,6 +1,6 @@
package testing
#dagger: compute: [
#compute: [
{
do: "fetch-container"
ref: "alpine"

View File

@@ -3,7 +3,7 @@ package testing
hello: "world"
bar: string
#dagger: compute: [
#compute: [
{
do: "fetch-container"
ref: "alpine"

View File

@@ -3,7 +3,7 @@ package testing
hello: "world"
bar: string
#dagger: compute: [
#compute: [
{
do: "fetch-container"
ref: "alpine"

View File

@@ -2,18 +2,16 @@ package def
#dang: string
#dagger: {
compute: [
{
do: "fetch-container"
ref: "alpine"
},
{
do: "exec"
dir: "/"
args: ["sh", "-c", """
echo success
"""]
},
]
}
#compute: [
{
do: "fetch-container"
ref: "alpine"
},
{
do: "exec"
dir: "/"
args: ["sh", "-c", """
echo success
"""]
},
]

View File

@@ -4,11 +4,9 @@ import (
"dagger.io/def"
)
#dagger: {
compute: [
{
do: "load",
from: def
},
]
}
#compute: [
{
do: "load",
from: def
},
]

View File

@@ -2,19 +2,17 @@ package nonoptional
dang: string
#dagger: {
compute: [
{
do: "fetch-container"
ref: "alpine"
},
{
do: "exec"
dir: "/"
args: ["sh", "-c", """
echo "This test SHOULD fail, because this SHOULD be executed"
exit 1
"""]
},
]
}
#compute: [
{
do: "fetch-container"
ref: "alpine"
},
{
do: "exec"
dir: "/"
args: ["sh", "-c", """
echo "This test SHOULD fail, because this SHOULD be executed"
exit 1
"""]
},
]

View File

@@ -4,11 +4,9 @@ import (
"dagger.io/nonoptional"
)
#dagger: {
compute: [
{
do: "load",
from: nonoptional
},
]
}
#compute: [
{
do: "load",
from: nonoptional
},
]

View File

@@ -2,18 +2,16 @@ package optional
dang?: string
#dagger: {
compute: [
{
do: "fetch-container"
ref: "alpine"
},
{
do: "exec"
dir: "/"
args: ["sh", "-c", """
echo success
"""]
},
]
}
#compute: [
{
do: "fetch-container"
ref: "alpine"
},
{
do: "exec"
dir: "/"
args: ["sh", "-c", """
echo success
"""]
},
]

View File

@@ -4,11 +4,9 @@ import (
"dagger.io/optional"
)
#dagger: {
compute: [
{
do: "load",
from: optional
},
]
}
#compute: [
{
do: "load",
from: optional
},
]

View File

@@ -3,7 +3,7 @@ package testing
test: {
bool
#dagger: compute: [
#compute: [
{
do: "fetch-container"
ref: "alpine"

View File

@@ -3,7 +3,7 @@ package testing
test1: {
string
#dagger: compute: [
#compute: [
{
do: "fetch-container"
ref: "alpine"
@@ -27,7 +27,7 @@ test1: {
test2: {
string
#dagger: compute: [
#compute: [
{
do: "fetch-container"
ref: "alpine"
@@ -51,7 +51,7 @@ test2: {
test3: {
string
#dagger: compute: [
#compute: [
{
do: "fetch-container"
ref: "alpine"
@@ -75,7 +75,7 @@ test3: {
test4: {
string
#dagger: compute: [
#compute: [
{
do: "fetch-container"
ref: "alpine"
@@ -99,7 +99,7 @@ test4: {
test5: {
string
#dagger: compute: [
#compute: [
{
do: "fetch-container"
ref: "alpine"
@@ -123,7 +123,7 @@ test5: {
test6: {
string
#dagger: compute: [
#compute: [
{
do: "fetch-container"
ref: "alpine"
@@ -147,7 +147,7 @@ test6: {
test7: {
string
#dagger: compute: [
#compute: [
{
do: "fetch-container"
ref: "alpine"
@@ -171,7 +171,7 @@ test7: {
test8: {
string
#dagger: compute: [
#compute: [
{
do: "fetch-container"
ref: "alpine"
@@ -195,7 +195,7 @@ test8: {
test9: {
string
#dagger: compute: [
#compute: [
{
do: "fetch-container"
ref: "alpine"
@@ -219,7 +219,7 @@ test9: {
test10: {
string
#dagger: compute: [
#compute: [
{
do: "fetch-container"
ref: "alpine"

View File

@@ -3,7 +3,7 @@ package testing
test: {
float
#dagger: compute: [
#compute: [
{
do: "fetch-container"
ref: "alpine"

View File

@@ -3,7 +3,7 @@ package testing
teststring: {
string
#dagger: compute: [
#compute: [
{
do: "fetch-container"
ref: "alpine"

View File

@@ -3,7 +3,7 @@ package testing
teststring: {
string
#dagger: compute: [
#compute: [
{
do: "fetch-container"
ref: "alpine"

View File

@@ -4,7 +4,7 @@ test: {
string
=~"^NAAAA.+"
#dagger: compute: [
#compute: [
{
do: "fetch-container"
ref: "alpine"

View File

@@ -3,7 +3,7 @@ package testing
testScalar: {
bool
#dagger: compute: [
#compute: [
{
do: "fetch-container"
ref: "alpine"
@@ -25,7 +25,7 @@ testScalar: {
]
}
testMap: #dagger: compute: [
testMap: #compute: [
{
do: "fetch-container"
ref: "alpine"
@@ -50,7 +50,7 @@ testMap: #dagger: compute: [
// testList: {
// [...string]
// #dagger: compute: [
// #compute: [
// {
// do: "fetch-container"
// ref: "alpine"

View File

@@ -3,7 +3,7 @@ package testing
test: {
number
#dagger: compute: [
#compute: [
{
do: "fetch-container"
ref: "alpine"

View File

@@ -3,7 +3,7 @@ package testing
test: {
string
#dagger: compute: [
#compute: [
{
do: "fetch-container"
ref: "alpine"

View File

@@ -4,7 +4,7 @@ test: {
string
=~"^some.+"
#dagger: compute: [
#compute: [
{
do: "fetch-container"
ref: "alpine"

View File

@@ -3,7 +3,7 @@ package testing
testScalar: {
bool
#dagger: compute: [
#compute: [
{
do: "fetch-container"
ref: "alpine"
@@ -30,7 +30,7 @@ testScalar: {
// testList: {
// [...string]
// #dagger: compute: [
// #compute: [
// {
// do: "fetch-container"
// ref: "alpine"
@@ -54,7 +54,7 @@ testScalar: {
// ]
// }
testMap: #dagger: compute: [
testMap: #compute: [
{
do: "fetch-container"
ref: "alpine"

View File

@@ -1,34 +1,34 @@
package testing
busybox1: #dagger: compute: [
busybox1: #compute: [
{
do: "fetch-container"
ref: "busybox"
},
]
busybox2: #dagger: compute: [
busybox2: #compute: [
{
do: "fetch-container"
ref: "busybox:latest"
},
]
busybox3: #dagger: compute: [
busybox3: #compute: [
{
do: "fetch-container"
ref: "busybox:1.33-musl"
},
]
busybox4: #dagger: compute: [
busybox4: #compute: [
{
do: "fetch-container"
ref: "busybox@sha256:e2af53705b841ace3ab3a44998663d4251d33ee8a9acaf71b66df4ae01c3bbe7"
},
]
busybox5: #dagger: compute: [
busybox5: #compute: [
{
do: "fetch-container"
ref: "busybox:1.33-musl@sha256:e2af53705b841ace3ab3a44998663d4251d33ee8a9acaf71b66df4ae01c3bbe7"

View File

@@ -1,6 +1,6 @@
package testing
#dagger: compute: [
#compute: [
{
do: "fetch-container"
},

View File

@@ -1,6 +1,6 @@
package testing
#dagger: compute: [
#compute: [
{
do: "fetch-container"
ref: "alpine@sha256:c6c7524e2111f22a9f7577211232d89a9e68cf5b9ed4a41ba77957c9771380a5"

View File

@@ -2,7 +2,7 @@ package testing
// XXX WATCHOUT
// Once buildkit has pulled that digest, it will stay cached and happily succeed WHATEVER the image name then is
#dagger: compute: [
#compute: [
{
do: "fetch-container"
ref: "busyboxaaa@sha256:e2af53705b841ace3ab3a44998663d4251d33ee8a9acaf71b66df4ae01c3bbe7"

View File

@@ -1,6 +1,6 @@
package testing
#dagger: compute: [
#compute: [
{
do: "fetch-container"
ref: "doesnotexist"

View File

@@ -1,6 +1,6 @@
package testing
#dagger: compute: [
#compute: [
{
do: "fetch-container"
ref: "alpine:doesnotexist"

View File

@@ -1,6 +1,6 @@
package testing
#dagger: compute: [
#compute: [
{
do: "fetch-git"
remote: "https://github.com/blocklayerhq/acme-clothing.git"

View File

@@ -1,6 +1,6 @@
package testing
#dagger: compute: [
#compute: [
{
do: "fetch-git"
},

View File

@@ -1,6 +1,6 @@
package testing
#dagger: compute: [
#compute: [
{
do: "fetch-git"
remote: "pork://pork"

View File

@@ -1,6 +1,6 @@
package testing
#dagger: compute: [
#compute: [
{
do: "fetch-git"
remote: "https://github.com/blocklayerhq/acme-clothing.git"

View File

@@ -1,6 +1,6 @@
package testing
#dagger: compute: [
#compute: [
{
do: "fetch-git"
remote: "https://github.com/blocklayerhq/lalalala.git"

View File

@@ -5,7 +5,7 @@ X1=in: string | *"default input"
test: {
string
#dagger: compute: [
#compute: [
{
do: "fetch-container"
ref: "alpine"

View File

@@ -5,7 +5,7 @@ X1=in: string
test: {
string
#dagger: compute: [
#compute: [
{
do: "fetch-container"
ref: "alpine"

View File

@@ -3,7 +3,7 @@ package testing
test1: {
string
#dagger: compute: [
#compute: [
{
do: "load"
from: [{do: "fetch-container", ref: "alpine"}]
@@ -19,7 +19,7 @@ test1: {
test2: {
string
#dagger: compute: [
#compute: [
{
do: "load"
from: [{do: "fetch-container", ref: "busybox"}]

View File

@@ -1,6 +1,6 @@
package testing
component: #dagger: compute: [{
component: #compute: [{
do: "fetch-container"
ref: "alpine"
}, {
@@ -14,7 +14,7 @@ component: #dagger: compute: [{
test1: {
string
#dagger: compute: [
#compute: [
{
do: "load"
from: component
@@ -30,10 +30,10 @@ test1: {
test2: {
string
#dagger: compute: [
#compute: [
{
do: "load"
from: #dagger: compute: [{
from: #compute: [{
do: "fetch-container"
ref: "alpine"
}, {

View File

@@ -3,7 +3,7 @@ package testing
test: {
string
#dagger: compute: [
#compute: [
{
do: "load"
from: [{do: "fetch-container", ref: "alpine"}]

View File

@@ -3,7 +3,7 @@ package testing
test: {
string
#dagger: compute: [
#compute: [
{
do: "load"
from: [{do: "fetch-container", ref: "alpine"}]

View File

@@ -3,7 +3,7 @@ package testing
test: {
string
#dagger: compute: [
#compute: [
{
do: "load"
from: [{do: "fetch-container", ref: "alpine"}]
@@ -13,8 +13,8 @@ test: {
args: ["sh", "-c", """
cat /mnt/test/lol > /out
"""]
mount: "/mnt/test": {
from: #dagger: compute: [
mount: "/mnt/test": from: {
#compute: [
{
do: "fetch-container"
ref: "alpine"

View File

@@ -3,7 +3,7 @@ package testing
test: {
string
#dagger: compute: [
#compute: [
{
do: "load"
from: [{do: "fetch-container", ref: "alpine"}]

View File

@@ -3,7 +3,7 @@ package testing
test: {
string
#dagger: compute: [
#compute: [
{
do: "load"
from: [{do: "fetch-container", ref: "alpine"}]

View File

@@ -1,6 +1,6 @@
package test
#dagger: compute: [
#compute: [
{
do: "fetch-container"
ref: "busybox"

View File

@@ -3,7 +3,7 @@ package main
hello: {
string
#dagger: compute: [
#compute: [
{
do: "fetch-container"
ref: "alpine"

View File

@@ -43,13 +43,9 @@ test::compute(){
"$dagger" "${DAGGER_BINARY_ARGS[@]}" compute "$d"/compute/invalid/int
test::one "Compute: invalid struct should fail" --exit=1 --stdout= \
"$dagger" "${DAGGER_BINARY_ARGS[@]}" compute "$d"/compute/invalid/struct
disable test::one "Compute: overloading #ComponentScript with new prop should fail (FIXME: unauthorized fields are not checked)" --exit=1 \
"$dagger" "${DAGGER_BINARY_ARGS[@]}" compute "$d"/compute/invalid/overload/new_prop
test::one "Compute: overloading #ComponentScript with new def should succeed" --exit=0 \
"$dagger" "${DAGGER_BINARY_ARGS[@]}" compute "$d"/compute/invalid/overload/new_def
# Compute: success
test::one "Compute: noop should succeed" --exit=0 --stdout='{"empty":{},"realempty":{}}' \
test::one "Compute: noop should succeed" --exit=0 --stdout='{"empty":{}}' \
"$dagger" "${DAGGER_BINARY_ARGS[@]}" compute "$d"/compute/success/noop
test::one "Compute: simple should succeed" --exit=0 --stdout="{}" \
"$dagger" "${DAGGER_BINARY_ARGS[@]}" compute "$d"/compute/success/simple