ch-image can get into a state where all commands crash with a traceback similar to:
$ ch-image build -t paraview -f ./examples/paraview/Dockerfile ./examples
Traceback (most recent call last):
File "[...]/bin/ch-image", line 332, in <module>
main()
File "[...]/bin/ch-image", line 319, in main
bu.init(cli)
File "[...]/lib/build_cache.py", line 184, in init
cache = Enabled_Cache(cli.cache_large)
File "[...]/lib/build_cache.py", line 677, in __init__
self.worktrees_fix()
File "[...]/lib/build_cache.py", line 1329, in worktrees_fix
assert (wt_gits == wt_actuals)
AssertionError
The crash is because one or more images think they are a Git worktree (i.e., img/$FOO/ch/git exists) but Git has no record of the worktree (i.e., bucache/worktrees/$FOO does not)
I haven’t been able to reproduce the situation itself. We think it has something to do with mixing --cache (usually the default) and --no-cache.
This PR converts the crash to a warning and requests help reproducing the underlying bug.
ch-image
can get into a state where all commands crash with a traceback similar to:The crash is because one or more images think they are a Git worktree (i.e.,
img/$FOO/ch/git
exists) but Git has no record of the worktree (i.e.,bucache/worktrees/$FOO
does not)I haven’t been able to reproduce the situation itself. We think it has something to do with mixing
--cache
(usually the default) and--no-cache
.This PR converts the crash to a warning and requests help reproducing the underlying bug.