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

Queue broken by CCE from PriorityConfiguration.getPriorityInternal

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • prioritysorter-plugin
    • None
    • 2.4, 1.532.1

      A user of cloudbees-folders-plus (from Jenkins Enterprise) reports that moving a job from folder to Jenkins root is broken with

      java.lang.ClassCastException: com.cloudbees.hudson.plugins.folder.relocate.RelocateTask cannot be cast to hudson.model.Job
      	at jenkins.advancedqueue.PriorityConfiguration.getPriorityInternal(PriorityConfiguration.java:207)
      	at jenkins.advancedqueue.PriorityConfiguration.getPriority(PriorityConfiguration.java:199)
      	at jenkins.advancedqueue.sorter.AdvancedQueueSorter.onNewItem(AdvancedQueueSorter.java:111)
      	at jenkins.advancedqueue.sorter.AdvancedQueueSorter.getCalculatedWeight(AdvancedQueueSorter.java:103)
      	at jenkins.advancedqueue.sorter.AdvancedQueueSorter.access$000(AdvancedQueueSorter.java:47)
      	at jenkins.advancedqueue.sorter.AdvancedQueueSorter$2.compare(AdvancedQueueSorter.java:78)
      	at jenkins.advancedqueue.sorter.AdvancedQueueSorter$2.compare(AdvancedQueueSorter.java:76)
      	at java.util.TimSort.countRunAndMakeAscending(Unknown Source)
      	at java.util.TimSort.sort(Unknown Source)
      	at java.util.TimSort.sort(Unknown Source)
      	at java.util.Arrays.sort(Unknown Source)
      	at java.util.Collections.sort(Unknown Source)
      	at jenkins.advancedqueue.sorter.AdvancedQueueSorter.sortBuildableItems(AdvancedQueueSorter.java:76)
      	at hudson.model.Queue.maintain(Queue.java:1092)
      	at hudson.model.Queue$MaintainTask.doRun(Queue.java:2084)
      	at hudson.triggers.SafeTimerTask.run(SafeTimerTask.java:54)
      	at java.util.TimerThread.mainLoop(Unknown Source)
      	at java.util.TimerThread.run(Unknown Source)
      

      Probably other special queue tasks would also be broken by this plugin, which assumes without checking that every Task is a Job.

            jglick Jesse Glick
            jglick Jesse Glick
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: