DEV Community

Discussion on: What is Proper Continuous Integration?

simonhaisz profile image

CI is all about the quick feedback loop. The 10 minute target is a common one and for a very good reason - responding to failures.

One of the principles is that master should always be green. When something does go wrong it needs to be fixed fast. The sooner you learn about a failure the sooner you can react. If you react quickly enough you don't have as much as a context switch to fix the issue. Less time means that there will be less commits from others to a broken branch further muddying the waters.

Some people have automated tools that will automatically revert changes after a CI failure. There more old school practice (that we have where I work) is that after you push your don't leave your desk until you get the green alert, so any issues in master can be dealt with as soon as possible. If it took more than 10 minutes not many people would follow the practice 😁

Now don't get me wrong, a process that takes 30 minutes or an hour is better than no process at all. But there are real advantages to tightening that loop. Depending upon your solution and your environment it may not be worth the investment to do so. Having only have a handful of commiters is a lot different from dozens or hundreds.

stenpittet profile image

I second this. I started to write a comment but you said it all :)

austinhardaway profile image
Austin Hardaway

Thanks that makes a lot of sense! And clearly in this arena, as in most, faster is always better. Faster feedback==faster fixes. However I do think that a separation of cocerns here is warranted. A slower CI pipeline is still a CI pipeline, and I worry about including a speed goal as an implied meaning to a term that describes the functionality of a thing. It probably does stem from not having experience on a team that large though...

Thread Thread
markoa profile image
Marko Anastasov Author • Edited on

Our biggest Ruby on Rails app has 80k lines of test code, unit + integration => entire CI build takes 7mins. With automatic parallelization, of course. Otherwise it'd take an hour and a half.

Thread Thread
derekjhopper profile image
Derek Hopper

Thanks for sharing the time without parallelization. I think a lot of teams and developers out there can benefit from hearing that.