Anwar Parker
07/15/2025, 7:05 AM> Timeout waiting to lock Compressed Files Expansion Cache (/var/jenkins/workspace/core/.gradle/8.14.3/expanded). It is currently in use by another Gradle instance.
Owner PID: 4814
Our PID: 3262
Owner Operation:
Our operation:
Lock file: /var/jenkins/workspace/core/.gradle/8.14.3/expanded/expanded.lockAnwar Parker
07/15/2025, 7:18 AMVampire
07/15/2025, 7:39 AM.gradle directory into multiple of these ephemeral agents? Then it can quite likely happen that they lock each other out.Vampire
07/15/2025, 7:40 AMAnwar Parker
07/15/2025, 4:28 PMAnwar Parker
07/16/2025, 6:59 AMAnwar Parker
07/16/2025, 7:00 AMcompileJava), that we'd rsync the data from $GRADLE_USER_HOME/caches/modules-2 to the rootDir/build/cache and then set that as $GRADLE_RO_DEP_CACHEAnwar Parker
07/16/2025, 7:02 AM8.14.3 from 7.6.4Vampire
07/16/2025, 8:58 AMwe've only noticed this issue after we migrated toProbably just a coincidence and you just were lucky before that it somehow worked. 🤷♂️from8.14.37.6.4
The documentation is ambiguous.If you think so, you should maybe open a documentation issue.
My thinking was after initial compilation (i.e.), that we'dcompileJavathe data fromrsyncto the$GRADLE_USER_HOME/caches/modules-2and then set that asrootDir/build/cache$GRADLE_RO_DEP_CACHE
Or try perhaps have a separate seeding pipeline that populates the caches into docker image which we then pull into the ci-pipeline.Doesn't sound like it makes much sense either. In both cases that directory will not be shared between multiple runners, so using it as ro-cache is not too useful. Also, it sounds like you still want to map the
GRADLE_USER_HOME into the container and only additionally replicate the dependencies cache to be used as ro-cache.
That will not help in any way, you would still have the same problem.
The point is, that you do not share the GRADLE_USER_HOME among several agents, but have the ro-dep-cache which you can share.
If you bake it into the Docker image, there is also no point in using it as ro-cache, you could simply bake it in within the GRADLE_USER_HOME, that is also not really related to that documented functionality.