ocurrent / ocaml-ci

A CI for OCaml projects
https://ocaml.ci.dev
MIT License
112 stars 74 forks source link

Cached git project with submodules doesn't reset #450

Open tmcgilchrist opened 2 years ago

tmcgilchrist commented 2 years ago

When building ocurrent the cached git project has an old gitsubmodule that should be removed when checking out a new commit. From the logs it looks like the git reset --hard c3671270 isn't removing the directory.

From https://ci.ocamllabs.io/github/ocurrent/ocurrent/commit/c3671270bd177ed32cbc60fa7b15589d07cdcc8a/variant/ubuntu-21.10-4.14

All commits already cached
Submodule path 'ocaml-gitlab': checked out 'ad09cc14cbef0beaa795077927b503618d69e72e'
warning: unable to rmdir 'ocaml-gitlab': Directory not empty
HEAD is now at c367127 Better error message.
tmcgilchrist commented 2 years ago

Possible fix https://github.com/ocurrent/ocurrent/pull/345

MisterDA commented 2 years ago

The same problem still appears in https://ci.ocamllabs.io/github/ocurrent/ocaml-ci/commit/1302ba56c943fbac8047ac8169a84721473f6d35/variant/debian-11-4.12+domains.

MisterDA commented 2 years ago

Another example here: https://ci.ocamllabs.io/github/ocurrent/ocaml-ci/commit/0fe6e37444dabac4a1ad80b999b284cdad69a61d/variant/debian-11-4.12.