Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-10709

multiple builds are triggered for one change in Gerrit

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      With Gerrit Trigger 2.3.0 we observe that sometimes there are multiple builds triggered for one change in Gerrit.

      Lets say in Jenkins build #25 is triggered by the Gerrit Trigger Plugin. Then we see for this build job the following message in Jenkins:
      Triggered by Gerrit: http://gerrit:8080/27060
      Other triggered builds for this event.
      myjob #25

      The strange thing is that the build job #25 says that there is another build job for the same event which actually itself (again build job #25).

      On the change in Gerrit we then get the following comments:
      1. Build Started http://jenkins:8080/jenkins/job/myjob/25/ (1/2)
      2. Build Started http://jenkins:8080/jenkins/job/myjob/25/ (2/2)
      3. Build Failed
      http://jenkins:8080/jenkins/job/myjob/25/ : FAILURE
      http://jenkins:8080/jenkins/job/myjob/25/ : FAILURE

      In Jenkins it looks like the build job is indeed triggered twice. At least we saw the build job #25 two times in the list of current builds. Normally our tests are failing if they are executed two times in parallel since they need exclusive access to certain resources.

      For the failed build job I have then the possibility to retirgger it by clicking on 'Retrigger' or 'Retrigger All'.
      'Retrigger' starts another build #26, but for the voting still the result of build #25 is taken into account:
      1. Build Started http://jenkins:8080/jenkins/job/myjob/26/ (2/2)
      2. Build Failed
      http://jenkins:8080/jenkins/job/myjob/25/ : FAILURE
      http://jenkins:8080/jenkins/job/myjob/26/ : SUCCESS

      Why does the Gerrit Trigger start multiple builds for only one change in Gerrit? Is this some feature? Can we configure the Gerrit Trigger plugin to always only start a single build?

      Any help would be appreciated. Thanks!

        Attachments

          Issue Links

            Activity

            Hide
            curtiskline Curtis Kline added a comment -

            I would be willing to try it out on our test instance. Right now I am removing the Gerrit Trigger from all of the jobs we recently implemented it on due to this bug. Ah well, it was fun while it lasted! (Jenkins 1.509.4 and GT 2.10.1)

            Show
            curtiskline Curtis Kline added a comment - I would be willing to try it out on our test instance. Right now I am removing the Gerrit Trigger from all of the jobs we recently implemented it on due to this bug. Ah well, it was fun while it lasted! (Jenkins 1.509.4 and GT 2.10.1)
            Hide
            vladichko Vlad Aginsky added a comment -

            We still suffer from this. Is there any progress? I would like to be a beta tester if this can help.

            Show
            vladichko Vlad Aginsky added a comment - We still suffer from this. Is there any progress? I would like to be a beta tester if this can help.
            Hide
            hugares Hugo Ares added a comment -

            Vlad, have you tried the latest 2.11 beta(2.11.0-beta-4)?

            Show
            hugares Hugo Ares added a comment - Vlad, have you tried the latest 2.11 beta(2.11.0-beta-4)?
            Hide
            curtiskline Curtis Kline added a comment -

            I am concerned about this bug being marked "fixed". I am running 2.11.1 of the trigger plugin, and I believe it still exhibits this behavior.

            Show
            curtiskline Curtis Kline added a comment - I am concerned about this bug being marked "fixed". I am running 2.11.1 of the trigger plugin, and I believe it still exhibits this behavior.
            Hide
            sakshisood sakshi sood added a comment -

             I am using Jenkins 2.19.3 and gerrit trigger version 2.23.0  and I believe it still exhibits this behaviour

            Show
            sakshisood sakshi sood added a comment -  I am using Jenkins 2.19.3 and gerrit trigger version 2.23.0  and I believe it still exhibits this behaviour

              People

              • Assignee:
                rsandell rsandell
                Reporter:
                edwin_kempin Edwin Kempin
              • Votes:
                23 Vote for this issue
                Watchers:
                37 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: