Please stop breaking the build
danluu.com
danluu.com
> The worst thing about regular build failures is that they’re easy to prevent. Graydon Hoare literally calls keeping a clean build the “not rocket science rule”, and wrote an open source tool (bors) anyone can use to do not-rocket-science.
https://github.com/barosl/homu
Example interaction: https://github.com/rust-lang/rust/pull/23381#issuecomment-80...
How does the data account for variation in development procedures (e.g. some projects use master as their bleeding edge branch)?
Also if its a commit by commit basis, the percentage of time comparison is completely invalid.
How does the data account for variation in development
procedures (e.g. some projects use master as their
bleeding edge branch)?
That shouldn't matter. You should always be able to successfully check out, build, and pass all tests on master. Otherwise, how are people expected to get development done? If you aren't able to build and run tests because you need to be fixing something that someone else committed broken, it will be a lot harder to ever make real progress.Even if it's "bleeding edge", master should always build and always pass at least the minimal "fast" test suite; some projects may have more thorough "full" test suites that take many hours to run, and requiring that those be run on every change would slow down development too much, but at the very least, the quick "sanity check" test suite should always pass before something can land on master.
Web programmers are hyper-aware of how
10ms of extra latency on a web page load
has a noticeable effect on conversion rate
I wish this was true, but I'm really skeptical that the average "web programmer" even uses the phrase "conversion rate" on a monthly basis.I remember a larger project where we struggled for a longer time to anywhere beyond 20%. Eventually we got a lot better but nowhere near 99%.
I also wonder whether it is worth it? Are all developers really blocked when the build fails? Some yes but if I could I would design the production chain that most would not be.
Isn't there a trade-off in how much to invest into build tooling and automation vs. in functionality? Does building a MVP include building a perfect software production pipeline?
In our setup building the deployment artifacts is contingent on tests passing so if the build isn't passing, no one can deploy.
There was one place where the official builds had been broken for so long that people stopped paying attention to them. The new dev director put a stop to that, to his credit.
The build may also break because of a change in an external dependency.
It shouldn't unless you've been lax in how you specify your dependencies, or the library maintainers have been sloppy in what they claim for backwards-compatibility.
Obviously in the real world, both of those things happen.
Unless by 'lax' you mean 'didn't check in your dependencies'...I don't think I'd call that lax, though.
If you use pull requests instead of commits, you can set up such a system to automatically run make test.
1) Integrate the master branch (or whatever your guaranteed-good branch is) with the code you're about to push. This prevents integration conflicts from causing the build to fail.
2) Test it on a reference machine. This prevents environment assumptions from causing the build to fail. (Such as installing new software or setting an environment variable, but forgetting to make it part of the build.)
These are both easy to do. My preference is to push to a testing branch on the integration machine, merge in the master branch, run the tests, then merge the testing branch back into the master branch. (There's a bit more to it than that, to cover edge cases, but that's the gist.)
Sadly, most teams and CI tools aren't set up to do this--although, as the article says, it's not rocket science. In fact, I'm surprised it's not obvious that you should do it this way.
I don't have a huge amount of experience in open source projects, so maybe they do it differently. Anywhere I've ever worked, not breaking the build and not causing regressions were a prerequisite to getting any pull request serviced. That's how you keep the master from breaking.
On the other hand, building a testing in a clean environment costs money. A company will pay for server time if they believe it's cheaper than developer time (it is). Maybe OS projects just don't have those resources.
Ben's Law - When every developer is committing to the same branch the odds that a commit will break the build increases as more developers contribute to the project.
You could dodge the award even if you did break the build by showing that you had run the full unit test suite before you submitted your code.
http://benjamin-meyer.blogspot.com/2010/06/managing-project-...