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 fails if you specify a cache location that is in a different mountpoint than the scratch directory. This can happen on AWS CodeBuild if you place the cache directory in the home directory, like this log below.
Post job cleanup.
FROM busybox:1
COPY buildstamp buildstamp
RUN --mount=type=cache,target=/root/.npm mkdir -p /var/dance-cache/ && cp -p -R /root/.npm/. /var/dance-cache/ || true
Error: EXDEV: cross-device link not permitted, rename 'scratch/dance-cache' -> '/root/.cache/docker-build-cache/root/.npm'
at async Object.rename (node:internal/fs/promises:779:10)
at async $8d40300f3635b768$var$extractCache (file:///codebuild/output/src2102109131/src/actions-runner/_work/_actions/reproducible-containers/buildkit-cache-dance/v3.1.0/dist/index.js:1374:5)
at async $8d40300f3635b768$export$bd3cfa0c41fc7012 (file:///codebuild/output/src2102109131/src/actions-runner/_work/_actions/reproducible-containers/buildkit-cache-dance/v3.1.0/dist/index.js:1384:72)
at async $bec5d2ddaaf4a876$var$main (file:///codebuild/output/src2102109131/src/actions-runner/_work/_actions/reproducible-containers/buildkit-cache-dance/v3.1.0/dist/index.js:1393:5)
at async file:///codebuild/output/src2102109131/src/actions-runner/_work/_actions/reproducible-containers/buildkit-cache-dance/v3.1.0/dist/index.js:1401:5 {
errno: -18,
code: 'EXDEV',
syscall: 'rename',
path: 'scratch/dance-cache',
dest: '/root/.cache/docker-build-cache/root/.npm'
}
Error: EXDEV: cross-device link not permitted, rename 'scratch/dance-cache' -> '/root/.cache/docker-build-cache/root/.npm'
at async Object.rename (node:internal/fs/promises:779:10)
at async $8d40300f3635b768$var$extractCache (file:///codebuild/output/src2102109131/src/actions-runner/_work/_actions/reproducible-containers/buildkit-cache-dance/v3.1.0/dist/index.js:1374:5)
at async $8d40300f3635b768$export$bd3cfa0c41fc7012 (file:///codebuild/output/src2102109131/src/actions-runner/_work/_actions/reproducible-containers/buildkit-cache-dance/v3.1.0/dist/index.js:1384:72)
at async $bec5d2ddaaf4a876$var$main (file:///codebuild/output/src2102109131/src/actions-runner/_work/_actions/reproducible-containers/buildkit-cache-dance/v3.1.0/dist/index.js:1393:5)
at async file:///codebuild/output/src2102109131/src/actions-runner/_work/_actions/reproducible-containers/buildkit-cache-dance/v3.1.0/dist/index.js:1401:5
I fixed the issue in my code by simply moving the cache directory into the workspace.
I thought I'd let you know anyway, in case you want to wrap this in a try-catch and copy the directory on failure or just document this quirk.
Have a great day!
The text was updated successfully, but these errors were encountered:
This line:
buildkit-cache-dance/src/extract-cache.ts
Line 46 in 5b6db76
It fails if you specify a cache location that is in a different mountpoint than the scratch directory. This can happen on AWS CodeBuild if you place the cache directory in the home directory, like this log below.
I fixed the issue in my code by simply moving the cache directory into the workspace.
I thought I'd let you know anyway, in case you want to wrap this in a try-catch and copy the directory on failure or just document this quirk.
Have a great day!
The text was updated successfully, but these errors were encountered: