From c02c02cbfc470701750c8f0117904dc256f1b8d3 Mon Sep 17 00:00:00 2001 From: Josh Knapp Date: Tue, 8 Sep 2026 12:48:41 -0700 Subject: [PATCH] Never fail a container build because the cache was unreachable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Every layer of both architectures built. The job then died exporting to act_runner's emulated GitHub Actions cache service, which it could not route to: `GetCacheEntryDownloadURL ... dial tcp 192.168.1.126:40649: no route to host`. On a pull_request `push:` is false, so this job pushes nothing and the cache is its only output — which means a network problem between the buildx `docker-container` builder and the runner host threw away a complete, successful validation of the Dockerfile on linux/amd64 and linux/arm64. A cache is an optimisation; it must degrade to "slow", never to "red". Only the exporter needs the flag. The import is already non-fatal — the build ran all 37 layers after warning it could not read the cache. This does not fix the routing itself, so builds stay uncached until that is sorted. Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_0145mQi9NZiCDrznBUEEDE4n --- .gitea/workflows/build.yml | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index bf5f4f3..f69cb99 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -55,5 +55,21 @@ jobs: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ gitea.sha }} ghcr.io/shadowdao/triple-c-sandbox:latest ghcr.io/shadowdao/triple-c-sandbox:${{ gitea.sha }} + # `ignore-error` is what stops a cache failure failing a build that + # already succeeded. act_runner emulates the GitHub Actions cache + # service on the runner host's LAN address, and the `docker-container` + # builder `setup-buildx-action` creates could not route to it — + # every layer of both arches built, then the job died on + # `GetCacheEntryDownloadURL: no route to host` while exporting. + # + # On a pull_request `push:` above is false, so this job pushes + # nothing and the cache is its only output: failing it discarded a + # complete, successful validation of the Dockerfile for both + # architectures. A cache is an optimisation and must degrade to + # "slow", never to "red". + # + # The import is already non-fatal — the build ran all 37 layers after + # warning that it could not read the cache — so only the exporter + # needs the flag. cache-from: type=gha - cache-to: type=gha,mode=max + cache-to: type=gha,mode=max,ignore-error=true