Faster continuous integration builds at Canva
canva.dev
canva.dev
Honestly, really surprised to not see this mentioned til the end. Some of the other things in the article were almost jaw-dropping ($1+ million in instances savings, needing 48 cores to run CI, etc.), but having flakey tests regularly causing you problems, having to rerun extremely expensive jobs, is something that I would argue should have been addressed first, not last.
(Though of course that's just for raw speed; for cost and total compute needed, every cycle/IO counts.)
It's often underestimated how much benefit you'll get from taking a good look at your cache usage. It all worked great the day your platform team set up the build system, but 100 new CI jobs later there will be tons of room for improvement. Similar story with consolidating CI jobs in general. If we keep just tacking things on eventually we have to step back and optimize.
This blog post matches my experience of running a CI system (but at a smaller scale). It’s messy, and throwing more resources and money at the problem often shows significantly diminishing returns for massive cost spends.
I’d love to someday try and fix this problem for other companies.
When it gets too bad, it starts once incentivizing even worse practices like skipping/disabling parts of the test suite or multi tasking/context switching waiting on things to complete