|
|
[
vmassol
]
12:28, Friday, 31 December 2004
Here's a non-ordered list of the main problems causing build-breaks that we had found on the current project I'm working on (Note that this list is now a year old and that we have fixed some of them - Unfortunately the majority still remains...). I've added some possible ideas on how to fix them.
- Build takes too long to execute (and thus it is executed less often)
- Fix the build by having more subprojects with binary dependencies and/or streamline the build to
ensure that only important build steps are run. Optimize it (f.e. offer different goals/targets: one
for a clean build and another one that does not perform a clean).
- Local build not executed
- Public API breakage in dependent project without warning
- Not enough continuous commits (all packed up at end of iteration)
- Team meetings to explain more the importance of continuous integration. Complementary idea: "unbreakable builds". The idea is that if you keep your changes to yourself and accumulate them, whenever you'll want to commit them,
the unbreakable build will likely reject your changes as they will break some other part of the code. Thus you'll need to spend several days to talk to other developers to not only fix your code but also fix theirs. Normally
after doing this several times, you should understand that it is in your best interest to commit frequently.
- No functional/integration automated tests (f.e. no local verification of ejb-jar deployments)
- Automated functional tests! Build a suite slowly over time, improving it at each iteration. And maintain it! Decide on a good data handling strategy (this is usually the main issue). Ensure that your data strategy keeps everyone in sync WRT DB data.
- Commit problems (Forget to commit some files, Pb due to SCM tool - Starteam: new directory do not appear in Starteam view!)
- Devs “building” with IDE but forgetting to use the automated build
- Checkstyle errors failing the build
- Coaching. More team meeting to decide what checkstyle errors we want to fail the build or not. Get a strong team buy-in. Complementary idea: "unbreakable builds".
- Failing unit tests
- It probably means that the unit tests are actually integration tests depending on database data. Ensure that unit tests are quick and fast and independent of the environment. Complementary idea: "unbreakable builds".
- [Maven] project.xml not up to date and missing dependency
- SCM diff emails on check-ins (team by team) in order for everyone to have the knowledge of what's happening. Complementary idea: "unbreakable builds".
- Database data modifications (voluntarily or involuntarily) leading to test breakage
- Continuous build not cleaned between different runs
- Fix it. Perform a clean build from time to time.
- Local SCM update not done before local build (in order to get the latest files)
- SCM diff emails on check-ins (team by team) in order for everyone to have the knowledge of what's happening. So you'll know better when to update our local workspace. Complementary idea: "unbreakable builds".
- Environment differences in local build vs central build
- Work continuously towards making the developer's environment as close as possible as the integration environment. Complementary idea: "unbreakable builds". This allows executing the build on the server and thus it runs in the same environment as the continuous build.
- No local deployments done before commits (f.e. no EJB deployments)
- Coaching (in order to ensure that developers do perform deployments on their machines before check-in) + add some checks in the build to automate the verification (they can be f.e. some hand-picked functional tests).
- Checkstyle errors hidden in tons of warnings
- Fix it. Newest versions of Checkstyle allow filtering on severity.
- Non-atomic commits and central build starting with in-flight commits
- Use a scheme a la CruiseControl (wait for some inactivity time on the SCM before trigging a build). Or change the SCM (for subversion for example). Note: We have tried to use CC with StarTeam but even though the infrastructure team increased CPU + RAM, StarTeam falls when it is polled by 3 or 4 CC builds in parallel... (Solution: Dump ST or ask Borland to come and tune the parameters). Complementary idea: "unbreakable builds". This forces "atomic" commits.
- [Distributed development] rsync issues: sometimes jars are corrupted or lost
- Fix the rsync process (Note: this is now no longer happening I believe)
- [Distributed development] VPN instability making it difficult to SCM-update
- Fixed mostly. However usage of Starteam is still extremely slow making hard to SCM-update from remote. Solutions: Use a less bandwidth/responsetime consuming SCM (f.e. Subversion), increase bandwidth (but the issue is mostly with response time which cannot be changed), or use a replication mechanism (I don't like this as I believe it introduces its own issues - I really much prefer everyone working directly on the same repository, especially as I know it works (I've done it in the past using CVS with a team of 30 developers and it was working fine).
- Errors when executing the application
- This is because there are no automated functional tests. Automate them!
|