Repository navigation
Restore the Maven repository from the newest entry when the POMs change - #345
Merged
Merged
Conversation
setup-java's Maven cache matches only the exact POM hash, so a pull request or dependency bump that touches a POM started from an empty repository. The restore-keys prefix falls back to the newest default-branch entry.
slachiewicz
force-pushed
the
agent/maven-repo-cache-fallback
branch
from
October 14, 2026 00:29
51c80a9 to
0ca003c
Compare
slachiewicz
marked this pull request as ready for review
October 14, 2026 00:35
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
setup-java'scache: 'maven'restores only an exact match on the hash of everypom.xml, so any pull request or dependency bump that changes a POM started from an empty local repository and downloaded everything. The Maven repository is now cached withactions/cachedirectly: the key is still the POM hash, and amaven-repository-<os>-<arch>-restore key falls back to the newest entry the branch may read, normally the default branch's. A build that restored from the fallback saves under its own key, on the branches allowed to save caches and only after the build succeeded.The new key prefix also leaves behind the
setup-java-<os>-maven-entries that Release Drafter overwrote with a 2 MB stub (#343).Verified: none yet beyond
actionlintandzizmor, whose findings matchv5; this branch's own push build exercises the restore path.