Open raphael-proust opened 2 months ago
I think the issue here is the way the exception is being handled by Lwt in Opam-repo-ci. The failure in the job report is OpamPp.Bad_format
which correctly indicates that the opam file could not be parsed.
If I test with opam-repo-ci-local
I see the correct failwith
message
2024-04-15 11:00.41: New job: Analyse
2024-04-15 11:00.41: Checking out commit 07c480d1. To reproduce:
git clone --recursive "/home/mtelvers/opam-repository" -b "pr25670" && cd "opam-repository" && git reset --hard 07c480d1
2024-04-15 11:00.41: Exec: "cp" "-a" "--" "/home/mtelvers/opam-repository/.git"
"/tmp/git-checkout3076cd59"
2024-04-15 11:00.41: Exec: "git" "-C" "/tmp/git-checkout3076cd59" "submodule"
"deinit" "--force" "--all"
2024-04-15 11:00.41: Exec: "git" "-C" "/tmp/git-checkout3076cd59" "reset"
"--hard" "-q" "07c480d1680483d259d8e96c422aa02909b4fd1c"
2024-04-15 11:00.45: Exec: "git" "-c" "protocol.file.allow=always" "-C"
"/tmp/git-checkout3076cd59" "submodule" "update"
"--recursive" "--init" "--no-fetch"
2024-04-15 11:00.45: Exec: "git" "merge" "-q" "--" "6c3f73f42890cc19f81eb1dec8023c2cd7b8b5cd"
2024-04-15 11:00.45: Exec: "git" "diff" "--name-only" "6c3f73f42890cc19f81eb1dec8023c2cd7b8b5cd"
2024-04-15 11:00.46: Exec: "git" "show" "6c3f73f42890cc19f81eb1dec8023c2cd7b8b5cd:packages/conf-protoc-dev/conf-protoc-dev.1.0.0/opam"
fatal: path 'packages/conf-protoc-dev/conf-protoc-dev.1.0.0/opam' exists on disk, but not in '6c3f73f42890cc19f81eb1dec8023c2cd7b8b5cd'
2024-04-15 11:00.46: Exec: "git" "show" "6c3f73f42890cc19f81eb1dec8023c2cd7b8b5cd:packages/ocaml-protoc-plugin/ocaml-protoc-plugin.6.0.0/opam"
fatal: path 'packages/ocaml-protoc-plugin/ocaml-protoc-plugin.6.0.0/opam' exists on disk, but not in '6c3f73f42890cc19f81eb1dec8023c2cd7b8b5cd'
2024-04-15 11:00.58: Job failed: At packages/ocaml-protoc-plugin/ocaml-protoc-plugin.6.0.0/opam:29:16-29:17::
'.' is not a valid token
However, testing the same commit using the opam-repo-ci-service
does not give the error message.
2024-04-15 10:37.18: New job: Analyse
2024-04-15 10:37.18: Checking out commit 07c480d1. To reproduce:
git clone --recursive "https://github.com/mtelvers/opam-repository.git" && cd "opam-repository" && git fetch origin "refs/pull/11/head" && git reset --hard 07c480d1
2024-04-15 10:37.18: Exec: "cp" "-a" "--" "/home/mtelvers/opam-repo-ci/var/git/opam-repository.git-780a482f06f13c0e99a5fd9a91eca9badbd8accdecc0edc0362b986355279f43/.git"
"/tmp/git-checkout14e0426c"
2024-04-15 10:37.19: Exec: "git" "-C" "/tmp/git-checkout14e0426c" "submodule"
"deinit" "--force" "--all"
2024-04-15 10:37.19: Exec: "git" "-C" "/tmp/git-checkout14e0426c" "reset"
"--hard" "-q" "07c480d1680483d259d8e96c422aa02909b4fd1c"
2024-04-15 10:37.23: Exec: "git" "-c" "protocol.file.allow=always" "-C"
"/tmp/git-checkout14e0426c" "submodule" "update"
"--recursive" "--init" "--no-fetch"
2024-04-15 10:37.23: Exec: "git" "merge" "-q" "--" "6c3f73f42890cc19f81eb1dec8023c2cd7b8b5cd"
2024-04-15 10:37.23: Exec: "git" "diff" "--name-only" "6c3f73f42890cc19f81eb1dec8023c2cd7b8b5cd"
2024-04-15 10:37.23: Exec: "git" "show" "6c3f73f42890cc19f81eb1dec8023c2cd7b8b5cd:packages/conf-protoc-dev/conf-protoc-dev.1.0.0/opam"
fatal: path 'packages/conf-protoc-dev/conf-protoc-dev.1.0.0/opam' exists on disk, but not in '6c3f73f42890cc19f81eb1dec8023c2cd7b8b5cd'
2024-04-15 10:37.23: Exec: "git" "show" "6c3f73f42890cc19f81eb1dec8023c2cd7b8b5cd:packages/ocaml-protoc-plugin/ocaml-protoc-plugin.6.0.0/opam"
fatal: path 'packages/ocaml-protoc-plugin/ocaml-protoc-plugin.6.0.0/opam' exists on disk, but not in '6c3f73f42890cc19f81eb1dec8023c2cd7b8b5cd'
2024-04-15 10:37.35: Job failed: OpamPp.Bad_format(_) -- Raised at Stdlib__String.index_rec in file "string.ml", line 128, characters 19-34
Called from Ansi__Char_stream.find in file "lib/char_stream.ml", line 20, characters 18-46
In the CI analysis phase https://opam.ci.ocaml.org/github/ocaml/opam-repository/commit/dbaea0a12fb0d808ae1a593c296b163ffba4a896/variant/(analysis) there's an opam failure which is uncaught:
I'm not sure this is the right place for this report. But I don't know whether it's an issue with opam itself or with the way it is called in by the opam-repo-ci so I'm opening it here for now and we can discuss location if needs be.