Error uploading archive: cache at :storage/caches

Alright good news… I’ve figured it out! It seems having a newline at the end of the cache key is the issue underlying this vague caching exception.

Old: use of >. This used to work, but apparently it doesn’t work any more, this will raise the error encountered (see original message).

          key: >
            deps1-{{ .Branch }}-{{ .Environment.CACHE_VERSION }}-
            {{ checksum "foo.txt" }}-
            {{ checksum "bar.txt" }}-
            ...
            {{ checksum "last.txt" }}

New: use of >-. This - (per YAML) strips the final newline in the output. This works for me!

          key: >-
            deps1-{{ .Branch }}-{{ .Environment.CACHE_VERSION }}-
            {{ checksum "foo.txt" }}-
            {{ checksum "bar.txt" }}-
            ...
            {{ checksum "last.txt" }}
1 Like