Project

General

Profile

Actions

Bug #25203

closed

The pending nodes API now returns array of arrays of nodes instead of an array of nodes

Added by Félix DALLIDET 5 months ago. Updated 3 months ago.

Status:
Released
Priority:
N/A
Category:
API
Target version:
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" 
    }
  ]
}


Related issues 1 (1 open0 closed)

Related to Rudder - Bug #25285: API documentation for pending nodes is missing an endpoint and fieldsPending releaseElaad FURREEDANActions
Actions #1

Updated by Félix DALLIDET 5 months ago

  • Regression changed from No to Yes

It looks like the issue is present in every API version in 8.2.

Actions #2

Updated by Elaad FURREEDAN 5 months ago

  • Status changed from New to In progress
  • Assignee set to Elaad FURREEDAN
Actions #3

Updated by Elaad FURREEDAN 5 months ago

  • Status changed from In progress to Pending technical review
  • Assignee changed from Elaad FURREEDAN to François ARMAND
  • Pull Request set to https://github.com/Normation/rudder/pull/5786
Actions #4

Updated by Clark ANDRIANASOLO 5 months ago

  • Status changed from Pending technical review to In progress
  • Assignee changed from François ARMAND to Clark ANDRIANASOLO

I'm taking over this issue!

Actions #5

Updated by Clark ANDRIANASOLO 5 months ago

  • Status changed from In progress to Pending technical review
  • Assignee changed from Clark ANDRIANASOLO to Elaad FURREEDAN
  • Pull Request changed from https://github.com/Normation/rudder/pull/5786 to https://github.com/Normation/rudder/pull/5799
Actions #6

Updated by Clark ANDRIANASOLO 5 months ago

  • Related to Bug #25285: API documentation for pending nodes is missing an endpoint and fields added
Actions #7

Updated by Anonymous 5 months ago

  • Status changed from Pending technical review to Pending release
Actions #8

Updated by Vincent MEMBRÉ 3 months ago

  • Status changed from Pending release to Released

This bug has been fixed in Rudder 8.2.0~beta1 which was released today.

Actions

Also available in: Atom PDF