-
Notifications
You must be signed in to change notification settings - Fork 455
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gradle plugin always invalidates configuration cache on github actions, when ratchetFrom is set #2249
Comments
ratchetFrom
is set
I dealt with this issue by turning off
And then have a dedicated job to run static analysis (including spotless), with explicitly specified files:
Note, if the changes files are different, this job will not reuse configuration cache (as it should not). However, if changed files are the same, configuration cache is reused; and all other jobs (e.g. running tests) can skip spotless |
This may be fixed in |
I upgraded to I'm happy to close this issue though for the workaround I posted above. In the end it just makes CI build a bit slower, nothing too bad. |
Thanks for opening this issue. This is a strange message, and makes it hard to tell if this is a bug in Spotless or Gradle... |
If you are submitting a bug, please include the following:
gradlew spotless[Apply/Check] --stacktrace
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: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-gradle
action 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.The text was updated successfully, but these errors were encountered: