Stop committing lock files; add weekly CI safety net - #1472
Conversation
Resolves the inconsistent lock-file handling (30 Cargo.lock + 1 mops.lock committed while both are gitignored, and no build uses --locked): commit none, so a developer cloning an example resolves the latest semver-compatible dependencies — matching the repo's stay-current philosophy. - Untrack all 30 Cargo.lock and the 1 mops.lock (git rm --cached; both already gitignored). No build behavior changes today — nothing sets locked:true or passes --locked beyond the CI tool bootstrap. - Safety net: add a weekly schedule trigger (cron 30 6 * * 1) to every example workflow + workflow-template.yml, so all examples build/deploy/ test weekly and upstream dependency breakage is caught proactively (not only when an example is touched). New examples inherit it via the template. - AGENTS.md: document the no-lock-files policy and the weekly run. Closes #1457.
mbjorkqvist
left a comment
There was a problem hiding this comment.
Thanks for looking into this, @marc0olo! Looking at the referenced issue #1457, I'm curious why you didn't go for option a, with e.g., a weekly dependabot run? What happens if the weekly CI check now fails, would that require manual intervention to e.g., fix an example to work with the latest version of some dependency? Maybe I'm missing something, e.g., how things may be significantly different in this repo with lots of examples, a mix of Rust and Motoko, and icp-cli?
|
@mbjorkqvist my personal take on this is mainly that we would have a lot of noise on the repo and generally we want everybody who clones and runs the examples to automatically resolve the latest patch versions which isn't the case if we define strict versions in the lock files. either way, our goal should be to keep the dependencies on this repo up to date. we need to figure out the best way to handle that efficiently.
we will see, but ideally the CI never fails for the examples (although I recognized some flaky tests already which I still need to look at, they usually pass on a 2nd run). for the UI we don't have integration tests. but at least compilation + deployment and in many cases also backend functionality is tested via CI. of course we should aim to avoid manual intervention. (e.g. dependabot PRs would also have to be handled by "someone", whether it is an agent or a human) wdyt? |
Closes #1457. Resolves the inconsistent lock-file handling and makes examples resolve current dependencies on clone.
The problem (verified against
master)Cargo.lock+ 1mops.lockare committed, yet both are gitignored — the tracked ones are overrides, so the policy is inconsistent.locked: truein anyicp.yaml, and there's no--locked/--frozenanywhere except the CI tool bootstrap (cargo install --lockedforcandid-extractor/wasi2ic, which use the tool's own lock).Decision: don't commit lock files
A developer cloning an example should get the latest semver-compatible dependencies (per each
Cargo.toml/mops.tomlrange), not a stale pin — matching the repo's stay-current philosophy. Since the locks aren't load-bearing, removing them changes nothing about how builds run today; it only lets resolution pick current versions.Cargo.lockand the 1mops.lock(git rm --cached; both already in.gitignore, so they stay ignored).package-lock.jsonwas already gitignored.Safety net: weekly CI
Without locks, a bad upstream patch could break an example with no repo change — and only surface when someone touches it. So every example workflow (and
workflow-template.yml) gains a weeklyscheduletrigger (cron: "30 6 * * 1"), building/deploying/testing all examples every Monday.deploy.sh, cycles, language — with no duplication or drift, and new examples inherit it from the template.AGENTS.md documents both the no-lock-files policy and the weekly run.
Notes
🤖 Generated with Claude Code