ci(oci): tolerate cache export failures with ignore-error #72

Merged
David merged 1 commit from fix/VS-52-cache-export-ignore-error into main 2026-06-25 04:04:04 +02:00
Owner

Fixes the build-oci-image.yml failure tracked in VS-52 (run #269).

What happened

The image built and pushed successfully (#21 DONE), but the job died in the exporting cache to registry step with a 499 Client Closed Request from the dev.a8n.run registry while writing a large cache blob (the afc0e378... 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 supports ignore-error=true for exactly this, so the cache-export attribute becomes: type=registry,ref=<cache_ref>,mode=max,ignore-error=true. This keeps the full mode=max cache (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.

Fixes the `build-oci-image.yml` failure tracked in VS-52 (run #269). ## What happened The image built and pushed successfully (`#21 DONE`), but the job died in the `exporting cache to registry` step with a `499 Client Closed Request` from the `dev.a8n.run` registry while writing a large cache blob (the `afc0e378...` 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 supports `ignore-error=true` for exactly this, so the cache-export attribute becomes: `type=registry,ref=<cache_ref>,mode=max,ignore-error=true`. This keeps the full `mode=max` cache (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.
ci(oci): tolerate cache export failures with ignore-error
All checks were successful
Check / fmt + clippy + build + tests (pull_request) Successful in 2m4s
Create release / Create release from merged PR (pull_request) Has been skipped
a9378624e2
The build-oci-image workflow died with a 499 Client Closed Request while writing a cache blob to dev.a8n.run during 'exporting cache to registry', even though the image itself built and pushed successfully. The registry proxy timed out on a large cache layer upload, a registry/infra-side flake outside the build's control. Cache export to a registry is best-effort, so a transient failure there should not fail an otherwise-successful build-and-push. Setting ignore-error=true on the registry cache exporter keeps mode=max cache benefits while making the build resilient to these transient cache-export timeouts.

#VS-52
David merged commit 40c740edc7 into main 2026-06-25 04:04:04 +02:00
David deleted branch fix/VS-52-cache-export-ignore-error 2026-06-25 04:04:05 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
psa-systems/vervain-server!72
No description provided.