From 7ce160d492c4dfdbe87cd5308615d584f176b195 Mon Sep 17 00:00:00 2001 From: Matthias Radestock Date: Thu, 28 Dec 2017 01:59:26 +0000 Subject: [PATCH] don't propagate ImageID in MapContainer2ContainerImage The ImageID is already the id of the node we are creation, and that's what summarisation renders in the event we fail to join this node with a node from the ContainerImage topology that has more metadata. Nothing is looking at the ImageID metadata field. --- render/container.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/render/container.go b/render/container.go index 22d9ac7be..87d1138b6 100644 --- a/render/container.go +++ b/render/container.go @@ -307,7 +307,7 @@ func MapContainer2ContainerImage(n report.Node) report.Nodes { // Otherwise, if some some reason the container doesn't have a image_id // (maybe slightly out of sync reports), just drop it - imageID, timestamp, ok := n.Latest.LookupEntry(docker.ImageID) + imageID, ok := n.Latest.Lookup(docker.ImageID) if !ok { return report.Nodes{} } @@ -316,7 +316,6 @@ func MapContainer2ContainerImage(n report.Node) report.Nodes { // counted to produce the minor label id := report.MakeContainerImageNodeID(imageID) result := NewDerivedNode(id, n).WithTopology(report.ContainerImage) - result.Latest = result.Latest.Set(docker.ImageID, timestamp, imageID) result.Counters = result.Counters.Add(n.Topology, 1) return report.Nodes{id: result} }