carlos / platform Public

appconfig: syncable delegates to release.Adoptable

Paul Campbell b8226c43288b77d7c3fc195fa1920ad674cad632 parent 9105ad5
1 file changed, +7 −7
  • internal/appconfig/sync.go +7 −7
diff --git a/internal/appconfig/sync.go b/internal/appconfig/sync.go
index 246ec1d54..9738fc2f2 100644
--- a/internal/appconfig/sync.go
+++ b/internal/appconfig/sync.go
@@ -275,14 +275,14 @@ func lostKeys(cur []byte, m *Manifest) (lost []string, parsed bool) {
return lost, true
}
-// syncable mirrors release.Adoptable: lifecycle-managed instances of a
-// known app, excluding platform-minted alias routes (an alias shares its
-// canonical route's process and therefore its canonical route's config —
-// see release.Adoptable's own doc comment for why aliases are excluded
-// from adoption the same way).
+// syncable delegates to release.Adoptable, deliberately: config sync and
+// adopt must agree, to the character, on which routes are lifecycle-managed
+// (a known app, excluding platform-minted alias routes — see
+// release.Adoptable's own doc comment for why aliases are excluded), and a
+// second hand-copied predicate here is exactly the drift that would let the
+// two disagree.
func syncable(rt registry.Route) bool {
- return rt.Kind == "instance" && rt.App != "" && !rt.Platform &&
- (rt.Status == "" || rt.Status == "ready")
+ return release.Adoptable(rt)
}
// UnitConfigApps lists the distinct (account, app) pairs having at least