[ARVADOS] updated: 1.3.0-3126-g13035b7fa

Git user git at public.arvados.org
Thu Sep 10 18:10:19 UTC 2020


Summary of changes:
 lib/config/cmd.go  | 7 ++++---
 lib/config/load.go | 2 --
 2 files changed, 4 insertions(+), 5 deletions(-)

       via  13035b7fa370e0f81a4139f19276543c6f86b647 (commit)
      from  ffae5e0d4427cf6d41b4f1d270c0cdc29385e2ae (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit 13035b7fa370e0f81a4139f19276543c6f86b647
Author: Ward Vandewege <ward at curii.com>
Date:   Thu Sep 10 14:08:48 2020 -0400

    16808: move strict flag to the config-check command only
    
    Arvados-DCO-1.1-Signed-off-by: Ward Vandewege <ward at curii.com>

diff --git a/lib/config/cmd.go b/lib/config/cmd.go
index dd6f1f98c..347e8519a 100644
--- a/lib/config/cmd.go
+++ b/lib/config/cmd.go
@@ -91,6 +91,7 @@ func (checkCommand) RunCommand(prog string, args []string, stdin io.Reader, stdo
 	flags := flag.NewFlagSet("", flag.ContinueOnError)
 	flags.SetOutput(stderr)
 	loader.SetupFlags(flags)
+	strict := flags.Bool("strict", true, "Strict validation of configuration file (warnings result in non-zero exit code)")
 
 	err = flags.Parse(args)
 	if err == flag.ErrHelp {
@@ -148,19 +149,19 @@ func (checkCommand) RunCommand(prog string, args []string, stdin io.Reader, stdo
 		fmt.Fprintln(stdout, "Your configuration is relying on deprecated entries. Suggest making the following changes.")
 		stdout.Write(diff)
 		err = nil
-		if loader.Strict {
+		if *strict {
 			return 1
 		}
 	} else if len(diff) > 0 {
 		fmt.Fprintf(stderr, "Unexpected diff output:\n%s", diff)
-		if loader.Strict {
+		if *strict {
 			return 1
 		}
 	} else if err != nil {
 		return 1
 	}
 	if logbuf.Len() > 0 {
-		if loader.Strict {
+		if *strict {
 			return 1
 		}
 	}
diff --git a/lib/config/load.go b/lib/config/load.go
index 3359dc567..be6181bbe 100644
--- a/lib/config/load.go
+++ b/lib/config/load.go
@@ -29,7 +29,6 @@ type Loader struct {
 	SkipDeprecated bool // Don't load deprecated config keys
 	SkipLegacy     bool // Don't load legacy config files
 	SkipAPICalls   bool // Don't do checks that call RailsAPI/controller
-	Strict         bool // In config-check, any warnings or diff is non-empty will result in a non-zero exit code
 
 	Path                    string
 	KeepstorePath           string
@@ -74,7 +73,6 @@ func (ldr *Loader) SetupFlags(flagset *flag.FlagSet) {
 		flagset.StringVar(&ldr.GitHttpdPath, "legacy-git-httpd-config", defaultGitHttpdConfigPath, "Legacy arv-git-httpd configuration `file`")
 		flagset.StringVar(&ldr.KeepBalancePath, "legacy-keepbalance-config", defaultKeepBalanceConfigPath, "Legacy keep-balance configuration `file`")
 		flagset.BoolVar(&ldr.SkipLegacy, "skip-legacy", false, "Don't load legacy config files")
-		flagset.BoolVar(&ldr.Strict, "strict", true, "Strict validation of configuration file (warnings result in non-zero exit code)")
 	}
 }
 

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list