From e3103a06e5f3591af4439ad19a86d8b90a33ea0a Mon Sep 17 00:00:00 2001 From: mozga-intel Date: Wed, 20 Oct 2021 14:50:38 +0200 Subject: [PATCH 1/3] Remove exit 0 to avoid stop CIs --- ci/docker/runtime_functions.sh | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/ci/docker/runtime_functions.sh b/ci/docker/runtime_functions.sh index 84b56013c052..39fcbb641c97 100755 --- a/ci/docker/runtime_functions.sh +++ b/ci/docker/runtime_functions.sh @@ -740,19 +740,17 @@ sanity_clang() { GIT_DIFFERENCE=$(git diff) if [[ -z $GIT_DIFFERENCE ]]; then git remote remove "${GITHUB_RUN_ID}" # temporary remote is removed - exit 0 + else + echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" + echo "| Clang-format failures found! Run: " + echo "| tools/lint/clang_format_ci.sh ${BASE_SHA} " + echo "| to fix this error. " + echo "| For more info, see: https://mxnet.apache.org/versions/master/community/clang_format_guide" + echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" + + echo "$GIT_DIFFERENCE" + git remote remove "${GITHUB_RUN_ID}" # temporary remote is removed fi - - echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" - echo "| Clang-format failures found! Run: " - echo "| tools/lint/clang_format_ci.sh ${BASE_SHA} " - echo "| to fix this error. " - echo "| For more info, see: https://mxnet.apache.org/versions/master/community/clang_format_guide" - echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" - - echo "$GIT_DIFFERENCE" - git remote remove "${GITHUB_RUN_ID}" # temporary remote is removed - exit 1 } sanity_python() { From 07ff3cf2e3fab3314e1c4075a9fd26ddf51ac6bc Mon Sep 17 00:00:00 2001 From: mozga-intel Date: Wed, 20 Oct 2021 16:24:54 +0200 Subject: [PATCH 2/3] Return instead of exit 0, to avoid exit code --- ci/docker/runtime_functions.sh | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/ci/docker/runtime_functions.sh b/ci/docker/runtime_functions.sh index 39fcbb641c97..b5ebb82edf74 100755 --- a/ci/docker/runtime_functions.sh +++ b/ci/docker/runtime_functions.sh @@ -740,17 +740,18 @@ sanity_clang() { GIT_DIFFERENCE=$(git diff) if [[ -z $GIT_DIFFERENCE ]]; then git remote remove "${GITHUB_RUN_ID}" # temporary remote is removed - else - echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" - echo "| Clang-format failures found! Run: " - echo "| tools/lint/clang_format_ci.sh ${BASE_SHA} " - echo "| to fix this error. " - echo "| For more info, see: https://mxnet.apache.org/versions/master/community/clang_format_guide" - echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" - - echo "$GIT_DIFFERENCE" - git remote remove "${GITHUB_RUN_ID}" # temporary remote is removed + return fi + + echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" + echo "| Clang-format failures found! Run: " + echo "| tools/lint/clang_format_ci.sh ${BASE_SHA} " + echo "| to fix this error. " + echo "| For more info, see: https://mxnet.apache.org/versions/master/community/clang_format_guide" + echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" + + echo "$GIT_DIFFERENCE" + git remote remove "${GITHUB_RUN_ID}" # temporary remote is removed } sanity_python() { From f76949f1b35b8e9ab27cbf7ce2c1f615a2d8e635 Mon Sep 17 00:00:00 2001 From: mozga-intel Date: Wed, 20 Oct 2021 16:25:59 +0200 Subject: [PATCH 3/3] Exit 1 is keet --- ci/docker/runtime_functions.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/ci/docker/runtime_functions.sh b/ci/docker/runtime_functions.sh index b5ebb82edf74..392d54b3fa50 100755 --- a/ci/docker/runtime_functions.sh +++ b/ci/docker/runtime_functions.sh @@ -752,6 +752,7 @@ sanity_clang() { echo "$GIT_DIFFERENCE" git remote remove "${GITHUB_RUN_ID}" # temporary remote is removed + exit 1 } sanity_python() {