Just run it in CI
Just run it in CI
Just run it in CI
Just run it in CI
2025-02-16

The other day I was wondering if I'm the only person who absentmindedly commits and pushes code to a remote repository, only to find that code has failed in CI for one reason or another. I've only recently started to conscientiously run all possible fixes, linting, and tests locally before pushing. But I'm surprised that I made it this far in my nearly 10 years in this field without a single comment from any collaborator, coworker, or colleague that I should be more mindful of burning CI dollars. I think this is par for the course when working for a series of VC-backed companies that either aren't aware of the spend going on in these third-party CI systems, or they're making money hand over fist and often don't care, or have the time to investigate the cost of goods sold. [1]

Perhaps that will all change as we move through different economic cycles. I'm not sure. The other day I was speaking with a friend who's working for a client who spends about $200,000 a month on CI. I was shocked by this, and yet I'm sure there are companies spending double that or even more. I suppose these costs are accepted because without these systems, the money-making machinery would be otherwised hindered. So it comes as a default cost, perhaps. Honestly, I'm not really sure.

Generally, I think it's somewhat of a wasted effort to propose saving a gargantuan company money because either they won't listen to you, or trying to implement those systems is a difficult task in itself. But I can't help wondering how much money and compute energy could be saved by enforcing a culture of local-first development in the software development lifecycle. That sounds fancy, but all I'm talking about is running your tests and CI before you push as part of a hygienic routine. I imagine there are plenty of more experienced folks who are maaaaybe saying: yeah, of course. [2]

Much of this has been mitigated by systems like Git hooks. But even then, some places don't use them, to my surprise. Some people disable them because they think they're too slow. Perhaps more than anything, this speaks to the Wild West attitude of working as a programmer. Even if I had taken a four-year degree in computer science, I'm not sure how much schooling would focus on these sorts of refined processes. Sure, test-driven development was popular for a while. It just so happens that I came to programming right after it became boring again.

I'm not sure where I'm going with all of this, other than this little thought that popped into my head did stop me in my tracks for a few moments. I think it's the wastefulness on one hand that irks me, and on the other hand, the possibility of becoming a more disciplined, rigorous contributor appeals to me. Even in a culture where the prevailing attitude is that nothing is easier than spending someone else's money, I'd still like to be conscientious of my footprint—if not to help some massive company that's underpaying me, then at least to develop a mindset against wastefulness in those small but repeated moments of my day.

Footnotes


  1. It's probably only fair to preface this by saying I recently started at a client where CI takes about 45 minutes (or more).

  2. Plenty of software is getting so complex that tests can't be run on a single machine in a reasonable amount of time. For that, I have no other remarks but to say, Damn. The aforementioned monolithic codebase for whom CI costs 200k a month supposedly requires days for the test suite to run to completion on a single laptop.