----- Original Message ----- > From: "Barak Korren" <[email protected]> > To: "devel" <[email protected]> > Sent: Sunday, November 20, 2016 3:07:56 PM > Subject: [ovirt-devel] Gerrit parallel patch handling and CI (Or, why did > my code fail post-merge) > > Hi there, > > I would like to address a concernt that had been raised to us by > multiple developers, and reach an agreement on how (and if) to remedy > it. > > Lets assume the following situation: > We have a Git repo in Gerrit with top commit C0 in master. > On time t0 developers Alice and Bob push patches P1 and P2 respectively > to master so that we end up with the following situation in git: > C0 <= P1 (this is Alice`s patch) > C0 <= P2 (this is Bob`s patch) > > On time t1 CI runs for both patches checking the code as it looks for > each patch. Lets assume CI is successful for both. > > On time t2 Alice submits her patch and Gerrit merges it, resulting in > the following situation in master: > C0 <= P1 > > On time t2 Bob submits his patch. Gerrit, seeing master has changed, > re-bases the patch and merges it, the resulting situation (If the > rebase is successful) is: > C0 <= P1 <= P2 > > This means that the resulting code was never tested in CI. This, in > turn, causes various failures to show up post-merge despite having > pre-merge CI run successfully. > > This situation is a result of the way our repos are currently > configured. Most repos ATM are configured with the "Rebase If > Necessary" submit type. This means that Gerrit tries to automatically > rebase patches as mentioned in t2 above. > > We could, instead, configure the repos to use the "Fast Forward Only" > submit type. In that case, when Bob submits on t2, Gerrit refuses to > merge and asks Bob to rebase (While offering a convenient button to do > it). When he does, a new patch set gets pushed, and subsequently > checked by CI. > > I recommend we switch all projects to use the "Fast Forward Only" submit > type. > > Thoughts? Concerns?
Question: after the patch is submitted in Gerrit (it's fully acked and maintainer hits the "Submit" button), does Gerrit allow us to run CI (e.g. `check-merged` script) *before* doing the actual merge? [In other words, does Gerrit support gating merge based on CI script?] That said, +1 on "Fast Forward Only" submit type. > > -- > Barak Korren > [email protected] > RHEV-CI Team > _______________________________________________ > Devel mailing list > [email protected] > http://lists.ovirt.org/mailman/listinfo/devel > _______________________________________________ Devel mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/devel
