[JIRA] (JENKINS-57583) Ignore target branch no longer working

5 views
Skip to first unread message

awiddersheim@hotmail.com (JIRA)

unread,
May 21, 2019, 11:17:07 AM5/21/19
to jenkinsc...@googlegroups.com
Andrew Widdersheim created an issue
 
Jenkins / Bug JENKINS-57583
Ignore target branch no longer working
Issue Type: Bug Bug
Assignee: Unassigned
Components: basic-branch-build-strategies-plugin
Created: 2019-05-21 15:17
Priority: Major Major
Reporter: Andrew Widdersheim

I have Ignore rebuilding merge branches when only the target branch changed option enabled but it does not seem to work when doing a repository scan.

   Checking pull request #126
Could not determine the mergability of pull request 126.  Retrying 4 more times...
      ‘Jenkinsfile’ found
    Met criteria
Changes detected: PR-126 (d4c1e76f93b3bd14801516c1492ba086104c9f40+f0f67d5327479b7265b99bcbbcc9dfba41ac9d74 (84faa76b0eb2e77205ecd1d76aad5db154d0043a) → d4c1e76f93b3bd14801516c1492ba086104c9f40+a5b83e33ac3c7e8f950da549835e9ff6b630ec19 (b5dcd562b082ef2d32f265da138488cabe1ab39f))
Scheduled build for branch: PR-126

    Checking pull request #125
Could not determine the mergability of pull request 125.  Retrying 4 more times...
      ‘Jenkinsfile’ found
    Met criteria
Changes detected: PR-125 (c58b5220b377015968b931d94e1687275b46c930+f0f67d5327479b7265b99bcbbcc9dfba41ac9d74 (d6aeb08d075198bd6cde73945584bdd77aa3dca0) → c58b5220b377015968b931d94e1687275b46c930+a5b83e33ac3c7e8f950da549835e9ff6b630ec19 (5377880b32efd962cf9efc0f9ef223f891a09a19))
Scheduled build for branch: PR-125 

I only ever see the Could not determine the mergability of pull request 125. Retrying 4 more times... line after a change has been merged to the target of some PRs and I rescan. When rescanning without any changes it's fine.

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

awiddersheim@hotmail.com (JIRA)

unread,
May 21, 2019, 2:51:30 PM5/21/19
to jenkinsc...@googlegroups.com
Andrew Widdersheim commented on Bug JENKINS-57583
 
Re: Ignore target branch no longer working

I will also sometimes see PRs getting checked twice.

 

  Getting remote pull requests...
    Checking pull request #4597
Could not determine the mergability of pull request 4597.  Retrying 4 more times...
      ‘Jenkinsfile’ found
    Met criteria
Changes detected: PR-4597 (1d496879cc394a321a189f94d34c9bb8eb52166a+5cf22230284e0ddfffcf260c1bb53c04c4a2597a (f3ce4c9e279465bc0182f71ca3d85bf9e5f02f76) → 1d496879cc394a321a189f94d34c9bb8eb52166a+b177caaafd1be37b8f97fe5f2d557ec1a9a78478 (1d2d5ffb99d3496a07edb2714961af1b01581b36))
Scheduled build for branch: PR-4597

    Checking pull request #4597
      ‘Jenkinsfile’ found
    Met criteria
No changes detected: PR-4597 (still at 1d496879cc394a321a189f94d34c9bb8eb52166a+b177caaafd1be37b8f97fe5f2d557ec1a9a78478 (1d2d5ffb99d3496a07edb2714961af1b01581b36))
 

awiddersheim@hotmail.com (JIRA)

unread,
May 21, 2019, 2:52:02 PM5/21/19
to jenkinsc...@googlegroups.com

fbelzunc@gmail.com (JIRA)

unread,
May 21, 2019, 3:07:02 PM5/21/19
to jenkinsc...@googlegroups.com

By doing a quick inspection, I would say this is not related.

The stacktrace is coming from github_branch_source and without being an expert o the code, I don't see any relationship between this issue and the basic-branch-build-strategies-plugin.

https://github.com/jenkinsci/github-branch-source-plugin/blob/github-branch-source-2.5.2/src/main/java/org/jenkinsci/plugins/github_branch_source/GitHubSCMSource.java#L1564

Have you tried to downgrade ONLY this particular plugin to ensure the issue is here?

awiddersheim@hotmail.com (JIRA)

unread,
May 21, 2019, 3:45:03 PM5/21/19
to jenkinsc...@googlegroups.com

I saw that as well though I'm not familiar with internals of how this all fits together. I have no doubt that this issue could be caused by some other plugin but at the end of the day it's this plugins job to prevent the build from happening which brought me here. Also, I'm not entirely able to play with downgrading packages on our production Jenkins currently. Are you able to replicate at all?

awiddersheim@hotmail.com (JIRA)

unread,
May 21, 2019, 4:49:02 PM5/21/19
to jenkinsc...@googlegroups.com

I downgraded to 1.1.1 of this plugin and still see the same issue. Also, it appears that the merability message isn't always consistently displayed and may be a red herring.

    Checking pull request #149
      ‘Jenkinsfile’ found
    Met criteria
Changes detected: PR-149 (831936ab764be06ae376045e698f855f77e339da+3f65ffafeddbc4ce48a4abf27ec1dd3c0188ec60 (6784313393861111505e9e029c095b1d5e83c6cd) → 831936ab764be06ae376045e698f855f77e339da+326d0409c9ecc5675988c4c1d7cbf688d2cf2055 (8ab2d59a2fc7f6432b7863951976756ca6911781))
Scheduled build for branch: PR-149 

awiddersheim@hotmail.com (JIRA)

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

bitwiseman@gmail.com (JIRA)

unread,
May 22, 2019, 11:15:05 AM5/22/19
to jenkinsc...@googlegroups.com

Andrew Widdersheim
What Félix Belzunce Arcos what suggesting was downgrading the github-branch-source plugin not the basic build traits. But I don't think that is needed, I'm willing to assert this break is due to the addition of mergeHash.
Any plugin working with github merge PRs that doesn't take mergeHash into account is likely need updating.

Félix Belzunce Arcos
Could we change this trait to be "Only rebuild merge pull requests when source branch has changed"? Then you can do a comparison that ignores base and merge commits and that will accurately describe the behavior.

awiddersheim@hotmail.com (JIRA)

unread,
May 22, 2019, 11:27:03 AM5/22/19
to jenkinsc...@googlegroups.com

I'm not sure Only rebuild merge pull requests when source branch has changed is desired and doesn't really accomplish the same thing as Ignore rebuilding merge branches when only the target branch. Feels like either your change needs to adhere to what the base class says it should do by not taking target into account or the logic in this plugin changes in a way that is compatible with all SCMs.

bitwiseman@gmail.com (JIRA)

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

Andrew Widdersheim
Ah, yes, I see your further comment in the PR. You are correct I didn't read the contract carefully enough.

bitwiseman@gmail.com (JIRA)

unread,
May 22, 2019, 12:00:02 PM5/22/19
to jenkinsc...@googlegroups.com
Liam Newman edited a comment on Bug JENKINS-57583
[~awiddersheim]

Ah, yes, I see your further comment in the PR.  You are correct I didn't read the contract carefully enough.

  Thanks to your analysis I should be able to fix this quickly.

awiddersheim@hotmail.com (JIRA)

unread,
May 22, 2019, 2:10:02 PM5/22/19
to jenkinsc...@googlegroups.com

Liam Newman great. Thanks! Let me know if I can help with anything.

bitwiseman@gmail.com (JIRA)

unread,
May 22, 2019, 4:53:03 PM5/22/19
to jenkinsc...@googlegroups.com
Liam Newman started work on Bug JENKINS-57583
 
Change By: Liam Newman
Status: Open In Progress

bitwiseman@gmail.com (JIRA)

unread,
May 22, 2019, 4:53:03 PM5/22/19
to jenkinsc...@googlegroups.com
Liam Newman assigned an issue to Liam Newman
 
Change By: Liam Newman
Assignee: Liam Newman

bitwiseman@gmail.com (JIRA)

unread,
May 22, 2019, 4:53:03 PM5/22/19
to jenkinsc...@googlegroups.com

bitwiseman@gmail.com (JIRA)

unread,
May 22, 2019, 4:59:03 PM5/22/19
to jenkinsc...@googlegroups.com
Liam Newman updated an issue
Change By: Liam Newman
Component/s: github-branch-source-plugin

bitwiseman@gmail.com (JIRA)

unread,
May 22, 2019, 5:00:02 PM5/22/19
to jenkinsc...@googlegroups.com

awiddersheim@hotmail.com (JIRA)

unread,
May 23, 2019, 11:51:01 AM5/23/19
to jenkinsc...@googlegroups.com

Liam Newman Thanks for coming up with a fix. On paper, it looks good but wont' be able to test for a few days unfortunately. Do you need me to before going forward with release?

bitwiseman@gmail.com (JIRA)

unread,
May 23, 2019, 12:01:03 PM5/23/19
to jenkinsc...@googlegroups.com

Andrew Widdersheim
Not a big deal. I will manually smoke test this. It is just nice to additional feedback.

Reply all
Reply to author
Forward
0 new messages