Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Since #24493 was merged I was looking at CI and noticed that
setup-java
is also quite old. This PR upgrades to setup-java@v4 and removes the home-grown go-offline+cache solution in favor of the built-in solution. Internally they use actions/cache and it also simplifies the CI configs. The new cache key is the hash of all pom files in the project.The caching behavior is actually slightly different than before. Previously we would restore the cache using two cache keys: one with a hash of the pom files, and one without any hash, such as
linux-maven-2-
. This downside of this approach is that the cache grows over time because when you restore from a cache which doesn't used a hash of the POMs, and make a dependency update, the cache may be saved again that contains both old dependency and new dependencies.When I compare the size of cache hits on our actions, I see that our current cache size is quite large!
Compared to restoring fresh caches with this PR:
Materially, it doesn't make a huge difference in time when cache restores take on the order of a few seconds, but it may save on some storage costs.
Motivation and Context
Less complex CI pipelines and access to newer java versions
Release Notes