If you are submitting a bug, please include the following:
Gradle: 8.10
Spotless gradle plugin: 7.0.0.BETA2
When the spotless gradle plugin is used, configuration cache on github actions using setup-gradle usually fails with the following message:
Calculating task graph as configuration cache cannot be reused because the file system entry '.git/refs/remotes/origin/.probe-8edb64c1-4909-420b-b493-b18d007910f4' has been removed.
Spotless config:
spotless {
ratchetFrom("origin/main")
java {
googleJavaFormat()
}
}
Without ratchetFrom, it's this,
Reusing configuration cache.
It seems the spotpless plugin introduces git and the entire .git folder as an input for configuration cache of some sort, with ratchetFrom.
This issue may be related.
Here is a sample repo where this can reproduce. You would run the .github/workflows/gradle.xml (can be dispatched manually or on pull request/push) action once to generate cache from the setup-gradle action which is invoked inside. A subsequent run should reuse configuration cache, but does not. When you remove ratchetFrom, clear github cache, and run the action twice, the configuration cache is reused.
If you are submitting a bug, please include the following:
gradlew spotless[Apply/Check] --stacktraceGradle: 8.10
Spotless gradle plugin: 7.0.0.BETA2
When the spotless gradle plugin is used, configuration cache on github actions using
setup-gradleusually fails with the following message:Spotless config:
Without
ratchetFrom, it's this,It seems the spotpless plugin introduces git and the entire .git folder as an input for configuration cache of some sort, with
ratchetFrom.This issue may be related.
Here is a sample repo where this can reproduce. You would run the .github/workflows/gradle.xml (can be dispatched manually or on pull request/push) action once to generate cache from the
setup-gradleaction which is invoked inside. A subsequent run should reuse configuration cache, but does not. When you removeratchetFrom, clear github cache, and run the action twice, the configuration cache is reused.