Open vorporeal opened 2 years ago
You are right. On the other hand, if you just set it once, and never change it, it does not matter at all either 🤷🏻♂️
True!
The issue I encountered was that I added that environment variable to our CI workflow but not a separate workflow that runs against our main branch to populate the cache (so that the cache is shared across feature branches) and it, unexpectedly, led to our main branch cache having a cache key that didn't get matched by feature branch caches.
The context is that I migrated our CI to use nextest, which recommends setting CARGO_TERM_COLOR: always
in your CI jobs for more readable output. Despite being the individual on our team with the most context around our use of the rust-cache action, I did not expect this environment variable to have any effect on cache keys.
Our caching was "broken" for a couple weeks before I got lucky and noticed the issue.
While it won't affect me again in the future, it could certainly catch other users by surprise.
I second this request.
This variable, while starting with
CARGO_
, doesn't have any impact on compilation output, just what cargo prints to stdout/stderr, and as such, shouldn't factor into the cache key at all.