Correction of queue and excutor filtering in view#394
Conversation
|
Thanks for the change. However, I think it is better to fix this in a polymorphic fashion so that Views don't know too much about various subtypes of AbstractProject. I've implemented such a change in 48fc05d |
|
Great, it is better way. Thanks! |
|
But now I see there is one problem - it does not change executor filtering. You add MatrixProject label by method getAssignedLabel(), but this method always returns null for MatrixProject. This condition "labels.contains(null) && n.getMode() == Mode.NORMAL" is met by each node in normal mode if view contains matrix job. I think that a user does not expect this behaviour. He creates matrix job with configurations and he only wants to know where the configurations can run - this is the behaviour that he expects from filtering executors. |
I change method getQueueItems() in class hudson.model.View, because it does not count on Matrix configurations - the filtered queue does not display configurations of matrix job, which are waiting in a queue.
The filtering of executors (method getComputers()), on which the jobs in view can be build, works for Matrix jobs incorrectly too. I add the labels of configurations and skip the Matrix job, because its build can run on all executors - the filtering would be useless.