Skip to content

Commit

Permalink
Test with locked cache mount
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
cpuguy83 committed Feb 9, 2024
1 parent a61b2e1 commit fec5e61
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
2 changes: 1 addition & 1 deletion frontend/mariner2/handle_rpm.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit fec5e61

Please sign in to comment.