ICU-12811 Add CI workflow to retain caches that are flaky/costly to init #2281
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.
This PR is adding a workflow to ensure that certain CI caches are not evicted when they are flaky/costly to create.
The motivating reason is that PRs can have spurious build failures because the Maven build job cannot download all of the dependency artifacts due to flakiness. The job needs to be re-run in that case until all of the dependency artifacts can be successfully downloaded. This happens when the cache does not exist, which can happen because the cache is evicted automatically after 7 days of inactivity.
Note: Although ICU4J only has a few test dependencies, the Maven build uses plugins that are implemented with code that have many transitive dependencies.
By ensuring that the cache exists on the upstream default branch (
main
), the CI invocations for PRs will be able to reuse the cache from the default branch and load from it during the first run for that PR. This will help insulate contributors from job failures due to the flakiness.Checklist