Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(getNode): return single element in get node #788

Merged
merged 1 commit into from
Mar 20, 2024

Conversation

sinhaashish
Copy link
Member

There was a regression issue in which kubectl-mayastor get node node-1-155665 -ojson was returning an array

[
  {
    "id": "node-1-155665",
    "spec": {
      "grpcEndpoint": "135.181.42.41:10124",
      "id": "node-1-155665",
      "node_nqn": "nqn.2019-05.io.openebs:node-name:node-1-155665"
    },
    "state": {
      "grpcEndpoint": "135.181.42.41:10124",
      "id": "node-1-155665",
      "status": "Online",
      "node_nqn": "nqn.2019-05.io.openebs:node-name:node-1-155665"
    }
  }
]

Earlier in 2.5 release it was returning a single element as below:

{
  "id": "node-1-155665",
  "spec": {
    "grpcEndpoint": "135.181.42.41:10124",
    "id": "node-1-155665",
    "node_nqn": "nqn.2019-05.io.openebs:node-name:node-1-155665"
  },
  "state": {
    "grpcEndpoint": "135.181.42.41:10124",
    "id": "node-1-155665",
    "status": "Online",
    "node_nqn": "nqn.2019-05.io.openebs:node-name:node-1-155665"
  }
}

This PR fixes that

Signed-off-by: sinhaashish <ashi.sinha.87@gmail.com>
@sinhaashish
Copy link
Member Author

bors merge

bors-openebs-mayastor bot pushed a commit that referenced this pull request Mar 20, 2024
788: fix(getNode): return single element in get node r=sinhaashish a=sinhaashish

There was a regression issue in which `kubectl-mayastor get node node-1-155665 -ojson` was returning an array
```
[
  {
    "id": "node-1-155665",
    "spec": {
      "grpcEndpoint": "135.181.42.41:10124",
      "id": "node-1-155665",
      "node_nqn": "nqn.2019-05.io.openebs:node-name:node-1-155665"
    },
    "state": {
      "grpcEndpoint": "135.181.42.41:10124",
      "id": "node-1-155665",
      "status": "Online",
      "node_nqn": "nqn.2019-05.io.openebs:node-name:node-1-155665"
    }
  }
]
```


Earlier in 2.5 release it was returning a single element as below:
```
{
  "id": "node-1-155665",
  "spec": {
    "grpcEndpoint": "135.181.42.41:10124",
    "id": "node-1-155665",
    "node_nqn": "nqn.2019-05.io.openebs:node-name:node-1-155665"
  },
  "state": {
    "grpcEndpoint": "135.181.42.41:10124",
    "id": "node-1-155665",
    "status": "Online",
    "node_nqn": "nqn.2019-05.io.openebs:node-name:node-1-155665"
  }
}
```

This PR fixes that 

Co-authored-by: sinhaashish <ashi.sinha.87@gmail.com>
@bors-openebs-mayastor
Copy link

Build failed:

Copy link
Contributor

@chriswldenyer chriswldenyer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks reasonable

@sinhaashish
Copy link
Member Author

bors merge

@bors-openebs-mayastor
Copy link

Build succeeded:

@bors-openebs-mayastor bors-openebs-mayastor bot merged commit 4cc26d3 into openebs:develop Mar 20, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants