It appears that multiple parallel builds suffer some cross talk between their
mount/snapshots e.g. this new case currently fails because iterations see files
in `/src/` which correspond to other iterations (i.e. iteration 1 might see a
file called "test2.txt"). The `ls -i` and `stat` output also confirms that
where tests see the same filename they are also apparently seeing the same
inode.
Note that each solve uses a `SolverOpt.SharedKey` of the (unique) source
directory so there should be no clashes. Use of `llb.sharedKeyHint()` is
avoided since using a unique one of these hides the issue (AIUI uniqueness of
`sharedKeyHint` is only required with a session, not between them).
The shell fragment within the test is a bit crazy, it tries to output as much
info about what it saw vs what was expected to aid debugging.
I have also been seeing cases in my own code where `cacheContext.checksum`
fails the `not found` test at the top, which seems like either the wrong thing
is mounted or it has gone away or otherwise been mutated unexpectedly. I had
been hoping that this test case would also reproduce this, but so far it has
not.
Signed-off-by: Ian Campbell <ijc@docker.com>
The command, used as the dot label, can contain quotes which need escaping when
used within the quoted string.
Formatting with `%q` rather than `\"%s\"` does this for us.
I don't believe digests or the shapes can ever contain quotes (or other unusual
characters) but switch them to `%q` as well for consistency.
Signed-off-by: Ian Campbell <ijc@docker.com>
`dispatchStates` manages a collection of `dispatchState`.
By `dispatchStates`, we can aggregate how to find `dispatchState`
in one place and `dispatchStatesByName` local variable in `Dockerfile2LLB`
can be removed.
Signed-off-by: Yuichiro Kaneko <spiketeika@gmail.com>
if buildkitd is being executed as the mapepd-root ($USER==root)
in a rootless container, we need to enable the rootless mode but
we don't want to honor $HOME.
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
The error appears in
```
RUN go build -ldflags "$(cat .tmp/ldflags)" -o /buildctl.exe ./cmd/buildctl
```
and
```
RUN go build -ldflags "$(cat .tmp/ldflags)" -o /buildkitd.exe ./cmd/buildkitd
```
We ignore ".tmp" by ".dockerignore" file, so `COPY . .`
does not copy ".tmp".
This commit changes the image for "cross-windows" and removes
not needed instructions which are done by "buildkit-base".
This is follow up of https://github.com/moby/buildkit/pull/398
Signed-off-by: Yuichiro Kaneko <spiketeika@gmail.com>