Hibernate Search: mark checkstyle:check as not cacheable#195
Conversation
checkstyle:check is not cache-relocatable because project resources
include ${rootProject.directory}, fingerprinting the entire workspace
root tree including target/ dirs from previous builds (83 cache misses).
Upstream PR: hibernate/hibernate-search#5067
|
Workaround validated here: https://github.com/gradle/develocity-oss-projects/actions/runs/23292497283 ✅ |
There was a problem hiding this comment.
Pull request overview
This PR updates the Hibernate Search experiment workflow to work around non-relocatable build cache behavior by injecting Develocity build cache metadata that marks Checkstyle as not cacheable.
Changes:
- Add a workflow step that installs a global
post-checkoutgit hook. - The hook appends a
buildCache.registerMojoMetadataProviderblock into.mvn/develocity-custom-user-data.groovyto setnotCacheableBecause(...)for the Maven Checkstyle plugin.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
|
Reply to copilot comments:
|
|
This looks like it won't be needed: Upstream PR has activity: hibernate/hibernate-search#5067 |
Summary
checkstyle:checkas not cacheable via post-checkout hook injectingnotCacheableBecauseintodevelocity-custom-user-data.groovyresources.1.directorypoints at${rootProject.directory}(workspace root), fingerprinting the entire directory tree includingtarget/dirs from previous buildstestSourceDirectoriesincludestarget/generated-test-sources/test-annotationswith annotation processor output (*__.javametamodel files) that only appear aftercompiler:testCompileTest plan
failIfNotFullyCacheable: true— https://github.com/gradle/develocity-oss-projects/actions/runs/23292497283