[openstack-dev] [CI] Gerrit Trivial Rebase Detection (LP bug 881184)
Mark McLoughlin
markmc at redhat.com
Tue Sep 11 10:42:27 UTC 2012
Hey,
On Thu, 2012-09-06 at 19:01 +0000, Jeremy Stanley wrote:
> The CI Team will be merging a long-requested[1]_ feature to Gerrit
> on review.openstack.org at 16:00 UTC this coming Monday, 2012-09-10.
>
> Automatic Detection of Trivially-Rebased Commits
> ================================================
>
> Any committed patchset with no substantive changes (where the git
> patch-id[2]_ and commit message remain the same) will have code
> review flags automatically[3]_ reapplied from its predecessor
> patchset on that Change-Id. Patchsets where the commit message
> differs but the patch-id still remains the same will *not* have code
> reviews reapplied, but will have a comment automatically added from
> the Trivial Rebase user noting that the code itself is unchanged.
>
> It's hoped that these changes will improve workflow for code
> reviews, allowing reviewers to avoid re-reading identical patchsets
> looking for nonexistent alterations. The script itself is provided
> in upstream Gerrit's contrib[4]_ directory and has been put through
> its paces with our OpenStack-specific modifications[5]_ on a couple
> of non-production Gerrit servers already (including review-dev.o.o
> where it is currently installed and active[6]_), so the CI Team
> doesn't anticipate any disruption. Follow up to the list with any
> questions and I'll be happy to answer!
Nice work on this!
I've just noticed a case where this went a little wrong:
https://review.openstack.org/12692
Patch set 2 isn't actually a trivial rebase - it makes a whitespace
change, but the whitespace change is actually important. And, now that I
think about it, I'm not sure it's a great idea to always ignore
whitespace changes in trivial rebase detection.
As Vish said - now that git-review doesn't auto-rebase, we should see
far less trivial rebases happening. Maybe we should re-think whether we
need this?
Cheers,
Mark.
> References...
>
> .. [1] https://bugs.launchpad.net/openstack-ci/+bug/881184
>
> .. [2] http://www.kernel.org/pub/software/scm/git/docs/git-patch-id.html
>
> .. [3] Automatically but not instantly--there is a delay of a few
> seconds before the review flags reappear in the WebUI.
>
> .. [4] https://gerrit.googlesource.com/gerrit/+/master/contrib
>
> .. [5] https://review.openstack.org/12373
>
> .. [6] https://review-dev.openstack.org/488
>
More information about the OpenStack-dev
mailing list