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

217 views
Skip to first unread message

mn@unsilo.com (JIRA)

unread,
May 2, 2019, 6:30:02 AM5/2/19
to jenkinsc...@googlegroups.com
Mads Navntoft Noe created an issue
 
Jenkins / Bug JENKINS-57303
Duplicate builds triggered from webhook (push) on branch pipelines
Issue Type: Bug Bug
Assignee: Kirill Merkushev
Attachments: Screenshot 2019-05-02 at 12.16.19.png
Components: github-branch-source-plugin, github-plugin
Created: 2019-05-02 10:29
Environment: OS: 16.04.6 LTS 4.4.0-1081-aws
OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_212-b03)
OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.212-b03, mixed mode)
Jenkins ver. 2.150.2
GitHub plugin 1.29.4
GitHub Branch Source Plugin 2.5.1
Jenkins is accessed through reverse proxy (nginx via proxy_pass).
Priority: Minor Minor
Reporter: Mads Navntoft Noe

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.

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

bitwiseman@gmail.com (JIRA)

unread,
May 3, 2019, 8:31:02 PM5/3/19
to jenkinsc...@googlegroups.com
Liam Newman commented on Bug JENKINS-57303
 
Re: Duplicate builds triggered from webhook (push) on branch pipelines

It looks like this is duplicate of JENKINS-54610. Does that look right to you?

mn@unsilo.com (JIRA)

unread,
May 9, 2019, 3:02:03 AM5/9/19
to jenkinsc...@googlegroups.com

Liam Newman the issues might be related. In our case, the duplicate builds are triggered by a push directly to master, however. Here is a an except from the scan log:

 

{{[Tue May 07 10:40:30 CEST 2019] Received Push event to branch master in repository unsiloai/frontend UPDATED event from 1.2.3.4 ⇒ http://xxx/github-webhook/ with timestamp Tue May 07 10:40:23 CEST 2019}}
{{ 10:40:30 Connecting to https://api.github.com using XXX}}
{{ Examining xxx/xxxChecking branches...}}
{{Getting remote branch master...}}
{{Checking branch master}}
{}{{Getting remote pull requests from branch master...}}
'Jenkinsfile’ found
Met criteria
{{ Changes detected: master (1d0d76c990ceba060b8e1eda5385e1c0303caf62 → 9c27cad8317b545cae40ea3bda7f637061055000)}}
{{ Scheduled build for branch: master1 branches were processed (query completed)}}
{}{{1 branches were processed}}
{}{{Finished examining xxx/xxx}}
{{{{}}{{[Tue May 07 10:40:37 CEST 2019] Push event to branch master in repository xxx/xxx }}}}
{{UPDATED event from 1.2.3.4 ⇒ http://xxx/github-webhook/ with timestamp Tue May 07 10:40:23 CEST 2019 processed in 6.8 sec}}

 

We will try to remove the PR specific behavior as seen in the screenshot, and report whether the problem persists. If not, it could be related to the PR discovery part.

mn@unsilo.com (JIRA)

unread,
May 21, 2019, 7:04:02 AM5/21/19
to jenkinsc...@googlegroups.com

Encountered the issue again today, so it does not seem to be related to the PR specific behavior.

 

Another detail is that we have multiple projects for the same repository (it's a monorepo), and all of them triggered twice this time. Mostly it's just one of them that triggers twice, though.

mn@unsilo.com (JIRA)

unread,
May 22, 2019, 6:01:02 AM5/22/19
to jenkinsc...@googlegroups.com

Trying out a workaround using the property strategy "(Deprecated )Suppress automatic SCM triggering" from the Branch API plugin. This result in the builds only being having the line "Started by GitHub push by (author)". So far there have been no new duplicate builds.

mn@unsilo.com (JIRA)

unread,
May 22, 2019, 6:01:03 AM5/22/19
to jenkinsc...@googlegroups.com
Mads Navntoft Noe edited a comment on Bug JENKINS-57303
Trying out a workaround using the property strategy "(Deprecated )Suppress automatic SCM triggering" from the Branch API plugin. This result results in the builds only being having the line "Started by GitHub push by (author)". So far there have been no new duplicate builds.

mn@unsilo.com (JIRA)

unread,
Jun 11, 2019, 4:55:02 AM6/11/19
to jenkinsc...@googlegroups.com

Using the "(Deprecated )Suppress automatic SCM triggering" property strategy, new branches are not being built initially. Does anybody have an idea for a workaround for this?

bitwiseman@gmail.com (JIRA)

unread,
Jun 13, 2019, 3:59:02 PM6/13/19
to jenkinsc...@googlegroups.com

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

Reply all
Reply to author
Forward
0 new messages