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

CauseOfBlockage from QueueTaskDispatcher.canTake discarded


    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • core

      If you have a QueueTaskDispatcher which returns a CauseOfBlockage from canRun, that becomes BlockedItem.getCauseOfBlockage, which is displayed in the queue widget.

      But if it returns a CauseOfBlockage from canTake (AFAICT the same for Node.canTake), JobOffer.canTake sees that it is non-null, throws out the actual object with all of its diagnostics, and you wind up with a BuildableItem with CauseOfBlockage.BecauseNodeIsBusy which tells you nothing and may be totally misleading.

      By asking an implementation to return a @CheckForNull CauseOfBlockage rather than a simple boolean, the implication is that a non-null return value will be displayed to the user. Currently this is not the case.

      To add insult to injury, Support Core does not report the result of canTake.

            jglick Jesse Glick
            jglick Jesse Glick
            1 Vote for this issue
            4 Start watching this issue