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

Disable polling if build is running

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • clearcase-plugin, core
    • None
    • Windows XP, Hudson 1.395, CC Plugin 1.3.5

    Description

      DUPLICATE: http://issues.hudson-ci.org/browse/HUDSON-8674*

      We enabled minutely SCM polling. If build is running (about 2 hours) we see lots of polling executions (lshistory). This slow down the proccess. It should be possible to disable polling if build is running.

      Attachments

        Activity

          Released in 1.3.8

          vlatombe Vincent Latombe added a comment - Released in 1.3.8
          dogfood dogfood added a comment -

          Integrated in plugins_clearcase #75
          [FIX JENKINS-8682]: check if build is running (Revision d6a013dc0ca1858a8ab2b262159a8154428550f6)

          Result = SUCCESS
          Vincent Latombe :
          Files :

          • src/main/java/hudson/plugins/clearcase/AbstractClearCaseScm.java
          dogfood dogfood added a comment - Integrated in plugins_clearcase #75 [FIX JENKINS-8682] : check if build is running (Revision d6a013dc0ca1858a8ab2b262159a8154428550f6) Result = SUCCESS Vincent Latombe : Files : src/main/java/hudson/plugins/clearcase/AbstractClearCaseScm.java

          Code changed in jenkins
          User: Vincent Latombe
          Path:
          src/main/java/hudson/plugins/clearcase/AbstractClearCaseScm.java
          http://jenkins-ci.org/commit/clearcase-plugin/d6a013dc0ca1858a8ab2b262159a8154428550f6
          Log:
          [FIX JENKINS-8682]: check if build is running

          Based on anb0s's work, do not prevent polling if job can be executed
          concurrently.

          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Vincent Latombe Path: src/main/java/hudson/plugins/clearcase/AbstractClearCaseScm.java http://jenkins-ci.org/commit/clearcase-plugin/d6a013dc0ca1858a8ab2b262159a8154428550f6 Log: [FIX JENKINS-8682] : check if build is running Based on anb0s's work, do not prevent polling if job can be executed concurrently.
          anb0s anb0s added a comment -

          cloned to http://issues.jenkins-ci.org/browse/JENKINS-8950
          and assigned to core...

          anb0s anb0s added a comment - cloned to http://issues.jenkins-ci.org/browse/JENKINS-8950 and assigned to core...
          anb0s anb0s added a comment -

          Added core to components. It would be good to have new option "Disable polling if build is running" in Jenkins.

          anb0s anb0s added a comment - Added core to components. It would be good to have new option "Disable polling if build is running" in Jenkins.
          anb0s anb0s added a comment -

          Ok, i patched it in CC plugin as workaround:

          AbstractClearCaseScm.java
          @Override
          protected PollingResult compareRemoteRevisionWith(AbstractProject<?, ?> project, Launcher launcher, FilePath workspace, TaskListener listener,
                  SCMRevisionState baseline) throws IOException, InterruptedException {
          
          // check if build is running
          if (project.isBuilding()) { 
          	launcher.getListener().getLogger().println("Polling is disabled, because build is running...");
          	return PollingResult.NO_CHANGES;
          }
          
          anb0s anb0s added a comment - Ok, i patched it in CC plugin as workaround: AbstractClearCaseScm.java @Override protected PollingResult compareRemoteRevisionWith(AbstractProject<?, ?> project, Launcher launcher, FilePath workspace, TaskListener listener, SCMRevisionState baseline) throws IOException, InterruptedException { // check if build is running if (project.isBuilding()) { launcher.getListener().getLogger().println( "Polling is disabled, because build is running..." ); return PollingResult.NO_CHANGES; }
          anb0s anb0s added a comment -

          vlatombe added a comment - 03/Feb/11 05:33 AM

          IMO, this should be provided by core.

          anb0s anb0s added a comment - vlatombe added a comment - 03/Feb/11 05:33 AM IMO, this should be provided by core.

          People

            vlatombe Vincent Latombe
            anb0s anb0s
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: