About contributing staging branches feature to Gerrit

50 views
Skip to first unread message

Mika

unread,
Jul 21, 2011, 4:42:04 AM7/21/11
to Repo and Gerrit Discussion
Hi,

I have developed a new feature that allows continuous integration or
automated build system to build, test and approve a patch of changes
before they are submitted. I will explain the feature in more detail
below. I would like to hear comments from Gerrit users and developers,
if it would be possible to contribute this to Gerrit, would this be a
useful feature to you?

This feature introduces staging branches to collect reviewed changes
before final submission. Instead of building and testing each change
separately and then submitting them, changes are first reviewed and
submitted to a staging branch. The continuous integration system will
create a new build from a staging branch, build and test all changes
together and, finally, approve or reject them based on build and test
results. If the build is approved, the destination branch is updated.
If the build is rejected, all changes need to be submitted again.

With this feature several changes are build and tested together in a
managed way. Change status is clearly visible in Gerrit. Developers
need to complete the code review and submit them before CI system can
pick them up. Results are posted to Gerrit.

If not enabled by using a specific access right, this feature is not
visible at all in Gerrit.

Please comment freely and let me know what you think.

Best regards, Mika

--

Mika Hämäläinen

Magnus Bäck

unread,
Jul 21, 2011, 10:25:14 AM7/21/11
to Repo and Gerrit Discussion
On Thursday, July 21, 2011 at 10:42 CEST,
Mika <mika.ha...@accenture.com> wrote:

> This feature introduces staging branches to collect reviewed changes
> before final submission. Instead of building and testing each change
> separately and then submitting them, changes are first reviewed and
> submitted to a staging branch. The continuous integration system will
> create a new build from a staging branch, build and test all changes
> together and, finally, approve or reject them based on build and test
> results. If the build is approved, the destination branch is updated.
> If the build is rejected, all changes need to be submitted again.

To me, it makes more sense to test changes commit by commit as they
are uploaded. Having people submit potential crap to a staging branch
will probably result in one or more bugfix commits at the tail of many
staging branches before they're merged to the destination branch --
stuff that should've been caught earlier on.

> With this feature several changes are build and tested together in a
> managed way. Change status is clearly visible in Gerrit. Developers
> need to complete the code review and submit them before CI system can
> pick them up. Results are posted to Gerrit.
>
> If not enabled by using a specific access right, this feature is not
> visible at all in Gerrit.

If one or more developers want to test several changes together, they
can use the fact that multiple commits chained together via their Git
ancestry work like a virtual staging branch, i.e. if you test the last
commit in a patch series you'll test everything.

While I guess this can be useful for some workflows, it's not completely
obvious to me that this is something that needs native support in
Gerrit. Can't you accomplish the same thing via a regular branch? Okay,
so people will have to manually create and upload the merge commit that
merges the staging branch to the destination branch, but then they can
handle conflicts which isn't possible if Gerrit does the merge for them
(which seems to be the case with your patch?).

--
Magnus Bäck Opinions are my own and do not necessarily
SW Configuration Manager represent the ones of my employer, etc.
Sony Ericsson

Saša Živkov

unread,
Jul 21, 2011, 5:25:14 PM7/21/11
to Repo and Gerrit Discussion
What Magnus wrote was exactly describing my opinion. Actually, I couldn't
write is so well.

Saša Živkov
Reply all
Reply to author
Forward
0 new messages