Comment 1 for bug 1761202

Revision history for this message
John A Meinel (jameinel) wrote :

pretty.Diff turned out to not be super helpful when dealing with slices of Members. Using a custom formatter and then doing the diff gave:
[LOG] 0:18.786 DEBUG juju.replicaset Add() changing replica set
from {
  Name: juju,
  Version: 1,
  Members: {
    {1 "localhost:43465" foo:bar voting},
  },
}
  to {
  Name: juju,
  Version: 2,
  Members: {
    {1 "localhost:43465" foo:bar voting},
    {2 "localhost:41232" voting},
    {3 "localhost:36076" voting},
  },
}
diff:
Version: 1 != 2
Members: []replicaset.Member[1] != []replicaset.Member[3]

So it didn't really clarify that #2 and #3 were being added.

However, we can at least update the existing "fmtConfigForLog" to do a better job with indenting, etc, and making it much clearer to read.

https://github.com/juju/replicaset/pull/8