Closed tduffield closed 4 years ago
Thank you for the bug report! I think this was recently fixed by #168, but I don't think there has been a release since then. I can try to put out a new release soon. If you are able to try with a build from master and confirm it is fixed it would be much appreciated!
Since opening this issue I've found #168. The build above was based off master, so I'm not sure if #168 solved the issue or not. Going to try and dig in deeper.
Found the issue. It was seeing modifications to the .git
directory. I've verified locally, and have opened up a PR.
I'm not sure if this is desired behavior, or something that is even fixable at this point, but this ate up my entire day so I wanted to document it for others that might run into the same issue.
If you use the default context (
.
), your image will always be marked as stale because the folder will be marked as modified by the previous build's.dobi
file. There is then a "race condition" (in quotes because modtime always seems to win this race) between when your file is marked as modified, and the parent folder is marked as modified. The image file always wins, so it triggers this condition and marks the image as stale.Luckily, Docker caching won't make this an expensive operation locally, but it can be very confusing when you're just learning the tool and figuring out how to use it in a CI pipeline where each task will be in a separate job, and you're very concerned why your
depends
and.dobi
files aren't being respected as you expect.It's possible this is an OS specific issue: I'm running MacOS 10.15.4. It might depend on how your OS handles updating the mtime of the file and its parent folder.