You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 19, 2023. It is now read-only.
What steps did you take and what happened:
The resource viewer uses an adjacency list without a root node to generate the graph. As a result, it is possible to generate functionally identical lists that are rendered differently by graphvis. The video below shows a Service (uid: 61e5de4c-963c-4d8d-92e5-74dbad1dc881) that changes positions because it switches between being an edge and a node for the pod.
I suspect this is due to the traversal order from the typed visitors PodsForService and ServicesForPod where the goroutine that wins decides whether a given service is added as an edge or node:
It was expecting to see the race condition on objectvisitor.go since each typedVisitors use go routines to load the information and are only sync on the function level on not on the objectVisitior level
Sidenote: These go routines does not seem to be necessary, removing them just increase the loading time by a 100 to 200 ms in the worst case tested where the total time was 15 segs using go routines and 15 segs and 200 ms without them
Conclusion race condition test: the problem is not a race condition due to lack of sync on objectvisitot.go
Empty array return by default
After more testing it was posible to see the double rendering is because the first time the dynamic cache return and empty array for the services and others "resources" is still no clear why is this happening
What steps did you take and what happened:
The resource viewer uses an adjacency list without a root node to generate the graph. As a result, it is possible to generate functionally identical lists that are rendered differently by graphvis. The video below shows a Service (uid:
61e5de4c-963c-4d8d-92e5-74dbad1dc881
) that changes positions because it switches between being an edge and a node for the pod.I suspect this is due to the traversal order from the typed visitors
PodsForService
andServicesForPod
where the goroutine that wins decides whether a given service is added as an edge or node:https://github.com/vmware-tanzu/octant/blob/ba9a2da77e7538a5bbe205452e0161dfe1ba98d8/internal/objectvisitor/pod.go#L68
https://github.com/vmware-tanzu/octant/blob/1c57c1ef580f93630e5358814be98872c1f72100/internal/objectvisitor/service.go#L62)
The resource viewer needs to ensure the object in the view is the first object recorded in the adjacency list.
Screencast.2021-02-02.18.18.27.mp4
Initial:
Changed:
The text was updated successfully, but these errors were encountered: