Hi all,
I’m using the cache-push step to cache some Gradle and Android related stuff. However, my cache file(s) are around 6GB now and this does not seem to be right.
So I downloaded a cache sample and look at the metadata cache-info.json
file and noticed that lots of files are being in the cache will I did not request them. There is also what looks like duplicated entries. Maybe I’m not understanding the cache file right, maybe I’ve misconfigured something, maybe there is a bug?
I would request your help to determine what’s wrong and how I can fix it.
So, here my cache-push
step config:
- cache-push@1.1.0:
title: Push cache
inputs:
- cache_paths: |-
$HOME/.android/build-cache
$HOME/.gradle
./.gradle
- ignore_check_on_paths: |-
$HOME/.gradle/caches/*.lock
./.gradle/*.lock
./.gradle/*.bin
And here a sample of the cache-info.json
file:
{
"fingerprint": "93c87448d0c73d5e56b136a0858c91f50a31797d",
"cache_contents": [
{
"destination_path": "/root/.gradle",
"relative_path_in_archive": "c-0"
},
{
"destination_path": ".gradle",
"relative_path_in_archive": "c-1"
},
{
"destination_path": "/root/.gradle",
"relative_path_in_archive": "c-2"
},
{
"destination_path": "/root/.m2",
"relative_path_in_archive": "c-3"
},
...
"/bitrise/src/wear/build/generated/source/r/viper/debug/com/google/android/gms/tasks/R.java": {
"fingerprint_source": "[/bitrise/src/wear/build/generated/source/r/viper/debug/com/google/android/gms/tasks/R.java]-[248B]-[0x644]-[sha1:41b0002be23442b34186da69915072edf09b40cd]"
},
"/bitrise/src/wear/build/generated/source/r/viper/debug/com/google/android/gms/wearable/R.java": {
"fingerprint_source": "[/bitrise/src/wear/build/generated/source/r/viper/debug/com/google/android/gms/wearable/R.java]-[251B]-[0x644]-[sha1:d5718afae1245c2c24c2e2d6bec70ace6b8fb731]"
},
...
And it goes like that forever. I don’t understand why /bitrise/src/app/build
would be added to the archive? I thought only the paths specified would be cached?
I looked at the source code and it seems it inspect cache_paths
plus bitrise_cache_include_paths
but the first is suppose to be what I defined in cache_paths
input and the other one should be empty. So I don’t see the problem.
Any help appreciated.