Pipeline: "Branch not mergable"

562 views
Skip to first unread message

Andrew Melo

unread,
Apr 25, 2016, 1:40:36 PM4/25/16
to jenkins...@googlegroups.com
Hi all,

Fairly often (~50% of the time), when I push a feature branch up to
GH, my multibranch configuration job will get the notification, poll
GH, then bomb with:

Checking pull request #PR-47
Not mergeable, skipping

Even though the branch is mergable. If I force a build manually, it bombs with:

ERROR: Could not determine exact tip revision of PR-47; falling back
to nondeterministic checkout
<snip>
java.io.IOException: Cannot retrieve Git metadata for the build
at org.jenkinsci.plugins.github.util.BuildDataHelper.getCommitSHA1(BuildDataHelper.java:34)
at com.cloudbees.jenkins.GitHubCommitNotifier.updateCommitStatus(GitHubCommitNotifier.java:132)

This happens until I repeatedly force the branch indexing. Eventually
something clicks over, and jenkins is aware of the proper commit.

Now, I've seen JENKINS-34120, but this appears to be different. The
commit is mergeable against master (I'm the only one commiting to
master currently, no rebases of the feature branch, etc..), and
there's no other status tests that would be keeping it from building.
It seems like the actual commit notification is getting scrambled.

Has anyone else seen this?
Cheers,
Andrew

--
--
Andrew Melo

Andrew Melo

unread,
Apr 26, 2016, 12:01:30 PM4/26/16
to Jenkins Users
Hi-

It appears to be an issue with the GH webhook firing before the mergeability is computed.

When that happens, GH gives "null" to the mergeability field, when Jenkins is expecting true/false. Then Jenkins treats the branch as unmergeable and refuses to build it.

I posted a comment to GH for the branch source and the GH Api plugins -- hopefully that will close the loop.

Thanks,
Andrew
Reply all
Reply to author
Forward
0 new messages