-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
Custom Remote Build Cache does not work with configuration cache enabled #14874
Comments
AndroidX is encountering this too in https://android-review.googlesource.com/c/platform/frameworks/support/+/2065190 Has anybody noticed any workarounds for validating that new configuration cache violations don't get introduced while still using a custom remote cache? |
The issue seems to be in DefaultBuildCacheConfiguration#getBuildCacheServiceFactoryType method where we fail to load/cast the build service factory when loading from the configuration cache. |
I wonder if a9d7d71 will fix the problem |
Nevermind, that is actually a really old patch. |
@liutikas your assumption is correct, currently only the Lines 491 to 492 in 70ecd40
The Would you like to take a stab at it? |
Oh nice - thanks! Following this advice I started a prototype fix at mathjeff@9a35cda and it appears to be working; maybe the next thing to do is to clean it up and make a pull request |
Fixes: gradle#14874 Signed-off-by: Jeff Gaston <gastoj3@gmail.com>
I just checked that Gradle 7.5-20220421031748+0000 resolves burrunan/gradle-s3-build-cache#16 |
The previous test did not trigger "reuse configuration cache" since the set of tasks on second execution was different. https://docs.gradle.org/current/userguide/configuration_cache.html gradle/gradle#14874
Thanks, @vlsi! |
This Error brought me here. Could not initialize class org.gradle.configurationcache.problems.Summary |
Expected Behavior
custom implementation of remote build cache can be used with configuration cache enabled
Current Behavior
second run (when configuration cache is reused) fails with following exception
Context
I have custom implementation of remote build cache and I am trying out configuration cache
and running help task fails on second run where the configuration cache is reused.
Steps to Reproduce
run command in README twice
https://github.com/spamdr/custom-build-cache-configuration-cache-issue
Your Environment
Gradle 6.7
openjdk version "11.0.3" 2019-04-16 LTS
OpenJDK Runtime Environment Zulu11.31+11-CA (build 11.0.3+7-LTS)
OpenJDK 64-Bit Server VM Zulu11.31+11-CA (build 11.0.3+7-LTS, mixed mode)
Windows 10
fails also on:
Kubuntu 18.04
The text was updated successfully, but these errors were encountered: