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

Build prioritizing plugin gets Jenkins queue stuck even with available executors

XMLWordPrintable

      I have created a custom .hpi Jenkins plugin to prioritize (move to the front of the queue) some jobs that arrive in the queue. The logic is very simple and can be found in CustomSorter.java

      In the plugin I am basically just overriding the default sortBuildableItems() method in QueueSorter class and load it at Jenkins initialization.

      After uploading the plugin everything works as expected (builds that meet specific criteria are pushed to the front of the queue) for usually 10-12 hours but then the build queue gets stuck and no jobs are executed even though all executors are free / available.

       

      Later edit:

      In the Attachments Section you can find the main classes used, the .hpi packaged form and a full log file with a thread dump generated at the end of the logs file.

       

        1. build-queue-prioritizer.hpi
          1.17 MB
        2. CustomSorter.java
          5 kB
        3. CustomLogger.java
          2 kB
        4. PrioritySorterPlugin.java
          2 kB
        5. QueueListener.java
          1 kB
        6. logs+threadDump.txt
          2.91 MB

            Unassigned Unassigned
            gcimpoies George Cimpoies
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: