From 83b1c82e93243f8c5dbd83dc78a66b5e3ca781be Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Sun, 23 Oct 2016 14:23:36 -0700 Subject: [PATCH] terraform: put quotes before vertex name to avoid false panicwrap Fixes #9395 --- dag/dag.go | 4 ++-- terraform/graph.go | 4 ++-- terraform/transform_expand.go | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/dag/dag.go b/dag/dag.go index 20b3e0400..1a76dc1cf 100644 --- a/dag/dag.go +++ b/dag/dag.go @@ -206,11 +206,11 @@ func (g *AcyclicGraph) Walk(cb WalkFunc) error { case <-ch: break DepSatisfied case <-time.After(time.Second * 5): - log.Printf("[DEBUG] vertex %s, waiting for: %s", + log.Printf("[DEBUG] vertex %q, waiting for: %q", VertexName(v), VertexName(deps[i])) } } - log.Printf("[DEBUG] vertex %s, got dep: %s", + log.Printf("[DEBUG] vertex %q, got dep: %q", VertexName(v), VertexName(deps[i])) } diff --git a/terraform/graph.go b/terraform/graph.go index d056bab1f..55ddb5def 100644 --- a/terraform/graph.go +++ b/terraform/graph.go @@ -255,7 +255,7 @@ func (g *Graph) walk(walker GraphWalker) error { // If the node is dynamically expanded, then expand it if ev, ok := v.(GraphNodeDynamicExpandable); ok { log.Printf( - "[DEBUG] vertex %s.%s: expanding/walking dynamic subgraph", + "[DEBUG] vertex '%s.%s': expanding/walking dynamic subgraph", path, dag.VertexName(v)) g, err := ev.DynamicExpand(vertexCtx) @@ -274,7 +274,7 @@ func (g *Graph) walk(walker GraphWalker) error { // If the node has a subgraph, then walk the subgraph if sn, ok := v.(GraphNodeSubgraph); ok { log.Printf( - "[DEBUG] vertex %s.%s: walking subgraph", + "[DEBUG] vertex '%s.%s': walking subgraph", path, dag.VertexName(v)) diff --git a/terraform/transform_expand.go b/terraform/transform_expand.go index 3251ea36e..e5120119a 100644 --- a/terraform/transform_expand.go +++ b/terraform/transform_expand.go @@ -43,7 +43,7 @@ func (t *ExpandTransform) Transform(v dag.Vertex) (dag.Vertex, error) { } // Expand the subgraph! - log.Printf("[DEBUG] vertex %s: static expanding", dag.VertexName(ev)) + log.Printf("[DEBUG] vertex %q: static expanding", dag.VertexName(ev)) return ev.Expand(t.Builder) }