-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Description
When we run the second target from this HLB:
fs _first() {
image "busybox"
run "echo first" with option {
mount scratch localCwd as first
}
}
fs _second() {
_first
run "echo second" with option {
mount first localCwd as second
}
}
we will see something like:
#1 resolve image config for docker.io/library/busybox:latest
#1 DONE 0.4s
#2 docker-image://docker.io/library/busybox:latest
#2 resolve docker.io/library/busybox:latest
#2 resolve docker.io/library/busybox:latest 0.3s done
#2 CACHED
#3 /bin/sh -c 'echo first'
#3 CACHED
#4 /bin/sh -c 'echo first'
#4 0.270 first
#4 DONE 0.3s
#5 /bin/sh -c 'echo second'
#5 0.499 second
#5 DONE 0.5s
Note the echo first is evaluated twice, if we add noCache it will run echo first twice in two different containers. The duplication goes away when we remove this line
I am at a loss for how to fix this. It seems the first mount is getting evaluated twice once has ForceNoOutput applied and one has the Bind logic applied. I am not sure why the Bind logic would not be applied in both locations.
We should probably revert #347 and #348 unless anyone has ideas on how to work around this.
Metadata
Metadata
Assignees
Labels
No labels