Slackbot
07/17/2023, 4:12 PMTrevJonez
07/17/2023, 10:07 PMTrevJonez
07/17/2023, 10:08 PMwolfs
07/18/2023, 9:09 AMCopy task? Does it contain a lot of files? When fingerprinting the outputs Gradle will capture everything in the destination directory not only the copied files. So anything else that ends up there that might be expensive reading might make the task slow.
Finally, can you share what is running in parallel to this task on the timeline? I wonder if something else is affecting this task.
All in all, this is very strange and I didn’t see something like this before.Nikolay
07/18/2023, 9:12 AMval dockerRuntimeLibsDir = "${layout.buildDirectory.get()}/dockerRuntimeLibs"
val deleteDockerRuntimeLibs by registering(Delete::class) {
delete.add(dockerRuntimeLibsDir)
}
val copyDockerRuntimeLibs by registering(Copy::class) {
into(dockerRuntimeLibsDir)
from(configurations.runtimeClasspath)
dependsOn(deleteDockerRuntimeLibs)
}
I guess fingerprinting all the jars is slow after the copy is finished.wolfs
07/18/2023, 9:16 AMdockerRuntimeLibs directory? 20s for fingerprinting a few JARs seems to be very high.Nikolay
07/18/2023, 9:17 AMwolfs
07/18/2023, 9:17 AMNikolay
07/18/2023, 9:18 AMcachIf { false} will it fingerprint?Nikolay
07/18/2023, 9:18 AMwolfs
07/18/2023, 9:19 AMdockerRuntimeLibs?Nikolay
07/18/2023, 9:20 AMbuild so almost certainly something might be running yes. We have configuration cache so tasks in the same module can run in parallel.wolfs
07/18/2023, 9:21 AMNikolay
07/18/2023, 9:22 AMNikolay
07/18/2023, 9:23 AMwolfs
07/18/2023, 9:23 AMNikolay
07/18/2023, 9:25 AMNikolay
07/18/2023, 9:25 AMwolfs
07/18/2023, 9:26 AMTask.doNotTrackState() . That switches off all the state tracking for a task, including the input and output fingerprinting.Nikolay
07/18/2023, 9:27 AMwolfs
07/18/2023, 9:28 AMNikolay
07/18/2023, 9:28 AMwolfs
07/18/2023, 9:29 AMwolfs
07/18/2023, 9:29 AMNikolay
07/18/2023, 9:29 AM8.2.1wolfs
07/18/2023, 9:29 AMNikolay
07/18/2023, 9:30 AMNikolay
07/18/2023, 9:30 AMwolfs
07/18/2023, 9:30 AMwolfs
07/18/2023, 9:31 AMNikolay
07/18/2023, 9:32 AMNikolay
07/18/2023, 9:32 AM8.1 versionwolfs
07/18/2023, 9:32 AMNikolay
07/18/2023, 9:33 AMNikolay
07/18/2023, 9:35 AMoutputs.cacheIf { false }
doNotTrackState("It is going to be different on every run because of version.txt")
And report backwolfs
07/18/2023, 9:36 AMoutputs.cacheIf { false } won’t have an effect because the task isn’t cacheable anyway.Nikolay
07/18/2023, 9:37 AMNikolay
07/18/2023, 9:37 AMNikolay
07/18/2023, 9:38 AMoutputs.upToDateWhen { false }wolfs
07/18/2023, 9:39 AMdoNotTrackState implies all the other things. That is enough.Nikolay
07/18/2023, 9:50 AMNikolay
07/18/2023, 9:53 AMNikolay
07/18/2023, 10:58 AMwolfs
07/18/2023, 12:16 PMNikolay
07/18/2023, 12:18 PMNikolay
07/18/2023, 12:54 PMwolfs
07/18/2023, 1:36 PMprocessTestResources with doNotTrackState()?wolfs
07/18/2023, 1:56 PMNikolay
07/18/2023, 2:15 PMDaz DeBoer
07/18/2023, 7:16 PMGiven that the task is not cacheable I don’t see why fingerprinting needs to runFingerprinting is also required for
UP-TO-DATE checks, so by using doNotTrackState() you're forcing the task to always run, even if there's been no change. This is bad for incremental builds.Nikolay
07/18/2023, 9:43 PMAnze Sodja
07/20/2023, 9:26 AMcopyDockerRuntimeLibs? Are these just jars, and how many of them, what size etc?Nikolay
07/24/2023, 10:25 AMcopyDockerRuntimeLibs is just jars. You can see the code for it further up in the thread. The size and jars vary from module to module. The biggest jar is a transitive dependancy of kafka rocksdbjni-7.1.2.jar which is 52MB. There are 170-250 jars that get copied depending on the module