nx-aws icon indicating copy to clipboard operation
nx-aws copied to clipboard

Possible cache misses - looking for debug advice

Open counterbeing opened this issue 11 months ago • 2 comments

Hey there! Thanks for the plugin, seems like exactly what I was looking for.

I've noticed that in my CI runs, i am definitely producing cache files, I can see them showing up in my bucket. But on subsequent reruns I can see output from the builds, and I'm wondering if I'm actually hitting the cache? I've also tested turning the caching off, and it seems about the same speed.

Do you have any advice for debugging and determining that I am in fact using the cache?

I'm on NX v17 Using Github Actions

Thanks!

counterbeing avatar Mar 21 '24 21:03 counterbeing

I also noticed strange behavior with some other caching plugins, and wrote to NX support, but no solution was provided. One option is to check their docs for troubleshooting cache misses: https://nx.dev/recipes/troubleshooting/troubleshoot-cache-misses

bojanbass avatar Mar 21 '24 22:03 bojanbass

I'm going to dive into this a bit further soon, but am on a deadline with some other stuff. I was able to reproduce the issue with my local caching by doing different combinations of deleting my node_modules and deleting my .nx/cache. In some cases I was able to get the cache to fail altogether, in others i got it to successfully pull from S3. I'll try to document my findings and (hopefully) my fix here.

counterbeing avatar Mar 22 '24 18:03 counterbeing