You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "andygrove (via GitHub)" <gi...@apache.org> on 2026/09/29 13:53:41 UTC

[I] ci: stop main's cargo build cache from being evicted [datafusion-comet]

andygrove opened a new issue, #6387:
URL: https://github.com/apache/datafusion-comet/issues/6387

   ### What is the problem the feature request solves?
   
   About half of the merge-queue runs compile the native library from scratch. Of 155 successful full queue runs between 2026-09-11 and 2026-09-29, 76 missed the cargo cache in the Spark SQL build job, and those took a median of 115 minutes against 88 for the rest. The same miss costs the Linux `Build Native Library` job and the Iceberg build about 25 minutes each (~29 cold vs ~4 warm), and it showed up in 10 of 25 sampled PR runs.
   
   The cause is the repository's 10 GB Actions cache budget. The entries main needs add up to about 12 GB:
   
   | Entry | Size | Written by |
   | --- | --- | --- |
   | `Linux-cargo-debug-<lock>-<rs>` | 4.1 to 5.3 GB | `linux-test-rust`, on every push that changes Rust |
   | `setup-java-Linux-x64-maven-*` | 2.5 GB | `docs.yaml` (`setup-java` with `cache: 'maven'`), read by nothing else |
   | `Linux-spark-sql-*` | 2.0 GB | `setup-spark-builder` |
   | `Linux-java-maven-*` | 1.5 GB | the TPC-H/TPC-DS jobs |
   | `Linux-cargo-ci-<lock>-<rs>` | 1.4 GB | `build-native`, on every push that changes Rust |
   
   Both cargo keys include `hashFiles('native/**/*.rs')`, so every Rust change on main writes a new pair, and entries keep evicting each other. On 2026-09-29 the `cargo-ci` entry written at 06:18 was gone by 07:46, and at 13:36 `cargo-debug` alone was 5.29 GB of a 9.99 GB total.
   
   `cargo-debug` is the largest entry and buys no wall-clock time. `linux-test-rust` runs alongside `build-native`, finishes well before the Linux test matrix on a pull request, and far before the Spark SQL suites in the queue. It saves about 7 runner-minutes a run (13 minutes warm against 20 cold).
   
   ### Describe the potential solution
   
   1. Key the `cargo-ci` cache on `Cargo.lock` and `Cargo.toml` only, in every workflow that reads it, and save it on main only when that exact key is missing. That leaves one entry per dependency set instead of one per Rust change; the workspace crates recompile either way.
   2. Stop caching `native/target` for `linux-test-rust`. Keep the crate registry (`~/.cargo/registry`, `~/.cargo/git`) warm through a small registry-only entry that `build-native` writes. `linux-test-rust` then writes no cache of its own and no longer needs to run on push.
   3. Drop `cache: 'maven'` from `docs.yaml`. The site deploy runs after the merge and gates nothing, so downloading its Maven dependencies costs a few minutes of a job nobody waits on.
   
   That brings the steady state on main to about 6 GB, which also leaves room for a macOS native build cache.
   
   ### Additional context
   
   #6112 covers the TPC dataset caches, which are also written from pull-request and queue refs.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [I] ci: stop main's cargo build cache from being evicted [datafusion-comet]

Posted by "andygrove (via GitHub)" <gi...@apache.org>.
andygrove closed issue #6387: ci: stop main's cargo build cache from being evicted
URL: https://github.com/apache/datafusion-comet/issues/6387


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org