Building a fresh image daily

Whoa - Yann Monclair has some fairly stunning stats on the size of the project he works on at JPM:
- Base image size: 2200 classes
- Image size with all app classes loaded: 22,000
- Roughly 60 - 150 classes touched per day
- Every day, around 25 change sets are applied (each with 5-8 classes)
Those stats are why they need to get a new image every day - they really, really need to avoid long splits (forks).
Heh: "We try to keep Envy happy. Normally, Envy is very grumpy". They work to keep changes small, pre-reqs accurate, and to avoid unknown dependencies. So for instance, they really don't like using things like:
#{MyClassOrVariable} ifDefinedDo: [:cls | "specific code here" ].
Now Yann is doing a quick overview of Envy. I'll leave that aside - you can look here (yes, it's old, but it's still accurate for all the basics, as Envy is mostly moribund).
The process of loading up:
- Load the top level map (base Envy functionality)
- Validate the build
- two types of test:
- Code driven (SUnit)
- Data driven (end to end testing
Developers always start with a fresh image each day. They then ensure that all of their code loads into that fresh image. They don't like saving images, because it leads to working on older snapshots. The build process they have takes 40 minutes, but it ensures that all developers are always working on an image that can be reproduced from scratch. A saved image cannot necessarily be reproduced.
Builds will break - just accept this, and don't let the build process become a burden. In this context, a broken build means that one or more SUnit tests failed. Heh - identifying the issue isn't like "House" - failure to identify it in 30 minutes won't kill your project :)Two main culpruts for failures of SUnits: bad code, bad data.
More problematic is when the build doesn't even complete (i.e., a really broken build). Well - this being Smalltalk, we can debug it :)
The most common reason for such problems: prerequisite issues.
The next potential problem: a working build, but your code doesn't load into it. For JPM, this often has to do with the mixture of overrides and Envy. Another issue: do you rely on code that is not released by some other member of the team ? Botched merges can cause problems as well.
"Always find the error before you fix it" - i.e., you're not "House".





Comments
you go, Yann!
[ Troy Brumley] August 26, 2008 12:39:13.160
Comment by Troy Brumley
Do you all use that 40 minute build time for meetings, coffee/tea, or anime? ;)
Re: You go, Yann!
[Giovanni Corriga] August 27, 2008 8:37:19.192
Usually he uses those forty minutes to take blame from us London devs :-)
Re: Building a fresh image daily
[ Troy Brumley] August 27, 2008 9:30:29.857
Comment by Troy Brumley
Yann is my European blame aggregating subsidiary :) I need to expand service to Africa, Asia, South America, and the Pacific Rim. Any volunteers?