openshift / troubleshooting-panel-console-plugin

Console Plugin to add a troubleshooting side panel to display Korrel8r data
Apache License 2.0
0 stars 7 forks source link

OU-457: Fix Netflow Class Korrel8r Queries #33

Closed PeterYurkovich closed 4 months ago

PeterYurkovich commented 4 months ago

When manually creating a netflow query, it returns a Kubernetes Node as one of the nodes in the correlation graph. When we query for the the kubernetes node GVK there are two separate GVK's that are returned. The old code had previously interpreted this as a failure to parse the query, and then placed a null in the array which then threw an error when the id parameter was retrieved from it.

This PR adds two seperate changes:

  1. Use the first GVK returned if multiple are returned
  2. Skip nodes that fail to be parsed. Then skip edges for these skipped nodes.
openshift-ci-robot commented 4 months ago

@PeterYurkovich: This pull request references OU-457 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the bug to target the "4.17.0" version, but no target version was set.

In response to [this](https://github.com/openshift/troubleshooting-panel-console-plugin/pull/33): >When manually creating a netflow query, it returns a Kubernetes Node as one of its nodes. The Kubernetes Node returns two separate [GVK](https://book.kubebuilder.io/cronjob-tutorial/gvks.html)'s. This led to a failure to parse the query, leading to the old code placing a null in the array, which then threw an error when the id parameter was retrieved from it. > >This PR adds two seperate changes: >1. Use the first GVK returned if multiple are returned >2. Skip nodes that fail to be parsed. Then skip edges for these skipped nodes. > Instructions for interacting with me using PR comments are available [here](https://prow.ci.openshift.org/command-help?repo=openshift%2Ftroubleshooting-panel-console-plugin). If you have questions or suggestions related to my behavior, please file an issue against the [openshift-eng/jira-lifecycle-plugin](https://github.com/openshift-eng/jira-lifecycle-plugin/issues/new) repository.
openshift-ci-robot commented 4 months ago

@PeterYurkovich: This pull request references OU-457 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the bug to target the "4.17.0" version, but no target version was set.

In response to [this](https://github.com/openshift/troubleshooting-panel-console-plugin/pull/33): >When manually creating a netflow query, it returns a Kubernetes Node as one of its nodes. The Kubernetes Node returns two separate [GVK](https://book.kubebuilder.io/cronjob-tutorial/gvks.html)'s. We had interpreted this as a failure to parse the query, and then the old code placed a null in the array, which then threw an error when the id parameter was retrieved from it. > >This PR adds two seperate changes: >1. Use the first GVK returned if multiple are returned >2. Skip nodes that fail to be parsed. Then skip edges for these skipped nodes. > Instructions for interacting with me using PR comments are available [here](https://prow.ci.openshift.org/command-help?repo=openshift%2Ftroubleshooting-panel-console-plugin). If you have questions or suggestions related to my behavior, please file an issue against the [openshift-eng/jira-lifecycle-plugin](https://github.com/openshift-eng/jira-lifecycle-plugin/issues/new) repository.
openshift-ci[bot] commented 4 months ago

@PeterYurkovich: all tests passed!

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
openshift-ci-robot commented 4 months ago

@PeterYurkovich: This pull request references OU-457 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the bug to target the "4.17.0" version, but no target version was set.

In response to [this](https://github.com/openshift/troubleshooting-panel-console-plugin/pull/33): >When manually creating a netflow query, it returns a Kubernetes Node as one of its nodes. When we query for the The Kubernetes Node [GVK](https://book.kubebuilder.io/cronjob-tutorial/gvks.html) there are two separate GVK's that are returned. We had interpreted this as a failure to parse the query, and then the old code placed a null in the array, which then threw an error when the id parameter was retrieved from it. > >This PR adds two seperate changes: >1. Use the first GVK returned if multiple are returned >2. Skip nodes that fail to be parsed. Then skip edges for these skipped nodes. > Instructions for interacting with me using PR comments are available [here](https://prow.ci.openshift.org/command-help?repo=openshift%2Ftroubleshooting-panel-console-plugin). If you have questions or suggestions related to my behavior, please file an issue against the [openshift-eng/jira-lifecycle-plugin](https://github.com/openshift-eng/jira-lifecycle-plugin/issues/new) repository.
openshift-ci-robot commented 4 months ago

@PeterYurkovich: This pull request references OU-457 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the bug to target the "4.17.0" version, but no target version was set.

In response to [this](https://github.com/openshift/troubleshooting-panel-console-plugin/pull/33): >When manually creating a netflow query, it returns a Kubernetes Node as one of the nodes in the correlation graph. When we query for the the kubernetes node [GVK](https://book.kubebuilder.io/cronjob-tutorial/gvks.html) there are two separate GVK's that are returned. The old code had previously interpreted this as a failure to parse the query, and then placed a null in the array which then threw an error when the id parameter was retrieved from it. > >This PR adds two seperate changes: >1. Use the first GVK returned if multiple are returned >2. Skip nodes that fail to be parsed. Then skip edges for these skipped nodes. > Instructions for interacting with me using PR comments are available [here](https://prow.ci.openshift.org/command-help?repo=openshift%2Ftroubleshooting-panel-console-plugin). If you have questions or suggestions related to my behavior, please file an issue against the [openshift-eng/jira-lifecycle-plugin](https://github.com/openshift-eng/jira-lifecycle-plugin/issues/new) repository.
jgbernalp commented 4 months ago

/lgtm

openshift-ci[bot] commented 4 months ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jgbernalp, PeterYurkovich

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/openshift/troubleshooting-panel-console-plugin/blob/main/OWNERS)~~ [PeterYurkovich,jgbernalp] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
PeterYurkovich commented 4 months ago

/cherry-pick release-0.1

openshift-cherrypick-robot commented 4 months ago

@PeterYurkovich: new pull request created: #35

In response to [this](https://github.com/openshift/troubleshooting-panel-console-plugin/pull/33#issuecomment-2182603173): >/cherry-pick release-0.1 Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository.