Open jeremiewtd opened 1 month ago
Hello @jeremiewtd, we are considering if this should be added to the orb by default or not. You can achieve the expected behavior changing the nvm-cache-key
parameter, you can either specify an executor or use {{ arch }}
:
- node/install:
node-version: "20"
nvm-cache-key: {{ arch }}
Why this should not be added? It doesn't work as expected without this
Hi @jeremiewtd, while adding this specific parameter to the cache is unlikely to cause issues, in this case is easier to solve on user side with the example I showed. Adding too many defaults to the cache key might lead to a situation where it's not suitable for everyone. I have a draft for this #238, but right now is faster to add the key yourself.
OK thank you, although I still don't understand why 🙂
Orb version: 6.3.0
What happened:
Every executor using the node orb are sharing the same cache no matter what CPU architecture is it : amd or arm. It causes them to always use the same node binary instead of using the one for the CPU arch. So, for the "bad" arch, it always download node instead of using cache because the version in cache is not the good one for it.
For instance this job is running on macOS M1 and get cache from a linux amd job :
Expected behavior:
Each CPU architecture has its own cache key so that it gets the correct node binary for it.
Thank you