On Wed, Mar 11, 2009 at 04:16:25PM -0400, John McNair wrote:
> I only have a handful of commits on Hudson to my credit, but I thought I'd
> share a little bit of experience that I don't see mentioned here. Many
> people have offered good suggestions. Increasing test coverage and its
> measurement is always a good idea. More frequent CI is good.
>
> But still there is the question of how to use the SCM to its best
> advantage. Others have pointed out the problem with quiet periods. A
> good SCM should never be off. That is, developers should always be able
> to commit _somewhere_. Someone else pointed out the potential pain with
> temporary release branches. It can cause merging pain.
This is kind of funny, I met with Kohsuke earlier today and described
our use of Git and Hudson, and we do precisely this, reserving master
("trunk") for stable, release quality code, while using "topic branches"
as a means of doing high-frequency commits.
The problem with this, at least as far as Hudson development goes is
that branches are not cheap at all in Subversion. For a developer to
create a topic branch in Subversion they would need to execute the `svn
copy` and then run `svn checkout` on the new tree, resulting in a whole
new working copy, not ideal for the sporadic developers among us.
My approach thus far has actually been git-svn with Hudson, such that
I'm committing early and often for the random tidbits that I contribute
to Hudson and then when those changes are stabilized, do I execute the
`git-svn dcommit` and actually sync those changes upstream to the Hudson
repository; I'm not saying this is the solution, just saying it's my
solution because I'm deathly afraid of destabilizing the tree :-P
At Slide we've run through a couple of the tribulations that have been
listed on this thread thus far:
* Creation of a release branch to cope with a volatile trunk results
in large dangerous merges when it comes time to release
* Creation of topic branches for bug fixes/features results in large
amounts of merge pain (in Subversion at least) especially as the
time difference between the branch creation and the most recent
sync with trunk grows.
(warning, crazy idea inbound!)
I think this is a prime opportunity for eating our own dog food, but
taking it one step further, based on the release branch suggestion: no
manual merges to release!
I'm making large assumtopions about the quality and quantity of test
coverage Hudson has as a project, but imagine a build was associated with
*every* single commit into trunk, i.e. hudson.r1234.war, etc.
When the job associated with r1234 finishes executing, the following
might happen:
SUCCESS:
* r1234 is merged automatically into release branch
* Tests run on an hourly basis to ensure that release branch
remains stable
FAILURE:
* A very "loud" email is sent to relevant parties (including
committer stating the failure of what/when/where
* Maybe r1234 is reverted out of trunk?
* Trunk is "broken", merges into release branch are ceased for
future jobs unless manually okayed.
I think we already have support to do everything except the latter two
bullet points in the failure case. But I think it would prevent the
commit-schedule issues and also help pinpoint exact "problem commits"
given the large range of developers committing into trunk.
IMHO it solves the stability issues, but also holds Hudson commiters to
a high standard and is the appropriate amount of CI applied to a
CI-server ;)
Cheers
--
-R. Tyler Ballance
Slide, Inc.