mirror of
https://github.com/weaveworks/scope.git
synced 2026-03-02 01:30:30 +00:00
render parents which we cannot resolve
The id and topology are enough to get some basic info for rendering. This isn't just a fall-through for exceptional cases. ContainerwithImageNameRenderer produces parent references using the image name without version as the ID, and containers-by-image topology uses that for grouping. By contrast, the container-image topology in the report is keyed on docker image IDs.
This commit is contained in:
@@ -44,19 +44,10 @@ func Parents(r report.Report, n report.Node) []Parent {
|
||||
if topologyID == n.Topology && id == n.ID {
|
||||
continue
|
||||
}
|
||||
|
||||
var parentNode report.Node
|
||||
// Special case: container image parents should be empty nodes for some reason
|
||||
if topologyID == report.ContainerImage {
|
||||
parentNode, ok := topology.Nodes[id]
|
||||
if !ok {
|
||||
parentNode = report.MakeNode(id).WithTopology(topologyID)
|
||||
} else {
|
||||
if parent, ok := topology.Nodes[id]; ok {
|
||||
parentNode = parent
|
||||
} else {
|
||||
continue
|
||||
}
|
||||
}
|
||||
|
||||
apiTopologyID, ok := primaryAPITopology[topologyID]
|
||||
if !ok {
|
||||
continue
|
||||
|
||||
Reference in New Issue
Block a user