Problem
When a consumer pins a plugin/dep by branch (e.g. asobi_site: {rebar3_audit, {git, "...", {branch, "main"}}}), the erlang-ci caches keep serving the old compiled artifact after upstream main advances, because the cache keys don't reflect the branch's current commit:
erlang-ci-build-* key hashes rebar.config/lock, but a {branch, main} ref is textually stable, so the key never changes.
erlang-ci-rebar3-* caches ~/.cache/rebar3 (where plugins are installed); rebar3 reuses the cached branch checkout without re-pulling.
Observed
After merging the rebar3_audit pagination fix (Taure/rebar3_audit#16) to main, asobi_site's Audit job still ran the old looping code and hit the 300s timeout - twice. It only picked up the fix after manually deleting all erlang-ci-* caches (build + rebar3), forcing a fresh clone. Audit then passed in 20s.
Fix options
- Include resolved branch-dep commit SHAs in the cache key (hash
rebar.lock plus the current HEAD of any {branch, _} dep/plugin), so a branch advance busts the cache.
- Or
rebar3 unlock/refresh branch deps before build in the setup action.
- Or document + nudge consumers to pin plugins to tags (honest cache key, reproducible) - relates to the pinning conventions already in use.
Related: same class as the nightly stale-cache issue (test-profile deps not in rebar.lock). Surfaced via #65 / #66 (audit timeout) and rebar3_audit#16 (the fix that couldn't reach CI).
Problem
When a consumer pins a plugin/dep by branch (e.g. asobi_site:
{rebar3_audit, {git, "...", {branch, "main"}}}), the erlang-ci caches keep serving the old compiled artifact after upstreammainadvances, because the cache keys don't reflect the branch's current commit:erlang-ci-build-*key hashes rebar.config/lock, but a{branch, main}ref is textually stable, so the key never changes.erlang-ci-rebar3-*caches~/.cache/rebar3(where plugins are installed); rebar3 reuses the cached branch checkout without re-pulling.Observed
After merging the rebar3_audit pagination fix (Taure/rebar3_audit#16) to main, asobi_site's Audit job still ran the old looping code and hit the 300s timeout - twice. It only picked up the fix after manually deleting all
erlang-ci-*caches (build + rebar3), forcing a fresh clone. Audit then passed in 20s.Fix options
rebar.lockplus the current HEAD of any{branch, _}dep/plugin), so a branch advance busts the cache.rebar3 unlock/refresh branch deps before build in the setup action.Related: same class as the nightly stale-cache issue (test-profile deps not in rebar.lock). Surfaced via #65 / #66 (audit timeout) and rebar3_audit#16 (the fix that couldn't reach CI).