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

Duplicate builds triggered from webhook (push) on branch pipelines

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • None
    • branch-api-plugin-2.6.0

      Occasionally, a push to a branch triggers two builds on the corresponding branch in a multibranch pipeline. We are using the GitHub as branch source, and have added a organization wide GitHub webhook on push only. I am not sure about the relationship between the GitHub plugin and the GitHub branch source plugin.

      On normal builds we see the following two lines:

      Started by GitHub push by (author)
      Push event to branch master at 9:31:27 AM on May 2, 2019

      Each of the builds that are triggered twice has just one of the above lines, i.e.

      Started by GitHub push by (author)

      and

       Push event to branch master at 9:31:27 AM on May 2, 2019

      respectively.

       

      Can anyone shed light on what these two lines mean?

       

      The Jenkinsfile has this property:

      properties([
        pipelineTriggers([githubPush()]),
      ])

       

      Removing it does not seem to have any noticable effect though.

          [JENKINS-57303] Duplicate builds triggered from webhook (push) on branch pipelines

          Liam Newman added a comment -

          mn_unsilo
          That is probably expected behavior for that trait. This is probably something that needs to be fixed in the plugin itself.

          Liam Newman added a comment - mn_unsilo That is probably expected behavior for that trait. This is probably something that needs to be fixed in the plugin itself.

          Liam Newman added a comment -

          mn_unsilo
          I believe this issue is mitigated by branch-api-plugin v2.6.0 honoring quiet period for multibranch pipeline jobs child pipelines (JENKINS-54052). I'm resolving this for now.
          Please reopen if this issue still occurs after upgrading to branch-api-plugin v2.6.0.

          Liam Newman added a comment - mn_unsilo I believe this issue is mitigated by branch-api-plugin v2.6.0 honoring quiet period for multibranch pipeline jobs child pipelines ( JENKINS-54052 ). I'm resolving this for now. Please reopen if this issue still occurs after upgrading to branch-api-plugin v2.6.0.

          Lenny added a comment -

          Please reopen this issue. I got a duplicate build today with all the latest Jenkins and plugins. Updated everything today (Sept 21, 2021)

          This is definitely a race condition of some kind. I have a quiet period for my job of 120 seconds, and this is still happening.

          It doesn't happen every time, but once in a while, so definitely a race condition

          Lenny added a comment - Please reopen this issue. I got a duplicate build today with all the latest Jenkins and plugins. Updated everything today (Sept 21, 2021) This is definitely a race condition of some kind. I have a quiet period for my job of 120 seconds, and this is still happening. It doesn't happen every time, but once in a while, so definitely a race condition

          Lenny added a comment -

          Not sure it relates but I have ORG pipeline

          Lenny added a comment - Not sure it relates but I have ORG pipeline

          Lenny added a comment -

          This is still not fixed as of 1/13/2022

          Lenny added a comment - This is still not fixed as of 1/13/2022

          Lenny added a comment -

          Unresolved as of March 4, 2022

          Lenny added a comment - Unresolved as of March 4, 2022

          Zac Gibson added a comment -

          I've been having this problem extremely frequently for the past couple months. This is totally not fixed.

          Zac Gibson added a comment - I've been having this problem extremely frequently for the past couple months. This is totally not fixed.

          Lenny added a comment -

          My issue actually turned out to be plugin-related to https://plugins.jenkins.io/github-pr-comment-build/

          I just recently fixed the issue in that plugin and have not had any issues since then.

          Lenny added a comment - My issue actually turned out to be plugin-related to https://plugins.jenkins.io/github-pr-comment-build/ I just recently fixed the issue in that plugin and have not had any issues since then.

          Zac Gibson added a comment -

          lprimak A configuration issue with the plugin or the plugin itself was busted? I've got the newest version of it. The only customization the plugin provides us is the string we provide to the property strategy, no?

          Zac Gibson added a comment - lprimak A configuration issue with the plugin or the plugin itself was busted? I've got the newest version of it. The only customization the plugin provides us is the string we provide to the property strategy, no?

          Lenny added a comment -

          the plugin itself, not the configuration.

          The plugin release 67.va90f5cae5912 has the fix, was released 7 days ago and has the fix

          Lenny added a comment - the plugin itself, not the configuration. The plugin release 67.va90f5cae5912  has the fix, was released 7 days ago and has the fix

            bitwiseman Liam Newman
            mn_unsilo Mads Navntoft Noe
            Votes:
            2 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: