Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-21652

Building at each git-client polling interval even when no changes present

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: git-plugin
    • Environment:
      Linux Ubuntu 13.04
      Apache Tomcat/7.0.35
      Jenkins 1.549
      git-client plugin 1.6.2
      GitLab 6.1.0

      Gitlab is running on the same linux server under a different sub-domain & different linux user name.
    • Similar Issues:

      Description

      When I upgraded the git-client plugin from 1.6.1 to 1.6.2, a project now builds every time it polls the SCM (a GitLab repo) even if the version hash is identical.

      Some jobs indicate that there is a problem and "could not remove the credential section from the git configuration" (see below polling log sample). But even these jobs build on every SCM poll even when the git version has has not changed. Below, I have 8 builds in a row that all reference the same revision, and all say "changes found."

      ======================
      Started on Feb 4, 2014 5:53:33 PM
      Using strategy: Default
      [poll] Last Built Revision: Revision 1c8eda4fa98b092973c7dfe3b3c1d6c859971922 (origin/MASTER)
      using .gitcredentials to set credentials
      Could not remove the credential section from the git configuration
      Done. Took 0.52 sec
      Changes found

        Attachments

          Activity

          Hide
          wsaxon Will Saxon added a comment - - edited

          No problem, I just downgraded. Same behavior, although I triggered the poll using the Poll SCM Plugin's 'Poll Now' button.

          I've included the relevant SCM and polling config below; most of our jobs use parameters and env-inject to set some generic stuff.

          Our goal is to have pre-merge builds using the Gerrit trigger, and then QA builds on a timer only if code changes or the build is triggered by upstream. We could just use the Gerrit trigger for post-merge, but that ends up producing too many builds.

           <scm class="hudson.plugins.git.GitSCM" plugin="git@2.3.4">
              <configVersion>2</configVersion>
              <userRemoteConfigs>
                <hudson.plugins.git.UserRemoteConfig>
                  <url>ssh://svc_jenkins_cm@${GERRIT}/${MASTER_REPO}</url>
                  <credentialsId>9f9b349f-f711-46dc-98a6-dfc8e645abb8</credentialsId>
                </hudson.plugins.git.UserRemoteConfig>
              </userRemoteConfigs>
              <branches>
                <hudson.plugins.git.BranchSpec>
                  <name>origin/${BRANCH}</name>
                </hudson.plugins.git.BranchSpec>
              </branches>
              <doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations>
              <browser class="hudson.plugins.git.browser.CGit">
                <url>http://${GERRIT}/git/${MASTER_REPO}</url>
              </browser>
              <submoduleCfg class="list"/>
              <extensions>
                <hudson.plugins.git.extensions.impl.CloneOption>
                  <shallow>false</shallow>
                  <reference>${REFERENCE_PATH}\${MASTER_REPO}.git</reference>
                </hudson.plugins.git.extensions.impl.CloneOption>
                <hudson.plugins.git.extensions.impl.RelativeTargetDirectory>
                  <relativeTargetDir>${MASTER_REPO}</relativeTargetDir>
                </hudson.plugins.git.extensions.impl.RelativeTargetDirectory>
                <hudson.plugins.git.extensions.impl.SparseCheckoutPaths>
                  <sparseCheckoutPaths>
                    <hudson.plugins.git.extensions.impl.SparseCheckoutPath>
                      <path>/CM/Common</path>
                    </hudson.plugins.git.extensions.impl.SparseCheckoutPath>
                    <hudson.plugins.git.extensions.impl.SparseCheckoutPath>
                      <path>/CM/build_name</path>
                    </hudson.plugins.git.extensions.impl.SparseCheckoutPath>
                    <hudson.plugins.git.extensions.impl.SparseCheckoutPath>
                      <path>/DotNet/Common</path>
                    </hudson.plugins.git.extensions.impl.SparseCheckoutPath>
                    <hudson.plugins.git.extensions.impl.SparseCheckoutPath>
                      <path>/DotNet/One</path>
                    </hudson.plugins.git.extensions.impl.SparseCheckoutPath>
                    <hudson.plugins.git.extensions.impl.SparseCheckoutPath>
                      <path>/DotNet/Two</path>
                    </hudson.plugins.git.extensions.impl.SparseCheckoutPath>
                    <hudson.plugins.git.extensions.impl.SparseCheckoutPath>
                      <path>/DotNet/StrongNameKey.snk</path>
                    </hudson.plugins.git.extensions.impl.SparseCheckoutPath>
                  </sparseCheckoutPaths>
                </hudson.plugins.git.extensions.impl.SparseCheckoutPaths>
                <hudson.plugins.git.extensions.impl.CleanBeforeCheckout/>
                <hudson.plugins.git.extensions.impl.PathRestriction>
                  <includedRegions>^CM/build_name/.*
          ^DotNet/Common/.*
          ^DotNet/One/.*
          ^DotNet/Two/.*
          ^DotNet/StrongNameKey.snk</includedRegions>
                  <excludedRegions></excludedRegions>
                </hudson.plugins.git.extensions.impl.PathRestriction>
                <hudson.plugins.git.extensions.impl.DisableRemotePoll/>
              </extensions>
            </scm>
            <triggers>
              <hudson.triggers.SCMTrigger>
                <spec>H 7-21/1 * * *</spec>
                <ignorePostCommitHooks>false</ignorePostCommitHooks>
              </hudson.triggers.SCMTrigger>
            </triggers>
          
          Show
          wsaxon Will Saxon added a comment - - edited No problem, I just downgraded. Same behavior, although I triggered the poll using the Poll SCM Plugin's 'Poll Now' button. I've included the relevant SCM and polling config below; most of our jobs use parameters and env-inject to set some generic stuff. Our goal is to have pre-merge builds using the Gerrit trigger, and then QA builds on a timer only if code changes or the build is triggered by upstream. We could just use the Gerrit trigger for post-merge, but that ends up producing too many builds. <scm class= "hudson.plugins.git.GitSCM" plugin= "git@2.3.4" > <configVersion> 2 </configVersion> <userRemoteConfigs> <hudson.plugins.git.UserRemoteConfig> <url> ssh://svc_jenkins_cm@${GERRIT}/${MASTER_REPO} </url> <credentialsId> 9f9b349f-f711-46dc-98a6-dfc8e645abb8 </credentialsId> </hudson.plugins.git.UserRemoteConfig> </userRemoteConfigs> <branches> <hudson.plugins.git.BranchSpec> <name> origin/${BRANCH} </name> </hudson.plugins.git.BranchSpec> </branches> <doGenerateSubmoduleConfigurations> false </doGenerateSubmoduleConfigurations> <browser class= "hudson.plugins.git.browser.CGit" > <url> http://${GERRIT}/git/${MASTER_REPO} </url> </browser> <submoduleCfg class= "list" /> <extensions> <hudson.plugins.git.extensions.impl.CloneOption> <shallow> false </shallow> <reference> ${REFERENCE_PATH}\${MASTER_REPO}.git </reference> </hudson.plugins.git.extensions.impl.CloneOption> <hudson.plugins.git.extensions.impl.RelativeTargetDirectory> <relativeTargetDir> ${MASTER_REPO} </relativeTargetDir> </hudson.plugins.git.extensions.impl.RelativeTargetDirectory> <hudson.plugins.git.extensions.impl.SparseCheckoutPaths> <sparseCheckoutPaths> <hudson.plugins.git.extensions.impl.SparseCheckoutPath> <path> /CM/Common </path> </hudson.plugins.git.extensions.impl.SparseCheckoutPath> <hudson.plugins.git.extensions.impl.SparseCheckoutPath> <path> /CM/build_name </path> </hudson.plugins.git.extensions.impl.SparseCheckoutPath> <hudson.plugins.git.extensions.impl.SparseCheckoutPath> <path> /DotNet/Common </path> </hudson.plugins.git.extensions.impl.SparseCheckoutPath> <hudson.plugins.git.extensions.impl.SparseCheckoutPath> <path> /DotNet/One </path> </hudson.plugins.git.extensions.impl.SparseCheckoutPath> <hudson.plugins.git.extensions.impl.SparseCheckoutPath> <path> /DotNet/Two </path> </hudson.plugins.git.extensions.impl.SparseCheckoutPath> <hudson.plugins.git.extensions.impl.SparseCheckoutPath> <path> /DotNet/StrongNameKey.snk </path> </hudson.plugins.git.extensions.impl.SparseCheckoutPath> </sparseCheckoutPaths> </hudson.plugins.git.extensions.impl.SparseCheckoutPaths> <hudson.plugins.git.extensions.impl.CleanBeforeCheckout/> <hudson.plugins.git.extensions.impl.PathRestriction> <includedRegions> ^CM/build_name/.* ^DotNet/Common/.* ^DotNet/One/.* ^DotNet/Two/.* ^DotNet/StrongNameKey.snk </includedRegions> <excludedRegions> </excludedRegions> </hudson.plugins.git.extensions.impl.PathRestriction> <hudson.plugins.git.extensions.impl.DisableRemotePoll/> </extensions> </scm> <triggers> <hudson.triggers.SCMTrigger> <spec> H 7-21/1 * * * </spec> <ignorePostCommitHooks> false </ignorePostCommitHooks> </hudson.triggers.SCMTrigger> </triggers>
          Hide
          markewaite Mark Waite added a comment -

          Since it is the same behavior whether you downgrade or not, then it is probably not an instance of the bug I've been trying to isolate. The bug I'm trying to isolate first appeared in the transition from 2.3.4 to 2.3.5. You may need to debug the plugin to identify why it is building continually.

          If you can't do that, it would be a great help if you can provide a repeatable set of steps so that I can construct a job which has the same behavior, without requiring that I install and configure a Gerrit server. I can't promise to investigate it (plugin maintenance is done on my personal time), but I'm much more motivated to help when a bug is submitted with detailed steps which can reconstruct the failure case.

          Show
          markewaite Mark Waite added a comment - Since it is the same behavior whether you downgrade or not, then it is probably not an instance of the bug I've been trying to isolate. The bug I'm trying to isolate first appeared in the transition from 2.3.4 to 2.3.5. You may need to debug the plugin to identify why it is building continually. If you can't do that, it would be a great help if you can provide a repeatable set of steps so that I can construct a job which has the same behavior, without requiring that I install and configure a Gerrit server. I can't promise to investigate it (plugin maintenance is done on my personal time), but I'm much more motivated to help when a bug is submitted with detailed steps which can reconstruct the failure case.
          Hide
          wsaxon Will Saxon added a comment -

          I can try to debug it myself. If I run into problems w/ that I will try to replicate with a test repo on github and post steps here.

          Show
          wsaxon Will Saxon added a comment - I can try to debug it myself. If I run into problems w/ that I will try to replicate with a test repo on github and post steps here.
          Hide
          markewaite Mark Waite added a comment -

          The bug that appeared in the transition from 2.3.4 to 2.3.5 is now resolved in git plugin 2.4.0 (which requires git client plugin 1.18.0). You may want to try 2.4.0 (with 1.18.0) to see if your problem is resolved as a side effect of the fixes in 2.4.0.

          Show
          markewaite Mark Waite added a comment - The bug that appeared in the transition from 2.3.4 to 2.3.5 is now resolved in git plugin 2.4.0 (which requires git client plugin 1.18.0). You may want to try 2.4.0 (with 1.18.0) to see if your problem is resolved as a side effect of the fixes in 2.4.0.
          Hide
          markewaite Mark Waite added a comment -

          Resolved due to no feedback on the "is it fixed in 2.4.0" question in 2 months

          Show
          markewaite Mark Waite added a comment - Resolved due to no feedback on the "is it fixed in 2.4.0" question in 2 months

            People

            • Assignee:
              ndeloof Nicolas De Loof
              Reporter:
              jasonrobinson jason robinson
            • Votes:
              2 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: