diff --git a/cmd/mesh-controller/release_plan.go b/cmd/mesh-controller/release_plan.go index e7d6586d..f28516fa 100644 --- a/cmd/mesh-controller/release_plan.go +++ b/cmd/mesh-controller/release_plan.go @@ -253,12 +253,16 @@ func gates(p inventory.Plan, edges []inventory.Edge, rollsOut func(string) bool) // noMoveWhy is what a plan says of a module of its tier whose build was made from the source every machine // running it runs (novox/hq issue 280): nothing is sent for it. -const noMoveWhy = "no move: made from the source every machine running it runs" +// noMovePrefix opens it, and is what noMove reads: one prefix for the writer and the reader. +const ( + noMovePrefix = "no move" + noMoveWhy = noMovePrefix + ": made from the source every machine running it runs" +) // noMove is whether the plan marked the module no move and sent it nothing. Read from what the plan says, // so a plan kept before the mark had a name of its own is read the same (novox/hq issue 648). func noMove(s *inventory.PlanModule) bool { - return s != nil && s.FirstAt == nil && s.Gate == nil && strings.HasPrefix(s.Why, "no move") + return s != nil && s.FirstAt == nil && s.Gate == nil && strings.HasPrefix(s.Why, noMovePrefix) } // applied says whether every machine running the module has reported since the module was built.