Analysis fails on pin-depends on master branch
OCaml-ci fails on https://github.com/robur-coop/builder-web/commit/6e4384f802b0efa89a7a334238e3ec39428a0766 at the analysis step with a message (analysis) (failed: Invalid commit hash "master" for package vif.dev (processing pin-depends in builder-web.dev)).
https://github.com/robur-coop/builder-web/runs/50058346734
The opam file has a line pin-depends: ["vif.dev" "git+https://git.robur.coop/robur/vif.git#master"]. The URL is reachable, and it builds fine locally.
Trying to access the results from the analysis step returns a 500 internal server error https://ocaml.ci.dev/github/robur-coop/builder-web/commit/6e4384f802b0efa89a7a334238e3ec39428a0766/variant/%28analysis%29
So the error suggests there may be an incorrect assumption in ocaml-ci that pin-depends always have a hash after the # and doesn't recognize branches.
Yeah, this is currently a limitation in the pinning logic of ocaml-ci
I looked a bit at the code, and it seems to me there should be no issue to allow more branch names: https://github.com/ocurrent/ocaml-ci/blob/master/lib/pin_depends.ml
The "hash" is used in git show ${hash}:vif.opam. Is there interest in a patch?
You can see the analysis via this link https://ocaml.ci.dev:8100/job/2025-09-10/152352-ci-extract-ba749f.
2025-09-10 15:23.52: New job: Extract
2025-09-10 15:23.52: Checking out commit 6e4384f8. To reproduce:
git clone --recursive "https://github.com/robur-coop/builder-web.git" -b "builder-miou" && cd "builder-web" && git reset --hard 6e4384f8
2025-09-10 15:23.52: Exec: "cp" "-a" "--" "/var/lib/ocurrent/var/git/builder-web.git-f4cadfc27f85ecc2a754e041c3df773498f366755ceb2970acc98a277e147319/.git"
"/tmp/git-checkout2003bc55"
2025-09-10 15:23.53: Exec: "git" "-C" "/tmp/git-checkout2003bc55" "submodule"
"deinit" "--force" "--all"
2025-09-10 15:23.53: Exec: "git" "-C" "/tmp/git-checkout2003bc55" "reset"
"--hard" "-q" "6e4384f802b0efa89a7a334238e3ec39428a0766"
2025-09-10 15:23.53: Exec: "git" "-c" "protocol.file.allow=always" "-C"
"/tmp/git-checkout2003bc55" "submodule" "update"
"--recursive" "--init" "--no-fetch"
2025-09-10 15:23.54: No .ocamlformat file found
2025-09-10 15:23.54: builder-web.dev: found pin-depends: vif.dev -> git+https://git.robur.coop/robur/vif.git#master
2025-09-10 15:23.54: Job failed: Invalid commit hash "master" for package vif.dev (processing pin-depends in builder-web.dev)
Anything not matching the regexp re_hash is rejected here: https://github.com/ocurrent/ocaml-ci/blob/653d47b081c2ba407c032e1ca22b8b8ea3dcef16/lib/pin_depends.ml#L100-L101
Looking back at the original PR #177, only supporting a specific hash was noted. Presumably a patch would just remove the regexp check. I wonder why it was added? I'm tempted to create branch called abc to see what would happen!