-
-
Notifications
You must be signed in to change notification settings - Fork 253
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
Add cache to node workflows #210
Conversation
Sorry for the delay on this @lydell , just trying to summarise my knowledge:
I just added these changes in this new PR. My plan is to compare executions times of this PR CheckRuns with this one: #209. I guess we can take some initial conclusions.
I'm not use if I'm understanding, do you want your CI to succeed if there is an outage of
My main goal when opening this PR was to simplify the On the other hand, after opening the PR I noticed you were using The main lowlight of this, is that these workflows are not getting the benefit from npm's cache when running it agains different node versions and operating systems (specially in ConclusionI see 2 opportunities here:
Let's see the numbers between https://github.com/prettier/eslint-config-prettier/actions/runs/1349639381 and https://github.com/prettier/eslint-config-prettier/actions/runs/1349647399 |
Comparison of
Here's setup-node's ADR where there's some expected time improvements per platform: |
Cool! Are those numbers for a run with or without cache? It would be interesting to see both! |
In my understanding, |
I mean, the thing with caches is that sometimes you get a cache hit and sometimes you get a cache miss. Since one PR is running with the new stuff, and one with the old I was worried the new one ran with a cold cache but the old one with a warm cache. That would be an unfair comparison. |
I’ve done some testing in both branches now. With a warm cache in both, this new approach seems to be ~5 seconds slower, because now we spend ~5 seconds running I like the config simplification, and those 5 seconds don’t really matter. But this is very interesting. The solution we already have is easy to understand – if we already have a I need to think more about this / test more and make a decision, but things do look a bit like there was nothing really wrong with the old setup – it even seems to be faster! – so if it ain’t broke don’t fix it? 🤔 |
Very cool study and analysis you did here @lydell, I guess the difference is in this skip step logic you are doing in the old version maybe? Should we bump at least to setup-node@v2 at least (I can open a PR for that if interested)? Maybe there are some improvements :) Let me know if you do a deeper research in terms of performance differences and reasons behind |
Hey @lydell , just a friendly follow up on this. I would like to know if we should try something here (bumping to v2 maybe?) or just close this PR. Thanks once again for all the knowledge and effort you put on this. I learnt A LOT! EDIT: @lydell did you have time to read my last comment here? :) |
It looks like this isn’t happening. Thanks for teaching me about the new cache stuff in setup-node though! |
Description
Follow up on this: #195