From e1092f8c14ff7cc47d5ce0b4a0cd3fdf9eecfe6c Mon Sep 17 00:00:00 2001 From: Sharif Olorin Date: Fri, 24 Feb 2017 05:29:01 +0000 Subject: [PATCH] Default to exiting with success if the check run is successful Towards clarification of warden's place in the pipeline in #165 - warden shouldn't be making the "go/no-go" call on the dataset itself but should be generating metadata such that something else can make the decision. As part of this, we don't want jobs to fail/abort with error if the checks in fact ran successfully. --- main/warden.hs | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/main/warden.hs b/main/warden.hs index 0c40f92..59ff96a 100644 --- a/main/warden.hs +++ b/main/warden.hs @@ -233,10 +233,20 @@ fieldMatchRatioP = FieldMatchRatio <$> (option auto $ exitTypeP :: Parser ExitType exitTypeP = - flag ExitWithCheckStatus ExitWithSuccess $ - long "exit-success" - <> short 'e' - <> help "Exit with success status if no errors occur, even if checks have failures." + exitCheckStatusFlag <* exitSuccessFlag + where + exitCheckStatusFlag = + flag ExitWithSuccess ExitWithCheckStatus $ + long "exit-check-status" + <> short 'x' + <> help "Exit with failure if any checks fail, even if warden has run successfully." + + -- Old, kept for compatibility. + exitSuccessFlag = + flag ExitWithSuccess ExitWithSuccess $ + long "exit-success" + <> short 'e' + <> help "(Deprecated: this is now the default behaviour.) Exit with success status if no errors occur, even if checks have failures." includeDotFilesP :: Parser IncludeDotFiles includeDotFilesP =