fix(ci): decouple build-cache export so a registry stall can't hang the job #96
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/mapps-131-cache-export-stall"
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?
Problem
MAPPS-131: the main-branch OCI build (
build-oci-image.yml) randocker buildx build --pushtogether with--cache-to type=registry,mode=maxagainst dev.a8n.run in a single step. The registry's cache-export PUT can stall indefinitely and never returns an error, so buildx'signore-error=truenever fires. In run #331 the image and both tags (v0.2.0,latest) were pushed at 05:43, then the job hung inexporting cache to registryfor ~3h until the runner's max-runtime cancelled it. A build that had actually succeeded was reported as failed.This is the same flaky registry-cache-export endpoint behind MAPPS-121 (which fixed the redundant export on tag builds); MAPPS-131 is the main-build export itself stalling.
Fix
Split cache export into its own best-effort step that runs after push:
--cache-fromonly. Push can no longer be coupled to a cache-export stall.Warm build cache (best effort)step does--cache-to mode=maxwithtimeout-minutes: 20(caps a stall) andcontinue-on-error: true(keeps the job green if the export times out or fails). The image is already pushed, so a missed export only slows the next build.!startsWith(github.ref, 'refs/tags/'), preserving the MAPPS-121 behavior.Verification
python3 -c "import yaml; yaml.safe_load(...)"parses clean.timeout-minutes+continue-on-errorconfirmed supported per Forgejo Actions docs.#MAPPS-131