Skip to content
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

bug: default cache key seems not enough specific and leads to failures during builds #213

Open
dzmitry-lahoda opened this issue Oct 18, 2024 · 0 comments

Comments

@dzmitry-lahoda
Copy link

dzmitry-lahoda commented Oct 18, 2024

We used - uses: Swatinem/rust-cache@v2 (default config).

We got on github ubuntu runners and on github ubuntu larger runners:

error: failed to run custom build command for `rustls v0.23.13`

Caused by:
  could not execute process `/home/runner/work/project/project/target/debug/build/rustls-0580a0c717b029e3/build-script-build` (never executed)

Caused by:
  No such file or directory (os error 2)
warning: build failed, waiting for other jobs to finish..

I used -vv, and

            export RUST_BACKTRACE=full
            export RUST_LOG=debug
            export CARGO_PROFILE_TEST_BUILD_OVERRIDE_DEBUG=true

Nothing was clarified. Was thinking strace.

But when happend? When I updated Cargo.toml to new prost/tonic.

Crates on which failed was rustls, ring, and some other crates like. rusttls failed, but it was using just rustversion, which just checked RUSTC or RUSTC_WRAPPER env vars.

After tinkering, just disabled cache and all become good.

Fix: make default cache keys more specific and report to CI user cache churn explicitly

Why?

We think is that where is cache churn, we build mac darwin m1 some C++ clib or linux x86(gnu or musl) targets - 10GB not enough, seems builds kick cache back and forth, and if caches are shared, sometimes wrong files get into under key reused by other build in incompatible way.

So we need to know when there is churn(can action report it?)?

And also can we add some specific key part(and make it default), to ensure no conflicts?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant