cool-easter-32542
07/04/2023, 3:38 AMinit-pants action here, https://github.com/pantsbuild/actions/blob/main/init-pants/action.yaml
It uses cache action for caching.
Can someone share some guidance/reference on implementing similar caching logic in Jenkins ? Essentially i am strugging with how to best implement caching against static keys.
So far, I mounted a nfs disk on my jenkins agent and mapped $HOME/.cache/pants/named_caches $HOME/.cache/pants/setup $HOME/.cache/nce to NFS. This way i was able to persist them across runs, but obviously there is no cache invalidation logic. Neither will it work when multiple pants pipeline run in parallel and try to reuse same NFS file location.
Today i ran into some very interesting error:
18:18:36 + pants fmt lint check :: 18:18:40 22:18:39.97 �[33m[WARN]�[0m Error storing process execution result to local cache: Error creating/opening content database at "/root/.cache/pants/lmdb_store/directories/3": MDB_PAGE_NOTFOUND: Requested page not found - ignoring and continuing 18:18:40 22:18:39.97 [INFO] Completed: Format with Black - black made no changes. 18:18:44 22:18:43.71 �[33m[WARN]�[0m Error storing process execution result to local cache: Error creating/opening content database at "/root/.cache/pants/lmdb_store/directories/3": MDB_PAGE_NOTFOUND: Requested page not found - ignoring and continuing 18:18:44 22:18:43.79 [INFO] Starting: Building black.pex from <resource://pants.backend.python.lint.black/black.lock> 18:18:47 22:18:47.38 [INFO] Completed: Building black.pex from <resource://pants.backend.python.lint.black/black.lock> 18:18:47 22:18:47.38 �[33m[WARN]�[0m Error storing process execution result to local cache: Error creating/opening content database at "/root/.cache/pants/lmdb_store/directories/3": MDB_PAGE_NOTFOUND: Requested page not found - ignoring and continuing 18:18:47 22:18:47.47 �[31m[ERROR]�[0m 1 Exception encountered: 18:18:47 18:18:47 Engine traceback: 18:18:47 in fmt`goal 181847 181847 IntrinsicError: Got hash collision reading from store - digest Digest { hash: Fingerprint<9db33fc4900314433fbba78fb2aaedc1dd73412cf436e16e76b39fc2d14dd128>, size_bytes: 1118 } was requested, but retrieved bytes with that fingerprint had length 8. Congratulations, you may have broken sha256! Underlying bytes: [248, 90, 163, 100, 0, 0, 0, 0] 181847`
Any recommendations on how to proceed ?
Thank you.
pantsbuild/pants