Issue Type: Bug Bug
Assignee: Jesse Glick
Components: prioritysorter
Created: 09/Jan/14 3:50 PM
Description:

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.

Environment: 2.4, 1.532.1
Project: Jenkins
Priority: Major Major
Reporter: Jesse Glick
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

--
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to