Closed SpicyLemon closed 3 months ago
[!IMPORTANT]
Review skipped
Draft detected.
Please check the settings in the CodeRabbit UI or the
.coderabbit.yaml
file in this repository. To trigger a single review, invoke the@coderabbitai review
command.You can disable this status message by setting the
reviews.review_status
tofalse
in the CodeRabbit configuration file.
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Eh. There really isn't any improvement with this.
The setup-go
action already restores from a previous cache when there aren't any changes to go.sum
. So this change would only really affect PRs that have a change to go.sum
, and tests haven't been run yet with it. If there's no changes to go.sum
, or tests for the PR have already run using the same go.sum
, the jobs restore go stuff from the cache.
Without this PR, when there's no cache to restore from, each of the test runners will set up go, download the needed modules, and at the end, attempt to save the new cache. There will be 10 runners trying to do this, but only one save will go through. Any subsequent runs (in the same PR or even in a different PR with the same go.sum
), will then be able to restore from that cache.
This PR added some steps to init
that would set up go and, if not restoring from cache, download all the modules we need so that at the end of the init
job, that cache would be written. That'd then allow the test jobs to always be able to restore from cache.
So, in total, there'd be less processing needed because what used to be done 10 times, is now only being done once. But those 10 times were all being done in parallel anyway, so it really only took about the same amount of time as doing it just once. And adding the steps to init
add a tiny bit of extra overhead in all cases.
That might matter if we start regularly running out of runners, but a) it only takes maybe 15 or 30 seconds to set up go and download the modules, and b) that setup part is regularly skipped because the cache already exists. So as is, we just sometimes tie up 10 runners for 15-30 seconds longer than we might by setting stuff up in init
.
Ultimately, there just isn't any real improvement by doing this.
Description
This PR will add caching to the go stuff in the tests workflow, hopefully speeding things up overall.
Eh... no real improvements seen (see comment below for more info).
Before we can merge this PR, please make sure that all the following items have been checked off. If any of the checklist items are not applicable, please leave them but write a little note why.
docs/
) or specification (x/<module>/spec/
).godoc
comments..changelog/unreleased
(see Adding Changes).Files changed
in the Github PR explorer.Codecov Report
in the comment section below once CI passes.