ci(oci): tolerate cache export failures with ignore-error #72
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/VS-52-cache-export-ignore-error"
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?
Fixes the
build-oci-image.ymlfailure tracked in VS-52 (run #269).What happened
The image built and pushed successfully (
#21 DONE), but the job died in theexporting cache to registrystep with a499 Client Closed Requestfrom thedev.a8n.runregistry while writing a large cache blob (theafc0e378...layer, which took ~60s to send). The registry proxy closed the connection on the slow upload. This is a registry/infra-side flake, not a defect in the image or the build inputs.Fix
Cache export to a registry is best-effort: it only seeds the next build's
--cache-from. A transient failure writing the cache should not fail an otherwise-successful build-and-push. BuildKit's registry cache exporter supportsignore-error=truefor exactly this, so the cache-export attribute becomes:type=registry,ref=<cache_ref>,mode=max,ignore-error=true. This keeps the fullmode=maxcache (important for the multi-stage Rust build's dependency layers) while making the build resilient to transient cache-export timeouts. The image push itself is unaffected and still fails the job if it fails.Note
The underlying 499 is a registry/proxy timeout on large blob uploads at
dev.a8n.run; raising the proxy's upstream timeout / body-size handling would address the root cause on the infra side. This PR addresses the repo-side symptom so a flaky cache export no longer fails green builds.