Actions
Bug #25203
closedThe pending nodes API now returns array of arrays of nodes instead of an array of nodes
Bug #25203:
The pending nodes API now returns array of arrays of nodes instead of an array of nodes
Pull Request:
Severity:
Major - prevents use of part of Rudder | no simple workaround
UX impact:
User visibility:
Effort required:
Small
Priority:
0
Name check:
To do
Fix check:
To do
Regression:
Yes
Description
See the output:
# ~ curl -k -X POST -H "X-API-Token: *******" -H "Content-Type: application/x-www-form-urlencoded" -d 'status=accepted' 'https://******/rudder/api/latest/nodes/pending/2e139b8f-72c8-49b8-9a35-2c2baffeb47e' | jq ''
{
"action": "ChangePendingNodeStatus",
"id": "2e139b8f-72c8-49b8-9a35-2c2baffeb47e",
"result": "success",
"data": {
"nodes": [
[
{
"id": "2e139b8f-72c8-49b8-9a35-2c2baffeb47e",
"status": "accepted",
"hostname": "DeployDirectiveAgent1.rudder.local",
"osName": "Ubuntu",
"osVersion": "22.04",
"machineType": "Virtual"
}
]
]
}
}
A similar calll (troncated from the first level keys of the response) in 8.1 will return something like this:
{
"nodes": [
{
"id": "9df180c9-0cea-4ccc-ba3b-b1931e433e3c",
"status": "accepted",
"hostname": "DeployDirectiveAgent1.rudder.local",
"osName": "Debian",
"osVersion": "[11]",
"machineType": "Virtual"
}
]
}
Actions