<div dir="ltr">Top posting, this is a very old thread.<div><br></div><div>Keeping in view the recent NetBSD problems and the number of bugs creeping in, I suggest we do these things right now:</div><div><br></div><div>a. Change the gerrit merge type to fast forward only.</div><div>As explained below in the thread, with our current setup even if both PatchA and PatchB pass regression separately when both are merged it is possible that a functional bug creeps in.</div><div>This is the only solution to prevent that from happening.</div><div>I will work with Kaushal to get this done.</div><div><br></div><div>b. In Jenkins, remove gerrit trigger and make it a manual operation</div><div><br></div><div>Too many developers use the upstream infra as a test cluster and it is *not*.<br></div><div>It is a verification mechanism for maintainers to ensure that the patch does not cause regression.</div><div>It is required that all developers run full regression on their machines before asking for reviews.<br></div><div>Reviewers should review the patch only when the developer has given a +1 verified on the patch.</div><div>Again, I will work with Kaushal to get this done.</div><div><br></div><div>P.S: Stop using the &quot;universal&quot; jenkins account to trigger jenkins build if you are not a maintainer.</div><div>If you are a maintainer and don&#39;t have your own jenkins account then get one soon!</div><div><br></div><div>Thanks,</div><div>Raghavendra Talur</div><div><br></div><div><br></div><div><br></div><div><div class="gmail_extra"><div class="gmail_quote">On Tue, Nov 10, 2015 at 11:33 AM, Atin Mukherjee <span dir="ltr">&lt;<a href="mailto:atin.mukherjee83@gmail.com" target="_blank">atin.mukherjee83@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr"></p>
<p dir="ltr">-Atin<br>
Sent from one plus one</p><div><div class="h5"><br>
On Nov 10, 2015 11:24 AM, &quot;Kaushal M&quot; &lt;<a href="mailto:kshlmster@gmail.com" target="_blank">kshlmster@gmail.com</a>&gt; wrote:<br>
&gt;<br>
&gt; On Tue, Nov 10, 2015 at 9:24 AM, Raghavendra Gowdappa<br>
&gt; &lt;<a href="mailto:rgowdapp@redhat.com" target="_blank">rgowdapp@redhat.com</a>&gt; wrote:<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; ----- Original Message -----<br>
&gt; &gt;&gt; From: &quot;Raghavendra Talur&quot; &lt;<a href="mailto:rtalur@redhat.com" target="_blank">rtalur@redhat.com</a>&gt;<br>
&gt; &gt;&gt; To: &quot;Gluster Devel&quot; &lt;<a href="mailto:gluster-devel@gluster.org" target="_blank">gluster-devel@gluster.org</a>&gt;<br>
&gt; &gt;&gt; Sent: Tuesday, November 10, 2015 3:10:34 AM<br>
&gt; &gt;&gt; Subject: [Gluster-devel] Gerrit review, submit type and Jenkins testing<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; Hi,<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; While trying to understand how our gerrit+jenkins setup works, I realized of<br>
&gt; &gt;&gt; a possibility of allowing bugs to get in.<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; Currently, our gerrit is setup to have cherry-pick as the submit type. Now<br>
&gt; &gt;&gt; consider a case where:<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; Dev1 sends a commit B with parent commit A(A is already merged).<br>
&gt; &gt;&gt; Dev2 sends a commit C with parent commit A(A is already merged).<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; Both the patches get +2 from Jenkins.<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; Maintainer merges commit B from Dev1.<br>
&gt; &gt;&gt; Another maintainer merges commit C from Dev2.<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; If the two commits B and C changed code which had no merge conflicts but were<br>
&gt; &gt;&gt; conflicting in logic,<br>
&gt; &gt;&gt; then we have a master which has bugs.<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; If Dev3 now sends a commit D with re-based master as parent, we have the<br>
&gt; &gt;&gt; following cases:<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; 1. If bug introduced above is not racy, we have tests always failing for Dev3<br>
&gt; &gt;&gt; on commit D. Tests that fail would be from components that commit B and C<br>
&gt; &gt;&gt; changed. Dev3 has no idea on how to fix them and has to enlist help from<br>
&gt; &gt;&gt; Dev1 and Dev2.<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; 2. If bug introduced above is racy, then there is a probability that Dev3<br>
&gt; &gt;&gt; escapes from this trouble and someone else will bear it later. Even if the<br>
&gt; &gt;&gt; racy code is hit and test fails, Dev3 will probably re-trigger the tests<br>
&gt; &gt;&gt; given that they failed for a component which is not related to his/her code<br>
&gt; &gt;&gt; and the bug stays in code longer.<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; The most obvious but not practical solution to the above problem is to change<br>
&gt; &gt;&gt; the submit type in gerrit to &quot;fast-forward only&quot;. It would then ensure that<br>
&gt; &gt;&gt; once commit B is merged, Dev2 has to re-base and re-run the tests on commit<br>
&gt; &gt;&gt; C with commit B as parent, before it could be merged. It is not practical<br>
&gt; &gt;&gt; because it will cause all patches in review to get re-based and re-triggered<br>
&gt; &gt;&gt; whenever a patch is merged.<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; A little modification to the above solution would be to<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;     * change submit type to fast-forward only<br>
&gt; &gt;&gt;     * don&#39;t run any jenkins job on patches till they get +2 from reviewers<br>
&gt; &gt;&gt;     * once a +2 is given, run jenkins job on patch and automatically submit<br>
&gt; &gt;&gt;     it if test passes.<br>
&gt; &gt;&gt;     * automatically rebase all patches on review with new master and mark<br>
&gt; &gt;&gt;     conflict if merge conflict arises.<br>
&gt; &gt;<br>
&gt; &gt; Seems like a good suggestion. How about a slight variation to the above process? Can we run one initial set of regression immediately after submission, but before any reviews? That way reviewers can prioritize those patches that have passed regression over the ones that have failed? Flip side is that minimum two sets of regressions are needed to merge any patch. I am making this suggestion with the assumption that dev/reviewer time is more precious than machine time. Of course, this will have issues with patches that need to get in urgently (user/customer hot fix etc) where time is a constraint. But that can be worked around on a case-by-case basis.<br>
&gt;<br>
&gt; We would still be running smoke, which would catch any very obvious<br>
&gt; mistakes, isn&#39;t this enough?<br>
&gt;<br>
&gt; Regarding the initial regression run, would it include the complete<br>
&gt; regression suite or just a subset. If it is the complete set, then it<br>
&gt; would be no different from what we are doing now. If it is a subset,<br>
&gt; then we will need to come up with a subset of the regression suite<br>
&gt; that catches most of obvious mistakes. We&#39;ve had discussions several<br>
&gt; times (don&#39;t remember if it was on the mailing lists, but I have had<br>
&gt; conversations) about doing this. Every time we ended up on the<br>
&gt; question of how we choose the subset, which is where we stopped.<br></div></div>
How about running tests/basic/*.t? I know coverage wise this isn&#39;t good enough, but still better than running everything or nothing.<span class=""><br>
&gt;<br>
&gt; &gt;<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; As a side effect of this, Dev would now be forced to run a complete<br>
&gt; &gt;&gt; regression on dev machine before sending a patch for review.<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; Any thoughts on the above solutions or other suggestions?<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; Thanks,<br>
&gt; &gt;&gt; Raghavendra Talur<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; _______________________________________________<br>
&gt; &gt;&gt; Gluster-devel mailing list<br>
&gt; &gt;&gt; <a href="mailto:Gluster-devel@gluster.org" target="_blank">Gluster-devel@gluster.org</a><br>
&gt; &gt;&gt; <a href="http://www.gluster.org/mailman/listinfo/gluster-devel" target="_blank">http://www.gluster.org/mailman/listinfo/gluster-devel</a><br>
&gt; &gt; _______________________________________________<br>
&gt; &gt; Gluster-devel mailing list<br>
&gt; &gt; <a href="mailto:Gluster-devel@gluster.org" target="_blank">Gluster-devel@gluster.org</a><br>
&gt; &gt; <a href="http://www.gluster.org/mailman/listinfo/gluster-devel" target="_blank">http://www.gluster.org/mailman/listinfo/gluster-devel</a><br>
&gt; _______________________________________________<br>
&gt; Gluster-devel mailing list<br>
&gt; <a href="mailto:Gluster-devel@gluster.org" target="_blank">Gluster-devel@gluster.org</a><br>
&gt; <a href="http://www.gluster.org/mailman/listinfo/gluster-devel" target="_blank">http://www.gluster.org/mailman/listinfo/gluster-devel</a><br>
</span><p></p>
<br>_______________________________________________<br>
Gluster-devel mailing list<br>
<a href="mailto:Gluster-devel@gluster.org">Gluster-devel@gluster.org</a><br>
<a href="http://www.gluster.org/mailman/listinfo/gluster-devel" rel="noreferrer" target="_blank">http://www.gluster.org/mailman/listinfo/gluster-devel</a><br></blockquote></div><br></div></div></div>