From fec5e61154df6a8f7c2411be79b7d195e819723d Mon Sep 17 00:00:00 2001 From: Brian Goff Date: Thu, 8 Feb 2024 22:57:46 +0000 Subject: [PATCH] Test with locked cache mount CI has been very flakey lately. I'm wondering if this is the cause. It's not new but could be caused by caches being missed and timing of multiple builds happening at once. Signed-off-by: Brian Goff --- .github/workflows/ci.yml | 5 +++++ frontend/mariner2/handle_rpm.go | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c87fd9b33..4c021db17 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -168,6 +168,11 @@ jobs: echo "MARINER2_TOOLCHAIN_CACHE_REF=$(tr '[:upper:]' '[:lower:]' <<< "ghcr.io/${{ github.repository }}/mariner2/toolchain:cache")" >> $GITHUB_ENV - name: Build frontend image run: docker buildx bake ${FRONTEND_BAKE_TARGET} + - name: Builder info + run: | + docker buildx inspect + docker info + df -h - name: test run: | docker buildx bake \ diff --git a/frontend/mariner2/handle_rpm.go b/frontend/mariner2/handle_rpm.go index 135add642..f45e92669 100644 --- a/frontend/mariner2/handle_rpm.go +++ b/frontend/mariner2/handle_rpm.go @@ -40,7 +40,7 @@ func defaultMarinerTdnfCahe() llb.RunOption { // This makes it so that when tdnf needs to download packages, repodata, etc it will use the cache dir. // Repeated builds will benefit from this as the cache will be reused. func marinerTdnfCacheWithPrefix(prefix string) llb.RunOption { - return llb.AddMount(filepath.Join(prefix, marinerTdnfCacheDir), llb.Scratch(), llb.AsPersistentCacheDir("mariner2-tdnf-cache", llb.CacheMountShared)) + return llb.AddMount(filepath.Join(prefix, marinerTdnfCacheDir), llb.Scratch(), llb.AsPersistentCacheDir("mariner2-tdnf-cache", llb.CacheMountLocked)) } func handleRPM(ctx context.Context, client gwclient.Client, spec *dalec.Spec) (gwclient.Reference, *image.Image, error) {