diff options
author | Maxim Kuvyrkov <maxim.kuvyrkov@linaro.org> | 2020-11-24 10:24:22 +0000 |
---|---|---|
committer | Maxim Kuvyrkov <maxim.kuvyrkov@linaro.org> | 2020-11-26 09:36:18 +0000 |
commit | 55d6369b569388c45f36ca412045570a75cd7187 (patch) | |
tree | 67dc6c91f3632b68c22e95c0d3c5ce51c8fadb78 | |
parent | 7cb2be672111f326e2dcba12501dfb89f3a4f11b (diff) |
round-robin-bisect.sh: Don't repeatedly report regressions for same configs
... which is happening when linux-next catches a regression, and we
daily send out regression reports to developers. Now this will be
restricted to 1 report per configuration per regressing commit.
Change-Id: If0489a49edc52a551d4460afa75c040497929710
-rwxr-xr-x | round-robin-bisect.sh | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/round-robin-bisect.sh b/round-robin-bisect.sh index 6ba57983..86d8ca8d 100755 --- a/round-robin-bisect.sh +++ b/round-robin-bisect.sh @@ -276,6 +276,7 @@ EOF # Ignore failures (since this is cache handling). push_interesting_commit () { + declare -g push_interesting_commit_result=0 ( set -euf -o pipefail @@ -295,6 +296,11 @@ push_interesting_commit () fi git -C ../interesting-commits add . + if [ x"$(git -C ../interesting-commits status --short)" = x"" ]; then + # No file has changed. We've been here before... + # E.g., this is a re-occuring regression in linux-next. + exit 125 + fi git -C ../interesting-commits commit -m "Add $kind $sha1 from $BUILD_URL ${configs[*]}" & @@ -304,7 +310,8 @@ ${configs[*]}" & git_init_linaro_local_remote ../interesting-commits baseline false git_push ../interesting-commits baseline linaro-local/ci/${rr[ci_project]} fi - ) || true + ) & + wait $? || push_interesting_commit_result=$! } # Print first_bad revision (if detected) @@ -395,6 +402,7 @@ if [ x"$(get_first_bad)" = x"" ]; then fi first_bad=$(get_first_bad) +notify_devs=true if [ x"$first_bad" != x"" ]; then # "git bisect run" succeeded. Check whether this is an actual regression # or bisection artifact. @@ -419,6 +427,9 @@ if [ x"$first_bad" != x"" ]; then # Add both $last_good and $first_bad to interesting commits. push_interesting_commit $last_good "last-good" push_interesting_commit $first_bad "regression" + if [ x"$push_interesting_commit_result" = x"125" ]; then + notify_devs=false + fi if [ x"$res" = x"0" ]; then # Success! Touch $artifacts/first-bad as a marker of successful bisect. echo $first_bad > $artifacts/first-bad @@ -518,7 +529,7 @@ if [ x"${JIRA_PASSWORD+set}" = x"set" ] && [ -f $artifacts/first-bad ]; then *) jira_card="" ;; esac - if [ x"$jira_card" != x"" ]; then + if $notify_devs && [ x"$jira_card" != x"" ]; then cat > $artifacts/jenkins/jira-body.txt <<EOF [$jira_card] $(cat $artifacts/jenkins/mail-body.txt) @@ -618,7 +629,7 @@ EOF if [ -f $artifacts/first-bad ]; then cat >> $artifacts/jenkins/mail-body.txt <<EOF -Full commit: +Full commit (up to 1000 lines): <cut> $(git -C $current_project show --stat --patch $first_bad | head -n 1000) </cut> @@ -636,9 +647,11 @@ case "${rr[ci_project]}/${rr[ci_config]}:$current_project" in tcwg_kernel/llvm-*:linux) CI_MAIL_RECIPIENTS="$CI_MAIL_RECIPIENTS, arnd@linaro.org, clang-built-linux@googlegroups.com" ;; tcwg_kernel/llvm-*:llvm) CI_MAIL_RECIPIENTS="$CI_MAIL_RECIPIENTS, clang-built-linux@googlegroups.com" ;; esac -cat > $artifacts/jenkins/mail-recipients.txt <<EOF +if $notify_devs; then + cat > $artifacts/jenkins/mail-recipients.txt <<EOF $CI_MAIL_RECIPIENTS EOF +fi # Reset baseline to the regressed commit so that we will catch subsequent # regressions (worse than $bad_rev). |