You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems there's an issue with the total expected cache size when using buildjet along with buildjets caching action.
For some reason, I get this error:
Warning: Failed to save: Cache size of ~6148 MB (6446280578 B) is over the 10GB limit, not saving cache.
Cache saved with key: docker-image-cache4-Linux
However, if I switch the caching action to use: runs-on: ubuntu-latest along with uses: actions/cache@v4 then it works as expected. Example:
Working:
---
name: Test
on: [ pull_request ]
permissions:
id-token: write
contents: read
jobs:
test:
env:
CI: true
runs-on: ubuntu-latest
steps:
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/[email protected]
- run: mkdir -p ~/docker-image-cache
- id: docker-image-cache
uses: actions/cache@v4
with:
path: ~/docker-image-cache
key: docker-image-cache4-${{ runner.os }}
- name: Git checkout my app repos
uses: myorg/repoName/.github/actions/checkout@v3
- name: Load cache for docker images
if: steps.docker-image-cache.outputs.cache-hit == 'true'
run: |
docker load -i ~/docker-image-cache/myOrgImage1.tar
docker load -i ~/docker-image-cache/myOrgImage2.tar
docker load -i ~/docker-image-cache/myOrgImage3.tar
docker load -i ~/docker-image-cache/myOrgImage4.tar
docker load -i ~/docker-image-cache/myOrgImage5.tar
- name: Pull the docker images
run: |
cd testApp
make pull-images
- name: Create cache for docker images
if: steps.docker-image-cache.outputs.cache-hit != 'true'
run: |
docker image list --format "{{ .Repository }}:{{ .Tag }}"
docker save -o ~/docker-image-cache/myOrgImage1.tar $(docker image list --format "{{ .Repository }}:{{ .Tag }}" | grep "myOrgImage1")
docker save -o ~/docker-image-cache/myOrgImage2.tar $(docker image list --format "{{ .Repository }}:{{ .Tag }}" | grep "myOrgImage2")
docker save -o ~/docker-image-cache/myOrgImage3.tar $(docker image list --format "{{ .Repository }}:{{ .Tag }}" | grep "myOrgImage3")
docker save -o ~/docker-image-cache/myOrgImage4.tar $(docker image list --format "{{ .Repository }}:{{ .Tag }}" | grep "myOrgImage4")
docker save -o ~/docker-image-cache/myOrgImage5.tar $(docker image list --format "{{ .Repository }}:{{ .Tag }}" | grep "myOrgImage5")
Not working:
---
name: Test
on: [ pull_request ]
permissions:
id-token: write
contents: read
jobs:
test:
env:
CI: true
runs-on: buildjet-4vcpu-ubuntu-2204
steps:
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/[email protected]
- run: mkdir -p ~/docker-image-cache
- id: docker-image-cache
uses: buildjet/cache@v4
with:
path: ~/docker-image-cache
key: docker-image-cache4-${{ runner.os }}
- name: Git checkout my app repos
uses: myorg/repoName/.github/actions/checkout@v3
- name: Load cache for docker images
if: steps.docker-image-cache.outputs.cache-hit == 'true'
run: |
docker load -i ~/docker-image-cache/myOrgImage1.tar
docker load -i ~/docker-image-cache/myOrgImage2.tar
docker load -i ~/docker-image-cache/myOrgImage3.tar
docker load -i ~/docker-image-cache/myOrgImage4.tar
docker load -i ~/docker-image-cache/myOrgImage5.tar
- name: Pull the docker images
run: |
cd testApp
make pull-images
- name: Create cache for docker images
if: steps.docker-image-cache.outputs.cache-hit != 'true'
run: |
docker image list --format "{{ .Repository }}:{{ .Tag }}"
docker save -o ~/docker-image-cache/myOrgImage1.tar $(docker image list --format "{{ .Repository }}:{{ .Tag }}" | grep "myOrgImage1")
docker save -o ~/docker-image-cache/myOrgImage2.tar $(docker image list --format "{{ .Repository }}:{{ .Tag }}" | grep "myOrgImage2")
docker save -o ~/docker-image-cache/myOrgImage3.tar $(docker image list --format "{{ .Repository }}:{{ .Tag }}" | grep "myOrgImage3")
docker save -o ~/docker-image-cache/myOrgImage4.tar $(docker image list --format "{{ .Repository }}:{{ .Tag }}" | grep "myOrgImage4")
docker save -o ~/docker-image-cache/myOrgImage5.tar $(docker image list --format "{{ .Repository }}:{{ .Tag }}" | grep "myOrgImage5")
The text was updated successfully, but these errors were encountered:
Napster134
changed the title
Cache storage limit exceeded when under 10GB
Cache storage limit exceeded when storing cache under 10GB
Feb 13, 2024
Napster134
changed the title
Cache storage limit exceeded when storing cache under 10GB
Cache storage limit exceeded when storing a cache that's under 10GB
Feb 13, 2024
Hi all,
It seems there's an issue with the total expected cache size when using buildjet along with buildjets caching action.
For some reason, I get this error:
However, if I switch the caching action to use:
runs-on: ubuntu-latest
along withuses: actions/cache@v4
then it works as expected. Example:Working:
Not working:
The text was updated successfully, but these errors were encountered: