remove unneeded partial outputs

filterPartialOutputs was not taking into account that some dependent
resources might yet be removed from the graph. Check that they are not
in the targeted set before declaring that the output remain.
This commit is contained in:
James Bardin 2018-03-19 21:20:06 -04:00
parent e5f8adfc1a
commit a5c4f7e08e
1 changed files with 6 additions and 0 deletions

View File

@ -217,6 +217,12 @@ func filterPartialOutputs(v interface{}, targetedNodes *dag.Set, g *Graph) bool
if _, ok := d.(*NodeCountBoundary); ok { if _, ok := d.(*NodeCountBoundary); ok {
continue continue
} }
if !targetedNodes.Include(d) {
// this one is going to be removed, so it doesn't count
continue
}
// as soon as we see a real dependency, we mark this as // as soon as we see a real dependency, we mark this as
// non-removable // non-removable
return true return true