Hey Folks, In a multi-module gradle project, when...
# develocity
s
Hey Folks, In a multi-module gradle project, when does uploading to the remote build cache occur? Is this done immediately after a module compiles or once a build completes? We were evaluating if we can could run gradle tasks on CI on multiple shards. i.e. test module A , B on shard-1 and module C on shard-2. In this case we expected the build cache from shard-1 to be used on shard-2 if we staggered the execution(start shard-2 after X time). This would be dependent on the cache is available while shard-1 is still executing.
n
uploading to the remote build cache happens immediately after the task's execution phase.
s
Thanks! on an rich console output I see a
uploading to build cache
log, is there something I can look for on the plain console output to understand when the build cache is uploaded? Also to confirm I understand this correctly, you mean after the task whose cache is created right? not the startParameters.requestedTask And lastly, what impact would this have on build execution time ? since I assume compressing and uploading to the remote cache also uses a gradle worker thread which would have otherwise been used for task execution
n
You can enable more logging to see more information. For example
--debug
. You can also use a build scan to see more details. scans.gradle.com > Also to confirm I understand this correctly, you mean after the task whose cache is created right? not the startParameters.requestedTask I'm not sure what you mean by this but the task's outputs cannot be upload to the build cache until the task completes. > And lastly, what impact would this have on build execution time ? Yes, it does impact the overall build duration. This can be dependent on many factors such as network bandwidth, network latency, task duration and task output size. The best way to understand the impact on your build is to try it on your build and measure.