-
Bug
-
Resolution: Unresolved
-
Major
-
Git plugin version: 2.3.5
Jenkins version: 1.599
-
Powered by SuggestiMate
Hi there,
For some reason if the branch value is set as "*/master" it keeps polling and building forever even though it doesn't have any scm polling configuration at all, firstly you need to trigger that job manually once and then that behaviour occurs.
Workaround:
- change branch name as "master"
Already added some screenshots.
I've no idea whether this issue is related to the below ticket:
Cheers
- Failure_History.png
- 65 kB
- Failure.png
- 26 kB
- Workaround.png
- 12 kB
[JENKINS-30296] Infinite loop (pooling changes continuously) when using "*/master" branches to build
That's a surprisingly short polling log. I'm also surprised there is a polling log, since I don't see any indication that you've defined polling in the job definition. Is it defined to poll, and if so, what is the polling frequency (or is it empty)?
There were a number of polling related fixes in git plugin 2.4.0 and git client plugin 1.18.0 (and in the version of the git client which added support for Windows git 2.5.0, 1.1.9.0). Have you tried those more recent plugin versions?
I attempted to duplicate the problem using one of my authenticated private repos on GitHub with git plugin 2.4.0 and am unable to do so.
Actually I didn't mention, It used to be "h 5/* * * * *" but I was forced to delete that configuration, and even though I ran that job manually without any polling it used to keep polling. And also creating a new jenkins job without polling and running manually once it kept polling and building continuously
I'll double check whether I can reproduce that issue within a docker container, and send you those details later on
I'm not sure what's going on, I've upgraded it to the latest version and still same issue. I strongly believe it might be related to some weird configuration somehow in my private git server. You probably can close this ticket now and I'll reopen/update it if I find the cause.
I am affected by this exact problem with Jenkins ver. 1.651.1 and Git plugin 2.4.2
vincentf can you describe the steps you take to see this problem?
The use case described in the bug report is so common that I would expect hundreds of users to report that problem if it existed in a general configuration. I have many, many jobs which use the "*/master" branch spec, and none of them run continuously or build continuously.
There are a lot of cases when such problem may appear https://issues.jenkins-ci.org/browse/JENKINS-30345
https://issues.jenkins-ci.org/browse/JENKINS-29714
And PR that solved at least for me in production logic missbehaviour https://github.com/jenkinsci/git-plugin/pull/352
markewaite honestly I don't understand what happened.
one of my 200+ project started to misbehave like in OP description.
I removed the */ in */$branch (which I need for mvn releases) then it stopped. I waited a couple of polling cycle. I putted the */ in $branch and it continued to work properly without continuously rebuilding.
here is my job config
<?xml version='1.0' encoding='UTF-8'?> <maven2-moduleset plugin="maven-plugin@2.7.1"> <actions/> <description>Transactional-api</description> <keepDependencies>false</keepDependencies> <properties> <jenkins.plugins.maveninfo.config.MavenInfoJobConfig plugin="maven-info@0.2.0"> <mainModulePattern></mainModulePattern> <dependenciesPattern></dependenciesPattern> <assignName>false</assignName> <nameTemplate></nameTemplate> <assignDescription>false</assignDescription> <descriptionTemplate></descriptionTemplate> </jenkins.plugins.maveninfo.config.MavenInfoJobConfig> <jenkins.model.BuildDiscarderProperty> <strategy class="hudson.tasks.LogRotator"> <daysToKeep>-1</daysToKeep> <numToKeep>10</numToKeep> <artifactDaysToKeep>-1</artifactDaysToKeep> <artifactNumToKeep>-1</artifactNumToKeep> </strategy> </jenkins.model.BuildDiscarderProperty> <jenkins.plugins.slack.SlackNotifier_-SlackJobProperty plugin="slack@1.8"> <teamDomain>ticketmaster</teamDomain> <token>xuTFXjqUjVqmr57Nf68hweIo</token> <room>#microflex-dev-api-scm</room> <startNotification>false</startNotification> <notifySuccess>false</notifySuccess> <notifyAborted>false</notifyAborted> <notifyNotBuilt>true</notifyNotBuilt> <notifyUnstable>false</notifyUnstable> <notifyFailure>true</notifyFailure> <notifyBackToNormal>false</notifyBackToNormal> <notifyRepeatedFailure>true</notifyRepeatedFailure> <includeTestSummary>false</includeTestSummary> <showCommitList>true</showCommitList> <includeCustomMessage>false</includeCustomMessage> <customMessage></customMessage> </jenkins.plugins.slack.SlackNotifier_-SlackJobProperty> <hudson.model.ParametersDefinitionProperty> <parameterDefinitions> <hudson.model.ChoiceParameterDefinition> <name>PUBLISH_TYPE</name> <description></description> <choices class="java.util.Arrays$ArrayList"> <a class="string-array"> <string>development</string> <string>maintenance</string> </a> </choices> </hudson.model.ChoiceParameterDefinition> <hudson.model.BooleanParameterDefinition> <name>SKIPIT</name> <description>Skip integration tests.</description> <defaultValue>false</defaultValue> </hudson.model.BooleanParameterDefinition> <hudson.model.BooleanParameterDefinition> <name>SKIPUT</name> <description>Skip unit tests.</description> <defaultValue>false</defaultValue> </hudson.model.BooleanParameterDefinition> <hudson.model.BooleanParameterDefinition> <name>SKIPTESTS</name> <description>Skip all tests.</description> <defaultValue>false</defaultValue> </hudson.model.BooleanParameterDefinition> <hudson.model.StringParameterDefinition> <name>BRANCH_NAME</name> <description></description> <defaultValue>master</defaultValue> </hudson.model.StringParameterDefinition> </parameterDefinitions> </hudson.model.ParametersDefinitionProperty> </properties> <scm class="hudson.plugins.git.GitSCM" plugin="git@2.4.4"> <configVersion>2</configVersion> <userRemoteConfigs> <hudson.plugins.git.UserRemoteConfig> <url>git@git:xyz.git</url> <credentialsId>62f224b6-a771-4e10-bba2-6ff557e441a0</credentialsId> </hudson.plugins.git.UserRemoteConfig> </userRemoteConfigs> <branches> <hudson.plugins.git.BranchSpec> <name>${BRANCH_NAME}</name> </hudson.plugins.git.BranchSpec> </branches> <doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations> <browser class="hudson.plugins.git.browser.GitLab"> <url>https://git/xyz</url> <version>7.0</version> </browser> <submoduleCfg class="list"/> <extensions> <hudson.plugins.git.extensions.impl.LocalBranch> <localBranch>*/${BRANCH_NAME}</localBranch> </hudson.plugins.git.extensions.impl.LocalBranch> </extensions> </scm> <canRoam>true</canRoam> <disabled>false</disabled> <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding> <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding> <jdk>JAVA_1-8</jdk> <triggers> <hudson.triggers.SCMTrigger> <spec>H/5 * * * *</spec> <ignorePostCommitHooks>true</ignorePostCommitHooks> </hudson.triggers.SCMTrigger> </triggers> <concurrentBuild>false</concurrentBuild> <rootModule> <groupId>mfx.services</groupId> <artifactId>transactional-api-parent</artifactId> </rootModule> <goals>-Dtm.config.path= ${MAVEN_GIT_ALTCREDENTIALS} ${MAVEN_DEFAULT_PROFILES} ${MAVEN_BUILD_TARGETS} ${MAVEN_TEST_OPTS}</goals> <mavenOpts>-ea -XX:-UseSplitVerifier -XX:MaxPermSize=300m -Dfile.encoding=UTF-8 -Duser.timezone=GMT</mavenOpts> <aggregatorStyleBuild>true</aggregatorStyleBuild> <incrementalBuild>false</incrementalBuild> <ignoreUpstremChanges>false</ignoreUpstremChanges> <archivingDisabled>false</archivingDisabled> <siteArchivingDisabled>false</siteArchivingDisabled> <fingerprintingDisabled>false</fingerprintingDisabled> <resolveDependencies>false</resolveDependencies> <processPlugins>false</processPlugins> <mavenValidationLevel>-1</mavenValidationLevel> <runHeadless>false</runHeadless> <settingConfigId></settingConfigId> <globalSettingConfigId></globalSettingConfigId> <disableTriggerDownstreamProjects>false</disableTriggerDownstreamProjects> <blockTriggerWhenBuilding>true</blockTriggerWhenBuilding> <settings class="jenkins.mvn.DefaultSettingsProvider"/> <globalSettings class="jenkins.mvn.DefaultGlobalSettingsProvider"/> <reporters/> <publishers> <hudson.plugins.warnings.WarningsPublisher plugin="warnings@4.35"> <healthy></healthy> <unHealthy></unHealthy> <thresholdLimit>low</thresholdLimit> <pluginName>[WARNINGS] </pluginName> <defaultEncoding></defaultEncoding> <canRunOnFailed>false</canRunOnFailed> <useStableBuildAsReference>false</useStableBuildAsReference> <useDeltaValues>false</useDeltaValues> <thresholds plugin="analysis-core@1.54"> <unstableTotalAll></unstableTotalAll> <unstableTotalHigh></unstableTotalHigh> <unstableTotalNormal></unstableTotalNormal> <unstableTotalLow></unstableTotalLow> <failedTotalAll></failedTotalAll> <failedTotalHigh></failedTotalHigh> <failedTotalNormal></failedTotalNormal> <failedTotalLow></failedTotalLow> </thresholds> <shouldDetectModules>false</shouldDetectModules> <dontComputeNew>true</dontComputeNew> <doNotResolveRelativePaths>true</doNotResolveRelativePaths> <parserConfigurations/> <consoleParsers> <hudson.plugins.warnings.ConsoleParser> <parserName>Java Compiler (javac)</parserName> </hudson.plugins.warnings.ConsoleParser> </consoleParsers> </hudson.plugins.warnings.WarningsPublisher> <hudson.maven.RedeployPublisher> <id>mfx.repo.dist.snapshot</id> <uniqueVersion>true</uniqueVersion> <evenIfUnstable>true</evenIfUnstable> <releaseEnvVar>IS_M2RELEASEBUILD</releaseEnvVar> </hudson.maven.RedeployPublisher> <hudson.plugins.postbuildtask.PostbuildTask plugin="postbuild-task@1.8"> <tasks> <hudson.plugins.postbuildtask.TaskProperties> <logTexts> <hudson.plugins.postbuildtask.LogProperties> <logText>tar</logText> <operator>AND</operator> </hudson.plugins.postbuildtask.LogProperties> </logTexts> <EscalateStatus>false</EscalateStatus> <RunIfJobSuccessful>false</RunIfJobSuccessful> <script>/usr/bin/python27 /bld/shared/scm/scripts/package-sha-mapping.py</script> </hudson.plugins.postbuildtask.TaskProperties> </tasks> </hudson.plugins.postbuildtask.PostbuildTask> <hudson.tasks.Mailer plugin="mailer@1.16"> <recipients>MicroflexAPIDevelopmentTeam@LiveNation.com</recipients> <dontNotifyEveryUnstableBuild>false</dontNotifyEveryUnstableBuild> <sendToIndividuals>true</sendToIndividuals> </hudson.tasks.Mailer> <jenkins.plugins.slack.SlackNotifier plugin="slack@1.8"> <teamDomain>ticketmaster</teamDomain> <authToken>NBWPd5TSYGtD0pNOKdDkNToF</authToken> <buildServerUrl>/</buildServerUrl> <room>#mfxe</room> </jenkins.plugins.slack.SlackNotifier> </publishers> <buildWrappers> <hudson.plugins.ws__cleanup.PreBuildCleanup plugin="ws-cleanup@0.25"> <deleteDirs>false</deleteDirs> <cleanupParameter></cleanupParameter> <externalDelete></externalDelete> </hudson.plugins.ws__cleanup.PreBuildCleanup> <org.jvnet.hudson.plugins.m2release.M2ReleaseBuildWrapper plugin="m2release@0.12.0"> <scmUserEnvVar></scmUserEnvVar> <scmPasswordEnvVar></scmPasswordEnvVar> <releaseEnvVar>IS_M2RELEASEBUILD</releaseEnvVar> <releaseGoals>-Dtm.config.path= ${MAVEN_GIT_ALTCREDENTIALS} ${MAVEN_DEFAULT_PROFILES} ${MAVEN_RELEASE_TARGETS} ${MAVEN_TEST_OPTS}</releaseGoals> <dryRunGoals>${MAVEN_DEFAULT_PROFILES} ${MAVEN_RELEASE_DRYRUN_TARGETS} ${MAVEN_TEST_OPTS}</dryRunGoals> <selectCustomScmCommentPrefix>false</selectCustomScmCommentPrefix> <selectAppendHudsonUsername>false</selectAppendHudsonUsername> <selectScmCredentials>false</selectScmCredentials> <numberOfReleaseBuildsToKeep>0</numberOfReleaseBuildsToKeep> </org.jvnet.hudson.plugins.m2release.M2ReleaseBuildWrapper> </buildWrappers> <prebuilders> <hudson.tasks.Shell> <command>${SCM_SCRIPT_DIR}/m2-pre-build.sh ${EXECUTOR_NUMBER}</command> </hudson.tasks.Shell> <hudson.tasks.Shell> <command>ssh -A xyz@mgr1 'copy-maps-from-dataset.sh de'</command> </hudson.tasks.Shell> </prebuilders> <postbuilders/> <runPostStepsIfResult> <name>FAILURE</name> <ordinal>2</ordinal> <color>RED</color> <completeBuild>true</completeBuild> </runPostStepsIfResult> </maven2-moduleset>
Having this same continuously building issue. We are using origin/master. I believe it has something to do with the @Library usage. 2 scenarios:
1) Pipeline being continuously triggered on every polling window. I edited the pipeline being run to remove the import of the library, and do nothing except print what stage it was in. Continuous looping stopped at that point. When I deleted the dummy build, the continuous building started again.
2) Pipeline being continuously triggered on every polling window. I deleted from origin all branches (except master), and closed all open PR's on the Global library repo. Continuous looping stopped.
We have tried all of the options in the configured Global Pipeline Library being used as well as all the options within the Pipeline script from SCM cloning options.
Jenkins - 2.107.3
Git plugin - 3.9.1
Pipeline SCM step plugin - 2.6
Can confirm this bug.
Some more detail:
We had a string parameter named BRANCH with '/feature/' (without the quotes, at least that's what is visible in the GUI) and the GIT branch specifier configured to use this variable: ${BRANCH}.
Some developer created the branch "feature/feature/foobar".
The bug only got triggered as long as the branch with the duplicate "feature" was present.
We did lots of tests with different variations of wildcards but the problem mainly got solved when we
- removed the string parameter
- and used this wildcard directly in branch spec: origin/feature/**
(Unfortunately, I cannot spend more time on testing this but my gut feeling tells me: string params with wildcards would be the next thing to investigate)
Polling Log View as plain text This page captures the polling log that triggered this build.
I've found that behaviour when using "*/master"
Cheers