-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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 6.5 cached builds cause IllegalStateException #13367
Comments
I am seeing the same issue, when running Tests using the GradleTestKit executing Gradle builds with version 6.5. Also downgrading to 6.4.1 fixes it. It also appeared only on CI builds. Your Environment
|
@G00fY2 One possibility is that this is a cache corruption issue. Would you be able to inspect the compiled script caches on the CI machines? If so, I can give you the details about what to look for. Alternatively, would you be able to remove the |
@adammurdoch I attached the If there is anything I could try, please let me know. :) |
Deleting the |
@G00fY2 thanks, that's very useful. It looks like the entry under |
I wonder whether your CI service is ignoring empty directories when restoring the cache directories? The badly formed entry is missing an empty directory, which Gradle 6.4 ignored, but 6.5 is stricter about the directory being missing from the cache entry. If it turns out to be the CI service, we can simply change Gradle to be lenient again when that directory is missing. |
We are using bitrise.io for most of our projects. I saw that they updated their cache-upload buildstep a few days ago: https://github.com/bitrise-steplib/steps-cache-push/releases/tag/2.3.0 So it looks like until then, empty folders where ignored. Maybe this will fix the issue for our CI environment (will test). But there are possibly more CI platforms which ignore such folders and will run into this issue. @adammurdoch here is the scripts folder from my local machine: Edit: Looks like upgrading to the CI steps which includes empty directories fixed the problem.What about @AndreasTu? |
Thanks for the details. I've changed the cache implementation so that it no longer complains when an empty classes directory goes missing from the script cache: #13424. This fix will be in Gradle 6.6 |
On my side it is a Jenkins-Pipeline Job, but not the Gradle build fails. The executed TestKit-Gradle build inside of the Gradle build fails. |
I have the same problem. Is there a specific solution now? |
This allows using the task configuration avoidance APIs and makes the dependency graph much clearer. Gradle 6.5 suffered from gradle/gradle#13367.
This allows using the task configuration avoidance APIs and makes the dependency graph much clearer. Gradle 6.5 suffered from gradle/gradle#13367.
This allows using the task configuration avoidance APIs and makes the dependency graph much clearer. Gradle 6.5 suffered from gradle/gradle#13367.
This allows using the task configuration avoidance APIs and makes the dependency graph much clearer. Gradle 6.5 suffered from gradle/gradle#13367.
Expected Behavior
Cached builds should not crash
Current Behavior
After updating from Gradle 6.4.1 to 6.5 our CI builds started crashing with the log messages above. Downgrading to 6.4.1 fixes it.
Context
This seems to only happen for our CI builds. The thing is, downgrading to Gradle 6.4.1 fixes the problem. So I am not sure if it's really related to the CI environment.
Steps to Reproduce
We can only reproduce this by running the CI build or downloading the CI cache and run Gradle locally with this cache.
Your Environment
Android Gradle Plugin 4.0.0
See a CI sample project log: https://app.bitrise.io/build/5c10edac74a7374b#?tab=log
Build scan URL: n/a
Maybe you guys have any idea what the problem could be. We didn't find any changes relating the caching behavior in the Gradle 6.5 changelog.
The text was updated successfully, but these errors were encountered: