ribafish opened a new pull request, #7999:
URL: https://github.com/apache/geode/pull/7999
## Summary
- Make test task inputs relocatable by converting absolute paths to relative
paths in `jvmArgs` and system properties, enabling Gradle remote build cache
hits across different machines.
- Disable caching for test tasks that have `outputs.upToDateWhen { false }`.
In Gradle 7.3.3, `outputs.upToDateWhen { false }` interferes with the output
snapshot that Gradle takes before task execution. Without a proper baseline
snapshot, Gradle can't determine the "pre-existing state" of output
directories, flags them as having overlapping outputs, and falls back to
re-execution instead of loading from cache. Adding
`outputs.doNotCacheIf("Forced rerun") { true }` makes the intent explicit and
avoids relying on this side-effect behavior.
- Fix missing task dependency declarations that caused Gradle to disable
caching for correctness:
- `:geode-core:sourcesJar` was using antlr-generated sources from
`:geode-core:generateGrammarSource` without declaring the dependency.
- `:combineReports` was wired to test tasks via `taskGraph.whenReady`,
which runs after task graph finalization — Gradle doesn't track those as
declared dependencies. Added explicit `finalizedBy`/`mustRunAfter` wiring in
`geode-old-versions` (the only project missing it since it doesn't apply
`geode-test.gradle`).
- Fix `:rat` task cache miss caused by `geode-old-versions` version
subdirectories (1.10.0, 1.11.0, etc.) persisting across clean builds. These
directories are not in git but get created during the build as Gradle project
directories. Add a `deleteOldGeodeVersions` task finalized by `clean` to remove
them, ensuring consistent rat input fingerprints on subsequent clean builds
from the same location.
### Details
Non-relocatable absolute paths in task inputs (e.g.
`-javaagent:/full/path/to/file.jar`, `test.buildDirectory=/full/path/to/build`)
cause remote cache misses because the paths differ across machines. This PR
converts them to relative paths so the cache key is stable regardless of
checkout location.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]