Skip to content

Key the opam cache on the opam that reads it - #32

Merged
jserv merged 2 commits into
sysprog21:mainfrom
alanhc:opam-version-cache-key
Sep 18, 2026
Merged

jserv merged 2 commits into
sysprog21:mainfrom
alanhc:opam-version-cache-key

Conversation

@alanhc

@alanhc alanhc commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor

setup-ocaml@v3 installs the latest opam release, which moved from 2.5.2 to 2.6.0 on 2026-09-17. The restored ~/.opam still had the older root layout, so the first opam command after the restore upgraded it, printed Update done, please now retry your command. and exited 10:

  • ast-utils plugin + Frama-C 33.0 failed at Install cppo
  • ast-utils plugin on the supported floor failed at Check installed Frama-C version

Re-running does not help, because a failed job never saves the upgraded root (run 35336549042, attempts 1 and 2).

Both opam cache keys now include opam --version. A new opam release starts from a cold cache once (about 10 minutes of Frama-C build) instead of breaking every run.

The Sandboxing is not working ... bwrap: loopback: Failed RTM_NEWADDR line in the same log is not the cause. opam answers y to disabling the sandbox, and the setup-ocaml step, which prints the same line, succeeds.


Summary by cubic

Keys the opam cache on the opam version that reads it, so a new opam release stops breaking the Frama-C build lanes. When opam moved from 2.5.2 to 2.6.0, restored cache roots kept the old layout and the first opam command after restore failed with Update done, please now retry your command. (exit 10); re-running doesn't help because a failed job never saves the upgraded root.

Both cache keys now include opam --version, so a new release starts from a cold cache once. The version step now fails if opam --version fails instead of writing an empty version, which would have collapsed all releases into one shared cache key.

Note

  • The Sandboxing is not working warning in the same logs is unrelated; opam disables the sandbox and continues.

Written for commit 9ad7245. Summary will update on new commits.

Review in cubic

setup-ocaml@v3 installs the latest opam release, which moved from 2.5.2
to 2.6.0 on 2026-09-17. The restored ~/.opam still had the older root
layout, so the first opam command after the restore upgraded it,
printed "Update done, please now retry your command." and exited 10.
Both Frama-C lanes failed at that step ("Install cppo" and "Check
installed Frama-C version"). Re-running did not help, because a failed
job never saves the upgraded root.

Both cache keys now include "opam --version". A new opam release
starts from a cold cache once instead of breaking every run. The
bubblewrap "Sandboxing is not working" error in the same log is not
the cause: opam answers yes and runs without the sandbox.
cubic-dev-ai[bot]

This comment was marked as resolved.

Comment thread .github/workflows/ci.yml Outdated
Comment thread .github/workflows/ci.yml Outdated
The command substitution sat inside echo, so the step took echo's exit
status. An opam that failed wrote "version=", the step passed, and the
key fell back to "Linux-opam--ocaml-...", one entry shared by every
opam release, which is the collision the key exists to prevent. A bare
assignment carries the substitution's status, and run: uses bash -e, so
the step now fails at the point where opam failed.
@jserv
jserv merged commit 7a8cfdb into sysprog21:main Sep 18, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants