Mint icon indicating copy to clipboard operation
Mint copied to clipboard

How to deal with inconsistent cache issue on CI machine?

Open mollyIV opened this issue 4 years ago • 3 comments

In order to speed up the pipelines execution time, we cache mint packages on CI machine. The location of cached packages:

/usr/local/lib/mint/packages

Recently, when we added a new package to Mintfile and called bootstrap command, we faced the error:

$ mint bootstrap -m /Project/Mintfile
🌱 Finding latest version of metrics
🌱  Inconsistent cache, clear it up.
Error: Inconsistent metadata: git repository not found for package at path '/usr/local/lib/mint/packages/github.com_realm_SwiftLint'
The 'mint' command exited with error code 1

SwiftLint package has been pulled from cache successfully before calling the command.

We couldn't find any recommendations how to deal with such scenario in the documentation.

💡 Ideas

  • Could mint could prune outdated cache transparently to a user?
  • Could mint provide a clean command to clean outdated cache?

I'd be happy to help with the implementation 🙋‍♂️

mollyIV avatar Feb 22 '21 10:02 mollyIV

Experiencing the same issue - also happy to contribute

welshm avatar Sep 13 '22 20:09 welshm

Is it perhaps a case insensitivity issue? Is the CI machine Linux?

yonaskolb avatar Sep 29 '22 00:09 yonaskolb

Is it perhaps a case insensitivity issue? Is the CI machine Linux?

My issue was on a mac machine, but I cleared it up by cleaning my cache and then re-linking after downloading from the cache.

welshm avatar Sep 29 '22 00:09 welshm