Reproduced with my repo here: https://github.com/chrisjpalmer/dagger-file-caching-bug/tree/main
This demo repo shows a race condition when multiple files are passed to a module in parallel. Though the files are different, occassionally the contents of one file is mixed with another.
❯ dagger call -m my-module-tests test-my-module
✔ connect 0.3s
✔ load module: my-module-tests 0.3s
✔ myModuleTests: MyModuleTests! 0.0s
✘ .testMyModule(
┆ fixtures: context /Users/christopher.palmer/workspace/dagger-caching-bug/my-module-tests/my-module-tests/fixtures (exclude: [])
): Void 1.3s ERROR
✘ MyModule.expectFileContents(
┆ expect: "d"
┆ file: Directory.file(path: "d"): File!
): Void 1.1s ERROR
! expected value d doesn't match actual contents c
https://dagger.cloud/nine/traces/986467472d6fa2f5a1eedbcf7e99a978