Feature Request: Disable `git status` checks for adaptive non-unity build
See original GitHub issueI noticed this in the logs of a build under Hyper-V isolation on Windows:
Using 'git status' to determine working set for adaptive non-unity build (C:\UnrealEngine).
Waiting for 'git status' command to complete
Terminating git child process due to timeout
Presumably this timeout is due to either CPU starvation due to lack of cores in the VM (https://github.com/moby/moby/issues/38387), or general IO awfulness under Hyper-V isolation.
Either way, calling git status
at all seems needless, since any source changes will invalidate the Docker cache all the way back in ue4-source, so build outputs in ue4-minimal are never going to see incremental builds.
Is it possible for ue4-docker to default to disabling the adaptive non-unity build?
I haven’t checked if this is a parameter we can pass into BuildGraph, or if it would require live-patching or something, so I don’t know if this is easy or hard.
And since my machine is busy this week with the aforementioned Hyper-V build, I can’t currently experiment with this. Maybe in a couple of weeks, unless someone resolves this (either way) before then.
Issue Analytics
- State:
- Created 3 years ago
- Comments:9 (6 by maintainers)
This change (pruning of
.git
directory) was somewhat improved by 9cf1375c33098a2787b5f514fd0ff36167a12b96.Okay, GitHub seems to be trolling me, because the comment I posted here yesterday has mysteriously vanished. Here’s the short version:
I couldn’t find any mention of unity builds in the Build Graph XML, so removing the
.git
directory seems to be the way to go.With no
.git
directory present, the fallback behaviour is to assume that the user is using Perforce and has file locking enabled, so it just checks whether files are read-only. I had links to the exact lines of code in the original version of this dot point so you could see the behaviour, but TLDR is that it never tries to actually invoke Perforce so it won’t give us any grief.Removing the
.git
directory in theue4-source
image could interfere with the use cases for theue4-engine
image, so I’m going to remove it at the start of theue4-minimal
image instead. This actually renders the size discussion moot, but for what it’s worth, my testing confirmed that the layer where the deletion is performed is tiny (sub-1KiB.)