-
Notifications
You must be signed in to change notification settings - Fork 545
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cache miss with cargo/rust #743
Comments
I started another build with debugging enabled: jobs:
build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: docker/setup-buildx-action@v2
with:
buildkitd-flags: --debug
[...] Build URL: https://github.com/kpcyrd/sh4d0wup/actions/runs/3653117586/jobs/6172218379 Logs |
@kpcyrd Cache mounts through @jedevc @dvdksn I'm not sure if we have this properly documented atm? |
Yeah I don't think we have covered this case. We've got some work to do on run mounts in general, but we could probably mention this in the docs for the gha backend. |
What should I have in my docker file and github action configuration to have a proper cache? |
I'm also still interested in this, there was some discussion about this problem on reddit recently: |
Behaviour
I'm trying to do
docker build -t something .
and use the github actions cache for caching.Steps to reproduce this issue
Expected behaviour
The cache is written to and read from github actions cache, the build finishes quickly.
Actual behaviour
It seems the cache is partially used, the
RUN apk ...
layer seems to be read from cache but afterCOPY ./ /app
it's a cache miss andcargo build
hangs onUpdating crates.io index
for a long time even though it should be read from cache because ofRUN --mount=type=cache,target=/var/cache/buildkit CARGO_HOME=/var/cache/buildkit/cargo ...
.Possibly related to #741, #735.
Configuration
Logs
logs_44.zip
The text was updated successfully, but these errors were encountered: