Skip to content

Stale submodules not removed #340

@talex5

Description

@talex5

CI for Eio is failing. The analyse step finds an opam file in the ocaml-uring submodule, which no longer exists:

2022-04-29 10:50.10: New job: Analyse
2022-04-29 10:50.10: Waiting for resource in pool analyse
2022-04-29 10:57.01: Got resource from pool analyse
2022-04-29 10:57.01: Checking out commit 6f6b2eee. To reproduce:
                       git clone --recursive "https://github.com/ocaml-multicore/eio.git" && cd "eio" && git fetch origin "refs/pull/212/head" && git reset --hard 6f6b2eee
2022-04-29 10:57.01: Exec: "cp" "-a" "--" "/var/lib/ocurrent/var/git/eio.git-2b23594b7c63b62fff46d7f80bbb69077b881604076ad7869a499d8832a61ef7/.git" 
                           "/tmp/git-checkout15a32123"
2022-04-29 10:57.01: Exec: "git" "-C" "/tmp/git-checkout15a32123" "submodule" 
                           "update" "--recursive"
Submodule path 'ocaml-uring': checked out '2ea06dbb9169964d328a36696907750ed6e85398'
Submodule path 'ocaml-uring/vendor/liburing': checked out 'ccfe96eb3dca697e58f1dc42f82fb79f01a948b1'
2022-04-29 10:57.02: Exec: "git" "-C" "/tmp/git-checkout15a32123" "reset" 
                           "--hard" "-q" "6f6b2eee4f1ee42697825309d3ac4b2e65da4eef"
warning: unable to rmdir 'ocaml-uring': Directory not empty
2022-04-29 10:57.02: Exec: "git" "-C" "/tmp/git-checkout15a32123" "submodule" 
                           "sync"
2022-04-29 10:57.02: Exec: "git" "-C" "/tmp/git-checkout15a32123" "submodule" 
                           "update" "--recursive" "--init"
2022-04-29 10:57.03: Exec: "find" "." "-maxdepth" "3" "-name" "*.opam"
...
2022-04-29 10:57.13: Results:
                       {
                         "opam_files": [
                           "eio.opam", "eio_linux.opam", "eio_luv.opam",
                           "eio_main.opam", "ocaml-uring/uring.opam"
                         ],

I'm not sure how it got into this state. OCurrent probably needs some unit-tests with submodules.

In any case, doing the submodule update before the reset is likely a mistake. Copying the code in OCluster might help.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions