#@Erik Sipsma @vito @AlexCB @justin Hey

1 messages · Page 1 of 1 (latest)

thin hearth
#

The super weird thing is that it didn't seem to happen when I did the original PR on lazy runtime so it may either be function caching? Or something weird I changed in my PR but I'm not touching any of that

thin hearth
#

I found a workaround to avoid that problem but it still very strange.

My workaround is that instead of directly mouting the source directory, I wrap it in a fresh directory:

func (c *moduleConfig) wrappedSourceDirectory() *dagger.Directory {
    return dag.Directory().WithDirectory("/",
        c.contextDirectory,
        dagger.DirectoryWithDirectoryOpts{
            Include: []string{filepath.Join(c.subPath, SrcDir)},
        },
    ).Directory(filepath.Join(c.subPath, SrcDir))
}

I don't understand why this work and no the other, I'm still accessing host.Directory to copy it to a fresh directory

royal pendant
thin hearth
#

It only happens in the integration tests when we have parallel tests tho, so it’s quite complex

royal pendant
thin hearth
#

Yes, I was able to repro it when running a simple set of subtest like TestTypescript/TestInit that have like 5 tests running in parallel