Closed chrismgrayftsinc closed 1 month ago
@chrismgrayftsinc Can you try building a version with process.exit()
and see if it helps in your case?
I tried and it didn't make much of a difference.
I don't really know what is happening in the 2 minutes between when "Successfully saved cache" is printed and the next step is started.
@chrismgrayftsinc Do you have a public fork to see how you built setup-bazel?
Oh whoops I forgot to run npm run build
. I'll try again.
Okay, that did make a huge difference.
I'll create a pull request with the change.
I had seen this for about a month but never had time to look into it. Getting a version with this published would be awesome. My bazel build takes 5 minutes but the saving cache takes 4 and a half almost all of that is after seeing Successfully saved cache
.
@chrismgrayftsinc Thanks! I made a release 0.9.0 with this fix. Can you try it out?
@chrismgrayftsinc Thanks! I made a release 0.9.0 with this fix. Can you try it out?
Just verified on my builds. This is a huge improvement. reduced a lot of my lint github action run time by over 50%. Thank you!
Although just one thing to note I just see Post job cleanup.
message now and not the other messages anymore. Not sure if it's somehow killing the process too early or this is expected.
Hmm, I am seeing the other messages with my test version. I haven't tried the released version yet.
Recently a run of
Post Setup bazel
took around 4 minutes. I wonder if it could be related to actions/toolkit#1578The workaround mentioned there is to call
process.exit()
after the caches are saved.