[JIRA] [git-plugin] (JENKINS-21652) Building at each git-client polling interval even when no changes present

1 view
Skip to first unread message

will.saxon@greenwayhealth.com (JIRA)

unread,
Jun 13, 2015, 3:33:03 PM6/13/15
to jenkinsc...@googlegroups.com
Will Saxon commented on Bug JENKINS-21652
 
Re: Building at each git-client polling interval even when no changes present

We're seeing this exact same problem with 1.609.1 and git plugin 2.3.5. We have polling configured on a job to look every 3 hours, and it builds every time even if there are no changes.

We are not using the fast remote polling, because we are trying to use the include/exclude feature to limit triggers to a subset of files in the project.

One thing that may be contributing to this is that the last build revision is listed as refs/remotes/origin/branch instead of refs/heads/branch. It's not clear what command is being used when performing the poll, but git ls-remote -h <url> never returns anything for refs/remotes/origin, only refs/heads.

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265)
Atlassian logo

mark.earl.waite@gmail.com (JIRA)

unread,
Jun 13, 2015, 4:09:02 PM6/13/15
to jenkinsc...@googlegroups.com

Will Saxon I've been seeking a way to repeatably show a "builds on every poll" bug that I had seen while testing the pre-release of git plugin 2.3.6. While seeking repeatable steps for the "builds on every poll" bug that I had seen, I found that for the case I was trying, 2.3.4 was better behaved than 2.3.5.

Would you be willing to try the same sequence of steps with the 2.3.4 git plugin to see if that isolates the problem to specifically the changes between 2.3.4 and 2.3.5?

will.saxon@greenwayhealth.com (JIRA)

unread,
Jun 13, 2015, 4:29:01 PM6/13/15
to jenkinsc...@googlegroups.com

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.

 <scm class="hudson.plugins.git.GitSCM" plugin="g...@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>

will.saxon@greenwayhealth.com (JIRA)

unread,
Jun 13, 2015, 4:31:02 PM6/13/15
to jenkinsc...@googlegroups.com
Will Saxon edited a comment on Bug JENKINS-21652
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.

{code:xml} <scm class="hudson.plugins.git.GitSCM" plugin="g...@2.3.4">
{code}

mark.earl.waite@gmail.com (JIRA)

unread,
Jun 13, 2015, 5:35:03 PM6/13/15
to jenkinsc...@googlegroups.com

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.

will.saxon@greenwayhealth.com (JIRA)

unread,
Jun 13, 2015, 5:51:02 PM6/13/15
to jenkinsc...@googlegroups.com

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.

mark.earl.waite@gmail.com (JIRA)

unread,
Jul 18, 2015, 2:45:01 PM7/18/15
to jenkinsc...@googlegroups.com

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.

mark.earl.waite@gmail.com (JIRA)

unread,
Sep 19, 2015, 8:41:03 AM9/19/15
to jenkinsc...@googlegroups.com
Mark Waite resolved as Fixed
 

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

Jenkins / Bug JENKINS-21652
Change By: Mark Waite
Status: Open Resolved
Resolution: Fixed

mark.earl.waite@gmail.com (JIRA)

unread,
Oct 22, 2019, 9:33:28 PM10/22/19
to jenkinsc...@googlegroups.com
Mark Waite closed an issue as Fixed
Change By: Mark Waite
Status: Resolved Closed
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages