[Ci-users] Gerrit trigger failing on ci.centos

Brian Stinson brian at bstinson.com
Sat Sep 10 07:03:21 UTC 2016


On Sep 09 14:56, Brian Stinson wrote:
> On Sep 09 13:56, Attila Darazs wrote:
> > On 09/08/2016 07:05 PM, Attila Darazs wrote:
> > > On 09/07/2016 07:56 PM, Adriano Petrich wrote:
> > > > Thanks Brian!
> > > > 
> > > > On Wed, Sep 7, 2016 at 3:44 PM, Brian Stinson <brian at bstinson.com
> > > > <mailto:brian at bstinson.com>> wrote:
> > > > 
> > > >     On Sep 07 13:56, Adriano Petrich wrote:
> > > >     > Hi folks
> > > >     >
> > > >     >  Retriggering a job or trying to trigger it from gerrit is not
> > > > working
> > > >     >
> > > >     > I'm getting a NullPointerException on
> > > >     >
> > > >     > Caused by: java.lang.NullPointerException
> > > >     >       at
> > > > 
> > > > com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTriggerParameters.setOrCreateParameters(GerritTriggerParameters.java:447)
> > > > 
> > > >     >       at
> > > > 
> > > > com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.EventListener.createParameters(EventListener.java:263)
> > > > 
> > > >     >       at
> > > > 
> > > > com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.EventListener.schedule(EventListener.java:188)
> > > > 
> > > >     >       at
> > > > 
> > > > com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger.retriggerThisBuild(GerritTrigger.java:849)
> > > > 
> > > >     >       at
> > > > 
> > > > com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.actions.RetriggerAction.doIndex(RetriggerAction.java:148)
> > > > 
> > > >     >       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> > > > Method)
> > > >     >       at
> > > > 
> > > > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> > > > 
> > > >     >       at
> > > > 
> > > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> > > > 
> > > >     >       at java.lang.reflect.Method.invoke(Method.java:606)
> > > >     >       at
> > > > 
> > > > org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:320)
> > > >     >       at
> > > > org.kohsuke.stapler.Function.bindAndInvoke(Function.java:163)
> > > >     >       at
> > > > 
> > > > org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:96)
> > > > 
> > > >     >       at
> > > >     org.kohsuke.stapler.IndexDispatcher.dispatch(IndexDispatcher.java:26)
> > > >     >       at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746)
> > > >     >
> > > >     >
> > > >     >
> > > >     > It looks related to the gerrit plugin. and arrfab found this bug
> > > >     > https://issues.jenkins-ci.org/browse/JENKINS-31198
> > > >     <https://issues.jenkins-ci.org/browse/JENKINS-31198> but I'm not
> > > > sure on
> > > >     > what to do.
> > > >     >
> > > >     >
> > > >     > Right now gating is broken because of this
> > > >     >
> > > >     > Cheers,
> > > >     >
> > > >     >   Adriano
> > > > 
> > > >     Hi All,
> > > > 
> > > >     If you use the Gerrit retrigger functionality, you can mitigate
> > > > this by
> > > >     running jjb over your specs or by opening the job config in the web
> > > >     interface and hitting save. This is needed to pick up some new
> > > > fields in
> > > >     the job config that were added by plugin updates.
> > > > 
> > > >     If you have any questions please let us know.
> > > 
> > > Hi Brian,
> > > 
> > > I have a question. :)
> > > 
> > > The "recheck" functionality is broken. This is not the same as
> > > "retrigger", we're looking for something in the comments like this:
> > > 
> > > >             trigger-on:
> > > >                 - patchset-created-event
> > > >                 - comment-added-contains-event:
> > > >                     comment-contains-value:  '(?i)^(Patch Set
> > > > [0-9]+:)?( [\w\\+-]*)*(\n\n)?\s*(recheck)'
> > > 
> > > from here[1].
> > > 
> > > i.e. when somebody writes 'recheck' as a comment the jobs should trigger
> > > and it doesn't happen. This might be because of the update?
> > > 
> > > I repushed the JJB changes a couple of times today, so that doesn't
> > > solve the issue. It does seem to trigger on patchset creation though.
> > > 
> > > When commenting "recheck" on this[2] for example, it should rerun this
> > > job[3] but nothing happens. This was working fine until recently and we
> > > didn't change the jenkins-job-builder package or the JJBs around this part.
> > > 
> > > Jenkins Job Builder version: 1.6.1
> > > 
> > > Do you see anything in the logs about this? Did something change around
> > > the Gerrit Trigger?
> > > 
> > > Best regards,
> > > Attila
> > > 
> > > [1]
> > > https://github.com/rdo-infra/ci-config/blob/master/jenkins/jobs/tripleo-quickstart-triggers.yml#L98-L101
> > > 
> > > [2] https://review.openstack.org/#/c/364394/
> > > [3]
> > > https://ci.centos.org/view/rdo/view/tripleo-gate/job/tripleo-quickstart-gate-master-delorean-quick-basic/
> > 
> > We dug into this a bit more with Fabian this morning and he found NPE errors
> > about this comment added issue: http://pastebin.centos.org/53421/
> > 
> > After some more digging, I found that the new version of Gerrit Trigger[1]
> > has this new feature:
> > 
> > JENKINS-30821[2] - Add comment-added comment as job parameter (pull #295)
> > 
> > Which looks exactly like the part that is trying to fetch the comment when a
> > build was triggered by a comment and leads to an NPE. According to arrfab we
> > have this version on the Jenkins. I think downgrading to 2.21.1 will solve
> > the issue.
> > 
> > Meanwhile we can't trigger on any comment like recheck, full-ci-check,
> > images-ci-check. The good news is that probably we don't have a problem with
> > REG_EXP based branches and we don't need to change our JJB.
> > 
> > A.
> > 
> > [1] https://wiki.jenkins-ci.org/display/JENKINS/Gerrit+Trigger#GerritTrigger-Version2.22.0%28releasedAug172016%29
> > [2] https://issues.jenkins-ci.org/browse/JENKINS-30821
> 
> We should be able to get that plugin downgraded and pinned tonight. This
> will require a SafeRestart of Jenkins (not a full outage window). I'll
> let you all know how that goes. 
> 
> --Brian 

The plugins should be downgraded, can we try a trigger from gerrit? 

--Brian



More information about the Ci-users mailing list