You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Gradle User Home cache cleanup requires Gradle 8.11 to execute.
If a version >= 8.11 is found on the PATH, then this version is used for cache-cleanup.
If no version is found on PATH (or an older version) then 8.11 will be downloaded and used.
If a Gradle Wrapper build runs with a newer version of Gradle (eg Gradle 8.11.1), then it will generate Gradle User Home content that will not be removed by cache cleanup running with Gradle 8.11.
For example, transform outputs are stored under ~/.gradle/caches/<gradle-version>/transforms, and caches/8.12/transforms will not be removed by cache-cleanup running with Gradle 8.11. This can result in ever-growing cache entry sizes.
To workaround this issue, ensure that there is a version of Gradle available on the PATH, and that this version is at least as new as any version used to run Gradle Wrapper builds.
uses: gradle/actions/setup-gradle@v4
with:
gradle-version: "8.11.1" # Set to the newest version of Gradle used to build
Fixing this (without reverting to the old behaviour of always installing the latest Gradle) will involve detecting the newest Gradle version executed for a Job, and ensuring that cleanup is executed with at least that Gradle version.
The text was updated successfully, but these errors were encountered:
Hi. We suffer from this bug in a different way: We use the setup-gradle action on GitHub Enterprise Server, within our corporate network. All our Gradle Wrapper configurations point to a Gradle Distribution, that is hosted within our network, since downloading from services.gradle.org is extremly slow (or fails with timeouts), due to virus scanning in our proxy server.
Unfortunately, we cannot configure the download url for this action, as we can for the Gradle Wrapper.
@stefan-rademacher-tk Thanks for reporting. Your problem is slightly different and the proposed fix for this issue may not help you.
To clarify, the proposed fix would detect the correct version to use for cache cleanup, but would not remove the need to download this version from services.gradle.org.
To address your issue I can see 2 possible improvements to the action:
Allow the download URL to be configured for the setup-gradle action when downloading Gradle distributions
Reuse the existing wrapper distribution download for cache cleanup. Currently these distributions are only used for Gradle wrapper executions.
Can you please raise a separate issue for your use case? Specifically you'd like to avoid downloading Gradle from services.gradle.org for cache cleanup operations.
Gradle User Home cache cleanup requires Gradle 8.11 to execute.
If a Gradle Wrapper build runs with a newer version of Gradle (eg Gradle 8.11.1), then it will generate Gradle User Home content that will not be removed by cache cleanup running with Gradle 8.11.
For example, transform outputs are stored under
~/.gradle/caches/<gradle-version>/transforms
, andcaches/8.12/transforms
will not be removed by cache-cleanup running with Gradle 8.11. This can result in ever-growing cache entry sizes.To workaround this issue, ensure that there is a version of Gradle available on the PATH, and that this version is at least as new as any version used to run Gradle Wrapper builds.
Fixing this (without reverting to the old behaviour of always installing the latest Gradle) will involve detecting the newest Gradle version executed for a Job, and ensuring that cleanup is executed with at least that Gradle version.
The text was updated successfully, but these errors were encountered: