-
Notifications
You must be signed in to change notification settings - Fork 15
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
NETOBSERV-1927 fix topology issues #657
Conversation
New image: It will expire after two weeks. To deploy this build, run from the operator repo, assuming the operator is running: USER=netobserv VERSION=a01a382 make set-plugin-image |
@@ -170,12 +170,18 @@ const parseTopologyMetric = ( | |||
const sourceFields: Partial<TopologyMetricPeer> = { | |||
addr: raw.metric.SrcAddr, | |||
resource: nameAndType(raw.metric.SrcK8S_Name, raw.metric.SrcK8S_Type), | |||
owner: nameAndType(raw.metric.SrcK8S_OwnerName, raw.metric.SrcK8S_OwnerType) | |||
owner: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we need to avoid setting owner if it's the same as leaf Type? Curious because it used to work like this even before the scopes refactor PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(I'm just worrying about potential side effects even if I don't see any right now...)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was tons of hardcoded logic for each case (when owner is set / when resource is set and so on), especially for grouping and displaying topology nodes.
Some of this logic is kept but while debugging, I saw that Pods
and Services
without owners where duplicating their name / type into the owner field.
That's kind of a nonsence and will avoid mistakes if you check the owner field first.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The same logic was already hardcoded in the display btw:
network-observability-console-plugin/web/src/components/netflow-topology/element-fields.tsx
Line 35 in 72915fe
if (data.peer.owner && data.peer.owner.type !== data.peer.resource?.type) { |
/lgtm |
@jpinsonneau those 2 tests still fail when I use plugin image with tag: a01a382
|
@memodi Is there any easy way to get the difference here ? maybe screenshots ? |
I have the screenshots but not sure how much of those would be helpful, also sharing the links of API data for these dates: |
Thanks @memodi ! For me the change in the count of groups is valid and is because I removed wrongly set Owners. For example in a NS+Owners grouping, kubernetes service was showing default as namespace, kubernetes as owner and itself: Now it displays only default as namespace and itself as there is no owner: This happens also with pods without owners such as loki pod. |
@jpinsonneau - SGTM! I'll update these 2 tests. Thanks! |
/label qe-approved |
[APPROVALNOTIFIER] This PR is APPROVED Approval requirements bypassed by manually added approval. This pull-request has been approved by: 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:
Approvers can indicate their approval by writing |
/retest |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #657 +/- ##
=======================================
Coverage 56.54% 56.54%
=======================================
Files 196 196
Lines 10064 10064
Branches 1195 1195
=======================================
Hits 5691 5691
Misses 4008 4008
Partials 365 365
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Description
Followup on #634 to fix topology issues
Dependencies
n/a
Checklist
If you are not familiar with our processes or don't know what to answer in the list below, let us know in a comment: the maintainers will take care of that.