13647: Add comments.
authorTom Clegg <tclegg@veritasgenetics.com>
Thu, 11 Jul 2019 19:22:22 +0000 (15:22 -0400)
committerTom Clegg <tclegg@veritasgenetics.com>
Thu, 11 Jul 2019 19:22:22 +0000 (15:22 -0400)
Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tclegg@veritasgenetics.com>

lib/config/cmd.go
lib/config/load.go

index 7889d85c8047b08cfdb1048791b28dddeb7ed360..5cb76fc35d63bd331f92e7ec02fccc1084a0c0e6 100644 (file)
@@ -104,6 +104,14 @@ func (checkCommand) RunCommand(prog string, args []string, stdin io.Reader, stdo
                return 2
        }
 
+       // Load the config twice -- once without loading deprecated
+       // keys/files, once with -- and then compare the two resulting
+       // configs. This reveals whether the deprecated keys/files
+       // have any effect on the final configuration.
+       //
+       // If they do, show the operator how to update their config
+       // such that the deprecated keys/files are superfluous and can
+       // be deleted.
        loader.SkipDeprecated = true
        withoutDepr, err := loader.Load()
        if err != nil {
index a11878bccd2c9b0d8a942f52c93fd4b8a5433b70..897d99d51453aa3cfa1a32626ca2797fab99be26 100644 (file)
@@ -26,7 +26,7 @@ var ErrNoClustersDefined = errors.New("config does not define any clusters")
 type Loader struct {
        Stdin          io.Reader
        Logger         logrus.FieldLogger
-       SkipDeprecated bool
+       SkipDeprecated bool // Don't load legacy/deprecated config keys/files
 
        Path          string
        KeepstorePath string