-
Bug
-
Resolution: Unresolved
-
Major
-
None
Configuration Slicer page -> "Tied Label Slicer".
I move some of my jenkins jobs to a new row and set "master" value on the left.
I expect these jobs to get this "restricted to run on master" setting.
actual:
when I open individual configuration screen for those jobs, they still have "restrict where it can be run" checkbox selected,
but the label value is empty. there is NO "master" text in it.
if I go back to Configuration Slicer page -> Tied Label Slicer, I can see those jobs in a separate row with "master" value on the left, which is good.
but it is simply not shown on individual Job Config pages (when you click "Configure" for a particular job in Jenkins UI).
note: setting labels other than "master" seems to work fine in my environment.
also, I have 0 executors available on the "master", which may or may not be relevant to this. I think it's not, but decided to share just in case.
maybe "master" is considered to be a "default" label and not always shown in some UI pages... but that's weird because I can open "Configure Job" page and type "master" value as the node restriction and it stays there...
- links to
I've been looking at the code, comparing the configuration of a freestyle project manually, and via the label slicer. I think this is a bug in Jenkins, since using the configuration screen sets the 'assignedNode' private field directly based on what was typed in the HTML form. In this case the 'master' string goes directly into the field.
But any other plugin that wants to modify the 'assignedNode' field needs to call 'setAssignedNode', and that function does extra checking. If you set the assigned node to "master" it switches that to 'null'. There are other comments indicating that 'null' is the preferred representation for the master node, but the AbstractProject configuration code doesn't maintain that invariant.