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.
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))
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.
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?
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
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.
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.
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?