ci(oci): switch build cache from registry to runner gha cache #361
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/MAPPS-326-oci-gha-build-cache"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Switches the
mokosh-wwwOCI build cache from the registry toact_runner's built-intype=ghacache server, and removes the MAPPS-131 "Warm build cache" workaround that only existed to survive the registry stall.Why
build-oci-image.ymlcached build layers viatype=registryagainst a:buildcachetag. Thedev.a8n.runregistry cache-export PUT stalls indefinitely with no error (MAPPS-131 hung the job ~3h until the runner max-runtime killed it, even after--pushhad finished). To work around it,cache-towas pulled out of the main build into a trailing best-effort "Warm build cache" step guarded bytimeout-minutes: 20+continue-on-error: trueand skipped on tag builds (MAPPS-121).type=ghapoints buildx at the on-LAN Actions cache server instead (the samecache.enabledserver the Check workflow already uses), matching the governance standard set in GOV-20 / vervain-server VS-53. The export is fast and does not stall, so the entire workaround collapses back into the main build.Changes
crazy-max/ghaction-github-runtime@v3) before the build. A rawdocker buildx build(unlikedocker/build-push-action) does not auto-inject the gha cache env, andACTIONS_RUNTIME_TOKENis masked fromrun:steps, so this re-exportsACTIONS_CACHE_URL/ACTIONS_RUNTIME_TOKENintoGITHUB_ENV.cache-from type=ghaandcache-to type=gha,mode=max,ignore-error=trueinline.:buildcache/type=registryreferences, the 20-minute timeout, thecontinue-on-error, and the tag-build skip - all MAPPS-131 / MAPPS-121 mitigations for a stall that no longer happens.docker-containerbuildx driver, the public-registry mirror, version stamping, andCARGO_BUILD_JOBSare unchanged. Thedocker-containerdriver is already required fortype=ghaexport too, so no driver change.Net: +21 / -61 lines.
Verification
just pre-commitpasses (cargo fmt/clippy/check + 189 tests green). Workflow YAML validated; no remainingtype=registry/:buildcachereferences; no em-dashes. The pattern is proven on vervain-server VS-53: a warm build loggedimporting cache manifest from gha,CACHEDcargo layers, andexporting to GitHub Actions Cachein ~2s with no 499/stall.Prerequisite: the runner must have
cache.enabled: true(already required for the Check workflow's cache). If it were off, thetype=ghaexport would no-op silently underignore-error=true; read freshness from the build log'simporting/exporting cachelines rather than the exit code.#MAPPS-326