A branch of my nodejs project has been failing on cache retrieval issues for a while https://circleci.com/gh/wheresrhys/workflows/fetch-mock/tree/rhys%2Fbabel-polyfill
Initially I was building my cache key from package.json, but on reading how caches are harder to bust in circleci 2.0, I’ve now changed to committing package-lock.json and using that as the cache key. But I still get failures, and pretty weird ones:
The cache key generated when saving to cache is dependency-cache-atq4gqwOq2wnMOKvehgYFGyAyNaKr7DuHDD_H0BM5YY= https://circleci.com/gh/wheresrhys/fetch-mock/344
But the cache key generated when retrieving the cache is dependency-cache-vQdJyD32GUffAiOk8gJYu5zD9CwWOJRQT0QF0jbqK5I=. However, one job succeeds using this key (which shouldn’t correspond to any existing caches) https://circleci.com/gh/wheresrhys/fetch-mock/345, and all the other jobs fail.
Can anyone explain this behaviour?
github branch: https://github.com/wheresrhys/fetch-mock/pull/260/files