10 tips on how to prevent business value risk
One category of risk that project teams need to ensure they address is business value failure – delivering a product that fails to provide value for the business investor.
The content has been bookmarked!
There was an error bookmarking this content! Please retry.
Posted by Amr Elssamadisy on Sep 28, 2007
And this is how we end up with a build pipeline. Later stages tend to run slower than earlier stages, but everything is arranged to provide fast feedback. We know that we only have to manually test the builds that make it through the far end of the pipeline, and as we add stages we can add confidence that the application works as expected. If we're smart (quick! Pull the "clever" lever again!) we can automatically deploy the app into increasingly realistic environments and run tests against it as part of the pipeline, which is something we'd never imagine doing from the developer workstation.Not everyone agrees that this is a good idea, however. Julian Simpson of ThoughtWorks calls this the “pipeline of doom”. He suggests that we are skirting the issue by using a pipeline – that of a slow build machine. By pipelining the build, we give false confidence that the integration phase is successful. Developers continue to build on bad code for several iterations, which only exacerbates the problem. As for pushing slower tests back:
The other aspect of the pipeline that I find troubling is this: by not forcing the developers to sit through the functional tests before they check in their code, you prevent their fantastic brains from reflecting on improving them. If people are feeling the pain of running them, they have a good motivation to fix them. Those tests ought to provide the biggest bang for your buck: unless you're careful you could be running poor tests dozens of times a day.So, does your team have pipelined CI? How’s it working for you?
Agility at scale, become as agile as you can be
SCM best practices for multiple processes, releases & distributed teams
In today’s hyper-competitive world, later may be too late to adopt Agile development and this Roadmap for Success will help you get started. Download "Agile Development: A Manager's Roadmap for Success" now!
A slow build is usually the reflect of a deeper problem :
- A large project which should be splitted in smaller modules.
- A wrong test strategy (unit tests not relying on mock objects but on external resources).
- A slow build tool.
- ...
A pipeline build is more of a hack in my opinion in most situations.
I tend to agree. Unfortunately many teams handle painful steps by doing less of that step. It usually causes more pain in the future, but somehow we miss the connection. (Integration at the end of a project using a traditional software process quickly comes to mind.)
Pipelining CI moves in the wrong direction. Teams that have focused on making the build faster have more complete and faster feedback.
I think Julian is wrong to call pipelined continuous integration a "pipeline of doom". I believe there are many stages in the pipeline from user story to customer accepted and installed product.
We have the challenging task of reducing the length of the feedback loops in as many places as we can. I think we want to focus on the most valuable areas first, and I believe continuous integration has a very high return on investment. Speeding integration by pipelining or by parallel processing of stages of the integration has helped my team see more quickly when something is wrong.
I believe there are operations which are necessary for delivery to the customer, but long enough duration, or expensive enough, that we choose to stage them, delay them, or pipeline them.
We don't burn a DVD with every build from the continuous integration machine, because we've found that we don't learn a lot from burning a DVD.
We run tests from every build on the continuous integration machine, even though the tests take longer than we'd like, because we continue to learn from the running of the tests.
We continue to seek ways to increase the performance of the tests, but have also continued to add more tests. The team (and the stakeholders) have accepted that increasing number of tests may slow integration, but the slower integration is better than the alternatives.
Stages such as what? Almost everyone will agree to the DVD burning stage - but not running functional/system tests?!
Here's what I've seen when this happens:
1) Functional tests aren't run and build passes.
2) Someone checks in code, passes build, but breaks functional tests (and doesn't know it).
3) 5 others check in code in an (unknown to them) broken build.
4) The next stage finally catches up and breaks - but 6 people have checked in. They are *all* sure it wasn't their code that broke the build. So they expect the others to fix it.
I find this discussion very valuable. The basic question that is being asked, is how much pragmatism team afford in their processes?
In many cases, introducing a continuous integration system into complex system is something that takes a long time. For example, in GigaSpaces it was very challenging for us to automate the process and make sure all unit and functional tests are run on every build. We also needed to invest in parallelism of the test harness to make sure the time it takes to run those is reduced linearly based on the test machines available.
Quite ovbiously the answer is dependent on the particular implementation. Forcing every developer to wait for 50 minutes to run a test suite locally before checking in is a fantastic waste of time. Anybody doing this should immediately question what they are doing. Its indicative of some serious problems with the development infrastructure - test design, application design, poor hardware, poor network or poor team setup.
Developers "building on bad code for several iterations" isn't going to be fixed by running different builds.. - again indicative of deeper team / management problems.
If you have a unit test build that takes say 3 or 4 minutes, and then a full build that takes say 30 minutes - and you are able to identify who is causing the breaking build in both cases - say by running something like Team Piazza or build-o-matic, and you agree that failed builds should be fixed immediately (which is after all the whole point of the CI exercise) - then that seems a reasonable compromise - fast feedback but still no developer wait-states.
we have several projects with many shared modules. If everything (200 modules or so) was to run in a single CI, it would take the entire day to build through it all.
Earlier we had a (set of) customized CruiseControls that would even try to compile the main source of the different modules against each other (as required by the dependency graph) before we wasted time running any tests. Unfortunately this was a little too expensive to maintain ourselves, and quite difficult to port to maven2 builds.
... a simple way to monitor change in random URLs, so that the different CI instances in the pipeline (or, rather, build graph) more easily can get triggered by each other. Now we often have to push the "build now" button in order to have the changes in one project's CI propate through all dependent modules in different CI instances.
James,
I agree with your point about the need to question the approach being used if the developers have a 50 minute wait. I guess the point that I was trying to make was that you need to address your slow build and test issues rather than push them further down the pipeline. All that does is reduce throughput through to the QA team.
Extending CI to do more testing than you'd normally do (low intensity performance testing for example): great. Not addressing the causes of the slow build and trying to fix it with a second stage: not so good.
Please tell us more about your project... C/C++, .NET, Java? The 200 modules - are they dynamically linked? Are they all one project or several projects in an enterprise?
It sounds like you have a large amount of dependencies. Could the long-term solution possibly involve reducing the coupling instead of pipe-lining the build?
I think that those dependencies really belong in the build system, and then the target called by the CI can change instead.
One category of risk that project teams need to ensure they address is business value failure – delivering a product that fails to provide value for the business investor.
InfoQ spoke to the authors of Software Systems Architecture on a couple of new topics, the System Context viewpoint and Agile, which have been added to the second edition.
Alex Papadimoulis discusses ugly code, where it comes from, how to avoid it, and how to get rid of it.
John Davies examines Visa’s architecture and shows how enterprises have architected complex integrations incorporating Hadoop, memcached, Ruby on Rails, and others to deliver innovative solutions.
Sean Comerford unveils ESPN.com’s architecture, what components are used and why, and the current changes the website goes through.
Are there repeated patterns of failure on Enterprise Agile Enablement efforts? Sanjiv and Arlen discuss Seven Deadly Sins to avoid when adopting Agile in an enterprise.
Erik Dörnenburg answers: What is Enterprise and Evolutionary Architecture?, discussing 4 issues: Turning strategy into execution, Ensuring conformance, Where do the architects sit? Buying or building?
Sean Cribbs explains what Map-Reduce and Riak are, why and how to use Map-Reduce with Riak, and how to convert SQL queries into their Map-Reduce equivalents.
11 comments
Watch Thread Reply