When executing dagger develop using ExperimentalPrivilegedNesting I get the following error:
failed to get content hash: failed to get directory: failed to get snapshot: failed to snapshot: failed to receive stat message: rpc error: code = NotFound desc = get full root path: rpc error: code = NotFound desc = eval symlinks: lstat /src: no such file or directory
This does not cause the execution to fail, and the generated files are present in the returned directory.
This can be reproduced using this example (0.19.3):
package main
import (
"context"
"dagger/test/internal/dagger"
)
type Test struct {
Src *dagger.Directory
}
func New(src *dagger.Directory) *Test {
return &Test{Src: src}
}
func (m *Test) Codegen(ctx context.Context) (*dagger.Directory, error) {
dcli, err := daggerCLI(ctx)
if err != nil {
return nil, err
}
dcliSrc := dcli.
WithDirectory("/src", m.Src).
WithWorkdir("/src")
return dcliSrc.
WithExec([]string{"dagger", "develop"}, dagger.ContainerWithExecOpts{ExperimentalPrivilegedNesting: true}).
Directory("."), nil
}
func daggerCLI(ctx context.Context) (*dagger.Container, error) {
ver, err := dag.Version(ctx)
if err != nil {
return nil, err
}
return dag.Container().From("alpine:3.22").
WithEnvVariable("DAGGER_VERSION", ver).
WithExec([]string{"apk", "add", "curl", "git"}).
WithExec([]string{
"sh",
"-o",
"pipefail",
"-exc",
`curl -fsSL https://dl.dagger.io/dagger/install.sh | BIN_DIR=/usr/local/bin sh`}), nil
}