Repository navigation
Conversation
There was a problem hiding this comment.
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Copilot review overview
3 open issues
The cache key is tied topom.xml, which will invalidate the Maven binary cache whenever… · New The cache key doesn’t include OS/arch context (e.g.,${{ runner.os }}/${{ runner.arch }}). If… · New The same cache step is duplicated across multiple jobs. To reduce the chance of future drift (e.g.,… · New
What changed in this PR
Adds GitHub Actions cache entries for the downloaded/extracted Maven distribution so CI jobs can reuse build/apache-maven-* instead of re-downloading Maven each run.
Changes:
- Add
actions/cache@v4step to cachebuild/apache-maven-*in each Maven CI job - Use a shared cache key prefix (
maven-distribution-) with apom.xmlhash-based key and restore keys
| File | Description |
|---|---|
| .github/workflows/maven.yml | Adds caching for the extracted Maven distribution under build/ to speed up CI runs |
Review effort: Lite
Follow-up to the Copilot review feedback: - Include runner.os in the cache key and restore key so the cache can never be reused across different runner platforms. - Keep keying on pom.xml: it is where <maven.version> is defined and build/mvn reads it from, so version bumps invalidate the exact key; unrelated pom changes still hit the restore key prefix, so the distribution is not re-downloaded. The per-job duplication is kept as-is for readability; factoring it into a composite action can be a follow-up if needed. JIRA: https://issues.apache.org/jira/browse/CELEBORN-2488
|
Thanks for the review! Addressed in 0e286a6:
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3880 +/- ##
============================================
+ Coverage 58.74% 60.59% +1.85%
- Complexity 231 324 +93
============================================
Files 399 401 +2
Lines 28058 28415 +357
Branches 2740 2793 +53
============================================
+ Hits 16479 17214 +735
+ Misses 10380 9886 -494
- Partials 1199 1315 +116 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Merge Summary:
Posted by |
|
Thanks @yew1eb for the contribution! |


What changes were proposed in this pull request?
Each job in
maven.ymlre-downloads the Maven distribution fromarchive.apache.orgviabuild/mvn(~25s typical, 1m49s observed on a slow network), even though~/.m2is already cached bysetup-java. This PR adds anactions/cache@v4step for the extracted Maven install underbuild/, sobuild/mvnreuses the cached binary — itsinstall_appalready skips the download whenapache-maven-<version>/bin/mvnexists.This mirrors the sbt launcher caching added for
sbt.ymlin CELEBORN-2432.Why are the changes needed?
Save ~25s–2min per job; ~10–40 minutes of total machine time per CI run.
Does this PR resolve a correctness bug?
Does this PR introduce any user-facing change?
How was this patch tested?
Verified locally that
build/mvnskips the download whenbuild/apache-maven-<version>/bin/mvnis present. CI on this branch shows the cache step restoring and nocurldownload of the Maven tarball.