build-image
build-image copied to clipboard
`target` directory for Rust is not stored
Is your build failing?
No.
Describe the bug
As I reported in this topic, copying the target directory is always failed. It seems the copy command defined in fast_copy_cache (here) lacks a -r option.
To Reproduce
Steps to reproduce the behavior:
- Fork the repository at
https://github.com/pois0/sample-netlify-rust-project - Create a Netlify site and link it to the forked repository
- See that the copy fails
Configuration
See: https://github.com/pois0/sample-netlify-rust-project/blob/main/netlify.toml
Expected behavior
Copy the target directory successfully.
Build Output
See: https://app.netlify.com/sites/voluble-meringue-100830/deploys/6314ab4567c58a7178aa7cbc#L107
Additional context
In addition to this bug, even though I added a -r option, the copy still fails in my local environment because CoW is not supported.
The following is the build log:
Cloning into '/opt/buildhome/repo'...
done.
Installing dependencies
Python version set to 3.8
v16.17.0 is already installed.
Now using node v16.17.0 (npm v8.15.0)
Started restoring cached build plugins
Finished restoring cached build plugins
Attempting ruby version 2.7.2, read from environment
Using ruby version 2.7.2
Using PHP version 8.0
Started restoring cached go cache
Finished restoring cached go cache
Installing Go version 1.17 (requested 1.17)
unset GOOS;
unset GOARCH;
export GOROOT='/opt/buildhome/.gimme/versions/go1.17.linux.amd64';
export PATH="/opt/buildhome/.gimme/versions/go1.17.linux.amd64/bin:${PATH}";
go version >&2;
export GIMME_ENV="/opt/buildhome/.gimme/env/go1.17.linux.amd64.env"
go version go1.17 linux/amd64
Installing missing commands
Verify run directory
Executing user command: cargo build -r
info: syncing channel updates for '1.63.0-x86_64-unknown-linux-gnu'
info: latest update on 2022-08-11, rust version 1.63.0 (4b91a6ea7 2022-08-08)
info: downloading component 'cargo'
info: downloading component 'clippy'
info: downloading component 'rust-docs'
info: downloading component 'rust-std'
info: downloading component 'rustc'
info: downloading component 'rustfmt'
info: installing component 'cargo'
info: installing component 'clippy'
info: installing component 'rust-docs'
info: installing component 'rust-std'
info: installing component 'rustc'
info: installing component 'rustfmt'
Compiling sample-netlify-rust-project v0.1.0 (/opt/buildhome/repo)
Finished release [optimized] target(s) in 0.24s
Caching artifacts
Started saving build plugins
Finished saving build plugins
Started saving rust compile output
cp: failed to clone '/opt/buildhome/cache/target/CACHEDIR.TAG' from '/opt/buildhome/repo/target/CACHEDIR.TAG': Operation not supported
cp: failed to clone '/opt/buildhome/cache/target/.rustc_info.json' from '/opt/buildhome/repo/target/.rustc_info.json': Operation not supported
cp: failed to clone '/opt/buildhome/cache/target/release/.cargo-lock' from '/opt/buildhome/repo/target/release/.cargo-lock': Operation not supported
cp: failed to clone '/opt/buildhome/cache/target/release/deps/sample_netlify_rust_project-dd57144ed0864fb7.d' from '/opt/buildhome/repo/target/release/deps/sample_netlify_rust_project-dd57144ed0864fb7.d': Operation not supported
cp: failed to clone '/opt/buildhome/cache/target/release/deps/sample_netlify_rust_project-dd57144ed0864fb7' from '/opt/buildhome/repo/target/release/deps/sample_netlify_rust_project-dd57144ed0864fb7': Operation not supported
cp: failed to clone '/opt/buildhome/cache/target/release/sample-netlify-rust-project.d' from '/opt/buildhome/repo/target/release/sample-netlify-rust-project.d': Operation not supported
cp: failed to clone '/opt/buildhome/cache/target/release/sample-netlify-rust-project' from '/opt/buildhome/repo/target/release/sample-netlify-rust-project': Operation not supported
cp: failed to clone '/opt/buildhome/cache/target/release/.fingerprint/sample-netlify-rust-project-dd57144ed0864fb7/invoked.timestamp' from '/opt/buildhome/repo/target/release/.fingerprint/sample-netlify-rust-project-dd57144ed0864fb7/invoked.timestamp': Operation not supported
cp: failed to clone '/opt/buildhome/cache/target/release/.fingerprint/sample-netlify-rust-project-dd57144ed0864fb7/dep-bin-sample-netlify-rust-project' from '/opt/buildhome/repo/target/release/.fingerprint/sample-netlify-rust-project-dd57144ed0864fb7/dep-bin-sample-netlify-rust-project': Operation not supported
cp: failed to clone '/opt/buildhome/cache/target/release/.fingerprint/sample-netlify-rust-project-dd57144ed0864fb7/bin-sample-netlify-rust-project' from '/opt/buildhome/repo/target/release/.fingerprint/sample-netlify-rust-project-dd57144ed0864fb7/bin-sample-netlify-rust-project': Operation not supported
cp: failed to clone '/opt/buildhome/cache/target/release/.fingerprint/sample-netlify-rust-project-dd57144ed0864fb7/bin-sample-netlify-rust-project.json' from '/opt/buildhome/repo/target/release/.fingerprint/sample-netlify-rust-project-dd57144ed0864fb7/bin-sample-netlify-rust-project.json': Operation not supported
Finished saving rust compile output
Started saving pip cache
Finished saving pip cache
Started saving emacs cask dependencies
Finished saving emacs cask dependencies
Started saving maven dependencies
Finished saving maven dependencies
Started saving boot dependencies
Finished saving boot dependencies
Started saving rust rustup cache
Finished saving rust rustup cache
Started saving rust cargo bin cache
Finished saving rust cargo bin cache
Started saving go dependencies
Finished saving go dependencies
When I set the value for reflink auto, the copy succeeded.