-
New Feature
-
Resolution: Unresolved
-
Minor
-
None
-
git-plugin 2.4.4
Jenkins 1.653
This issue was spun out of JENKINS-33695.
Consider the following snippet from a job config.xml:
<scm class="hudson.plugins.git.GitSCM" plugin="git@2.4.4"> <configVersion>2</configVersion> <userRemoteConfigs> <hudson.plugins.git.UserRemoteConfig> <name>gitlab</name> <url>[URL]</url> <credentialsId>[CREDENTIAL]</credentialsId> </hudson.plugins.git.UserRemoteConfig> </userRemoteConfigs> <branches> <hudson.plugins.git.BranchSpec> <name>**/master</name> </hudson.plugins.git.BranchSpec> <hudson.plugins.git.BranchSpec> <name>**/bleeding</name> </hudson.plugins.git.BranchSpec> </branches> <doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations> <submoduleCfg class="list"/> <extensions> <hudson.plugins.git.extensions.impl.BuildChooserSetting> <buildChooser class="hudson.plugins.git.util.AncestryBuildChooser"> <maximumAgeInDays>14</maximumAgeInDays> <ancestorCommitSha1/> </buildChooser> </hudson.plugins.git.extensions.impl.BuildChooserSetting> <hudson.plugins.git.extensions.impl.BuildChooserSetting> <buildChooser class="hudson.plugins.git.util.InverseBuildChooser"/> </hudson.plugins.git.extensions.impl.BuildChooserSetting> </extensions> </scm>
According to this snippet, there should be two criteria for selecting a commit to build - it should both be less than 14 days old, and it should not be the master or bleeding branch (i.e. the chosen commit would be in the intersection of all BuildChooser selections).
Currently, this is not the case, and the plugin will select any commit less than 14 days old for building.
The breaking change seems to have been introduced in 2.4.1; 2.4.0 still produces the expected behavior.
zmeggyesi I have started work to better understand the current behavior, in hopes of using that understanding to then compare it to past behavior so that I can find the commit which changed the behavior. Could you refer to my notes and see if they match your observations of the current behavior?
I haven't yet done the same depth of experiments with git plugin 2.4.0, but my first experiment with git plugin 2.4.0 seemed to show the same behavior as git plugin 2.4.4.
The job definitions I used for my experiments are recorded in that repository as well, in case you want to duplicate my tests, or try those same job definitions on different versions of the git plugin.
As far as I can tell from reading the descriptions of the changes, there are no direct changes of the build chooser implementations since just before the release of git plugin 2.3.5. Is it possible that you were using multiple build chooser selections well before the release of git plugin 2.4.0?