In the init file when get_nodes() is being called, the resulting list of nodes contains a false
master node name, in my case it was "Built-In Node" as the return call accesses "displayName"
from the returned request call.
I think the issue is related to the change that occured when Jenkins gets updated to a newer version.
(Please correct me if i am wrong)
Workaround (for me, dont know if it works for everyone):
In get_nodes i changed the line:
return [{'name': c["displayName"], 'offline': c["offline"]}
to
return [{'name': c["assignedLabels"][0]["name"] if c["assignedLabels"][0]["name"] == "master" else c["displayName"], 'offline': c["offline"]}
ISSUE TYPE
Jenkinsapi 0.3.11
Jenkins 2.332.4
SUMMARY
In the init file when get_nodes() is being called, the resulting list of nodes contains a false master node name, in my case it was "Built-In Node" as the return call accesses "displayName" from the returned request call.
EXPECTED RESULTS
[{'name': 'master', 'offline': False}, ...]
ACTUAL RESULTS
[{'name': 'Built-In Node', 'offline': False}, ...]
USEFUL INFORMATION
I think the issue is related to the change that occured when Jenkins gets updated to a newer version. (Please correct me if i am wrong)
Workaround (for me, dont know if it works for everyone): In get_nodes i changed the line:
return [{'name': c["displayName"], 'offline': c["offline"]}
toreturn [{'name': c["assignedLabels"][0]["name"] if c["assignedLabels"][0]["name"] == "master" else c["displayName"], 'offline': c["offline"]}