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

Items with non-AbstractProjects tasks block the build queue

      When an item which doesn't have an AbstractProject task stay on the queue blocks the build queue. This happens specifically with CloudBees proprietary plugin
      long-running-builds. However, it is in my opinion a bug.

      It might be perfect not to use Abstractproject and better use Job instead so Workflow plugin is integrated. I might work on this, but for the moment my intention is just to fix this bug more than integrate with Workflow.

      2015-08-08 13:50:48.211+0200 [id=62]    SEVERE  hudson.triggers.SafeTimerTask#run: Timer task hudson.model.Queue$MaintainTask@423e2af8 failed
      java.lang.ClassCastException: com.cloudbees.jenkins.plugins.longrunning.BackgroundTask cannot be cast to hudson.model.AbstractProject
          at hudson.plugins.buildblocker.BuildBlockerQueueTaskDispatcher.getBuildBlockerProperty(BuildBlockerQueueTaskDispatcher.java:199)
          at hudson.plugins.buildblocker.BuildBlockerQueueTaskDispatcher.canTake(BuildBlockerQueueTaskDispatcher.java:108)
          at hudson.model.Queue$JobOffer.canTake(Queue.java:281)
          at hudson.model.Queue.maintain(Queue.java:1049)
          at hudson.model.Queue$MaintainTask.doRun(Queue.java:2033)
          at hudson.triggers.SafeTimerTask.run(SafeTimerTask.java:54)
          at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
          at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:304)
          at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178)
          at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
          at java.lang.Thread.run(Thread.java:745)
      

          [JENKINS-29924] Items with non-AbstractProjects tasks block the build queue

          Code changed in jenkins
          User: Frederik Fromm
          Path:
          src/main/java/hudson/plugins/buildblocker/BuildBlockerQueueTaskDispatcher.java
          http://jenkins-ci.org/commit/build-blocker-plugin/4736acca0f441238d1c634218463452cb5d7a65c
          Log:
          Merge pull request #7 from fbelzunc/long-running-builds

          [FIXED JENKINS-29924] Items with non-AbstractProjects tasks block the build queue

          Compare: https://github.com/jenkinsci/build-blocker-plugin/compare/042930e2b7b9...4736acca0f44

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Frederik Fromm Path: src/main/java/hudson/plugins/buildblocker/BuildBlockerQueueTaskDispatcher.java http://jenkins-ci.org/commit/build-blocker-plugin/4736acca0f441238d1c634218463452cb5d7a65c Log: Merge pull request #7 from fbelzunc/long-running-builds [FIXED JENKINS-29924] Items with non-AbstractProjects tasks block the build queue Compare: https://github.com/jenkinsci/build-blocker-plugin/compare/042930e2b7b9...4736acca0f44

          When will 1.7.2 be released? Is there something else missing? I'm currently testing the snapshot and everything works as expected so far.

          Christoph Vogtländer added a comment - When will 1.7.2 be released? Is there something else missing? I'm currently testing the snapshot and everything works as expected so far.

          ffromm Could you cut a new release of the plugin? Thanks

          Yoann Dubreuil added a comment - ffromm Could you cut a new release of the plugin? Thanks

          released 1.7.2

          sorry for the delay

          Frederik Fromm added a comment - released 1.7.2 sorry for the delay

          No worries! Thank you for releasing, 1.7.2 is now in the update center

          Yoann Dubreuil added a comment - No worries! Thank you for releasing, 1.7.2 is now in the update center

          Jesse Glick added a comment -

          Still broken, updated fix under review.

          Jesse Glick added a comment - Still broken, updated fix under review.

          Code changed in jenkins
          User: Frederik Fromm
          Path:
          pom.xml
          src/main/java/hudson/plugins/buildblocker/BlockingJobsMonitor.java
          src/main/java/hudson/plugins/buildblocker/BuildBlockerQueueTaskDispatcher.java
          src/test/java/hudson/plugins/buildblocker/BlockingJobsMonitorTest.java
          http://jenkins-ci.org/commit/build-blocker-plugin/d377787f1d09518c8e6feabb49eba4b86802dabb
          Log:
          Merge pull request #8 from fbelzunc/workflow-compatilble

          [FIXED JENKINS-29924] Transform AbstractProject into Job for Workflow compatibility

          Compare: https://github.com/jenkinsci/build-blocker-plugin/compare/f6f4954d0e8e...d377787f1d09

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Frederik Fromm Path: pom.xml src/main/java/hudson/plugins/buildblocker/BlockingJobsMonitor.java src/main/java/hudson/plugins/buildblocker/BuildBlockerQueueTaskDispatcher.java src/test/java/hudson/plugins/buildblocker/BlockingJobsMonitorTest.java http://jenkins-ci.org/commit/build-blocker-plugin/d377787f1d09518c8e6feabb49eba4b86802dabb Log: Merge pull request #8 from fbelzunc/workflow-compatilble [FIXED JENKINS-29924] Transform AbstractProject into Job for Workflow compatibility Compare: https://github.com/jenkinsci/build-blocker-plugin/compare/f6f4954d0e8e...d377787f1d09

          ffromm Thanks for launching a new release!

          Félix Belzunce Arcos added a comment - ffromm Thanks for launching a new release!

            fbelzunc Félix Belzunce Arcos
            fbelzunc Félix Belzunce Arcos
            Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved: