-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reset cache when workflow file changes #17
Conversation
I'm not 100% on whether the workflow file hash changing should restore from fallback or fully reset the cache. Set to fully reset for now. |
May want to consider allowing |
Did this. Also fixed matrix jobs all being in the same |
I'm going to largely defer to Tim here: he knows this tool better than I do :) |
@benfrankel How about this:
I guess the disadvantage of this approach would be that |
Sounds good to me. For best of both worlds, there could be a separate |
I moved |
Ok one last thought from my side: What would you think about hashing the entire workflow folder and adding it to the end of the key, with a fallback. Modifying the workflows is realtively rare so it should be fine to hash the whole thing. The fallback ensures that we still have a cash if the change is unrelated. What do you think about that? |
That's an interesting option. One drawback I can think of: Same job name + matrix index but in a different workflow file => same cache key and forced to share a cache, which causes recompiles until you rename one of the jobs. Same job name in a different workflow file may not be common, but when it happens it'd be confusing. Also I had the thought that putting |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In order to keep things moving, lets merge this iteration for now and refine it down the road as we test it in practice.
I cant do a release today, but will try tomorrow.
Ill do a v2 version bump, this probably qualifies as breaking change.
While working on
bevy-template
, we noticed the CI was constantly recompiling. It turns out that when we modified theci.yaml
file with different cargo commands, the cache became outdated and every "cache hit" was a false positive. But the cache never updated because we never changedCargo.toml
orCargo.lock
.