dagger: Nested docker.#Build fails
When using docker.#Build as a step within another docker.#Build, dagger throws CUE errors.
I’ve narrowed it down to builds containing multiple steps:
_build: docker.#Build & {
steps: [
docker.#Build & {
steps: [
docker.#Pull & {
source: "alpine"
},
// FIXME: the following breaks with:
// actions.deploy._build._dag."0".output: 1 errors in empty disjunction::
// pkg/universe.dagger.io/docker/build.cue:26:11
docker.#Run & {
cmd: name: "ls"
},
]
},
docker.#Run & {
cmd: name: "ls"
},
]
}
/cc @shykes
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 1
- Comments: 27 (20 by maintainers)
No solution yet, but we have prioritized it. Sorry.
As discussed on discord, I have the same issue on a gcp package. Hope this gets fixed soon. I’ve basically got 3.nested
docker.#Buildwhich would be really convenient if it did work. For now I’ll break down mydocker.#Buildin order to have my package working. I’m definitely looking forward to changing my package once this works.@shykes I think you’re referring to https://github.com/cue-lang/cue/issues/474 (which also links to https://github.com/cue-lang/cue/issues/1348).
A drive-by question on the suggestion above to change from a list to a struct, but does doing so not rule out the possibility of ever parallelising the steps? That question might be moot in the context of Docker build, however; I defer to you on that point!
Simplified repro case:
Fails with:
However, changing
#TestStep._runto#TestStep.runworks.Added as a (failing) test case: https://github.com/dagger/dagger/pull/1471