diff options
author | Maxim Kuvyrkov <maxim.kuvyrkov@linaro.org> | 2022-08-29 16:04:07 +0000 |
---|---|---|
committer | Maxim Kuvyrkov <maxim.kuvyrkov@linaro.org> | 2022-08-31 11:44:09 +0000 |
commit | 282986c43bbf456fa94deae98db8b053d43e6b23 (patch) | |
tree | b080c43a9021dfd9ba3ccc1e0d7c5e0cbc716e6a | |
parent | 293ab3e8aa6ff4b9043b1e32f98db51e22b70efc (diff) |
round-robin-bisect.sh: Remove notification code
... which is now in round-robin.sh.
Change-Id: I0b136a59f6aa9cd8f27316107628a34aa7fafdb3
-rwxr-xr-x | round-robin-bisect.sh | 259 |
1 files changed, 0 insertions, 259 deletions
diff --git a/round-robin-bisect.sh b/round-robin-bisect.sh index d97cefc2..8eb67d0d 100755 --- a/round-robin-bisect.sh +++ b/round-robin-bisect.sh @@ -293,7 +293,6 @@ EOF ;; esac fi - echo > $artifacts/jenkins/mail-recipients.txt trap "" EXIT exit 0 elif [ x"$res" = x"125" ]; then @@ -301,7 +300,6 @@ elif [ x"$res" = x"125" ]; then # to bisect. echo "WARNING: build for bad_rev $bad_rev showed uninteresting regression" sed -i -e "s/\$/-uninteresting/" $artifacts/jenkins/build-name - echo > $artifacts/jenkins/mail-recipients.txt trap "" EXIT exit 0 fi @@ -325,25 +323,6 @@ cat <<EOF | manifest_out declare -g interesting_commits_rev=$interesting_commits_rev EOF -# Add SHA1 commit $1 to interesting-commits and push the repo. -# $1: SHA1 of first_bad revision -# Ignore failures (since this is cache handling). -push_interesting_commit () -{ - ( - set -euf -o pipefail - - local sha1="$1" - - git -C $icommits commit -m "Add entry $sha1 from $BUILD_URL" - - # Interesting-commits.git do not have .gitreview, so it's - # simpler to push via gitolite. - git_init_linaro_local_remote $icommits baseline false - git_push $icommits baseline master - ) -} - # Print first_bad revision (if detected) get_first_bad () { @@ -463,9 +442,6 @@ if [ x"$(get_first_bad)" = x"" ]; then fi fi -notify_devs=true -notify_author="" - first_bad=$(get_first_bad) if [ x"$first_bad" != x"" ] \ @@ -576,8 +552,6 @@ else done sed -i -e "s/\$/-reset-baseline/" $artifacts/jenkins/build-name fi - # Don't send any emails. - notify_devs=false fi # Bisect is officially over. @@ -643,239 +617,6 @@ if [ x"$first_bad" != x"" ]; then ln -f -s "build-$first_bad" "$artifacts/build-first_bad" ln -f -s "build-$last_good" "$artifacts/build-last_good" -else - notify_devs=false -fi - -case "${rr[ci_project]}" in - tcwg_gcc_check*|tcwg_gnu_*_check_*) - # We are building up lists of flaky tests and we need to stabilize - # GCC and GDB testsuites. Currently dejagnu testsuites are too - # flaky for automated regression detection. - notify_devs=false - ;; -esac - -if $notify_devs; then - assert [ x"$first_bad" != x"" ] && [ x"$last_good" != x"" ] - - isubdir=$(interesting_subdir "$current_project" "$first_bad" \ - "${rr[ci_project]}") - if [ -d "$icommits/$isubdir/${rr[ci_config]}" ]; then - # This is a re-occurring problem (usually, in linux-next). - # Don't spam developers. - notify_devs=false - fi - - # We have successfully identified a bad commit with a good parent! - # Add $first_bad to interesting commits. - git -C $icommits remote update -p - git -C $icommits reset --hard refs/remotes/origin/master - update_interesting_entry "$current_project" "$first_bad" "$last_good" \ - "$icommits" "$artifacts/build-$first_bad" - push_interesting_commit "$first_bad" -fi - -if $notify_devs; then - if [ "$(ls "$icommits/$isubdir" | wc -l)" = 2 ]; then - # This is the first entry for $first_bad in ${rr[ci_project]} -- - # notify the patch author. One line for ci_config, and one for - # status.txt. - notify_author=$(git -C $current_project log --pretty="%an <%ae>" -n 1 \ - "$first_bad") - - if [ x"$(print_tested_revs good | wc -l)" = x"1" ]; then - # Baseline was the only revision that tested "good" -- this is - # often due to some bug in our scripts that causes all - # partial/bisect builds to fail. - # Be cautious and don't spam upstream developers in this case. - # If the regression is legit and the immediate child of baseline - # revision is responsible for the regression -- we'll forward - # the notification email manually. - notify_author="" - fi - fi - - case "${rr[ci_project]}/${rr[ci_config]}:$current_project" in - tcwg_kernel/gnu-*:linux) jira_card="GNU-681" ;; - tcwg_kernel/gnu-*:*) jira_card="GNU-680" ;; - tcwg_kernel/llvm-*:linux) jira_card="LLVM-647" ;; - tcwg_kernel/llvm-*:*) jira_card="LLVM-646" ;; - tcwg_bmk_*/gnu*-O[23]*) jira_card="GNU-689" ;; - tcwg_bmk_*/gnu*) jira_card="GNU-686" ;; - tcwg_bmk_*/llvm-*O[23]*) jira_card="LLVM-651" ;; - tcwg_bmk_*/llvm-*) jira_card="LLVM-650" ;; - tcwg_binutils/*) jira_card="GNU-692" ;; - tcwg_cross/*) jira_card="GNU-692" ;; - tcwg_gnu/*) jira_card="GNU-692" ;; - # Catch-all case for when project/config IDs change, so that we - # won't miss notifications. Forward all that to GNU-692. - *) jira_card="GNU-692" ;; - esac - - rm -f $artifacts/jenkins/mail-body.draft - - cat > $artifacts/jenkins/jira-status.txt <<EOF -[$jira_card] -$(cat "$icommits/$isubdir/status.txt") - -Details: ${BUILD_URL}artifact/$rel_artifacts/jenkins/mail-body.txt/*view*/ -Even more details: ${BUILD_URL}artifact/$rel_artifacts/ -EOF - if [ x"${TCWG_JIRA_TOKEN+set}" = x"set" ]; then - if ! [ -f $HOME/.jipdate.yml ]; then - cat > $HOME/.jipdate.yml <<EOF -server: - url: https://linaro.atlassian.net - token: #TCWG_JIRA_TOKEN# -text-editor: False -username: team-toolchain+tcwg-jira@linaro.org -EOF - fi - ( - set +x - sed -i -e "s/#TCWG_JIRA_TOKEN#/$TCWG_JIRA_TOKEN/" $HOME/.jipdate.yml - ) - echo y | jipdate.py -f $artifacts/jenkins/jira-status.txt & - res=0 && wait $! || res=$? - if [ $res != 0 ]; then - cat >> $artifacts/jenkins/mail-body.draft <<EOF -WARNING: Could not post this report to https://linaro.atlassian.net/browse/$jira_card - -EOF - fi - fi - - cat >> $artifacts/jenkins/mail-body.draft <<EOF -$(cat $artifacts/build-$first_bad/mail/mail-body.txt) - -THIS IS THE END OF INTERESTING STUFF. BELOW ARE LINKS TO BUILDS, REPRODUCTION INSTRUCTIONS, AND THE RAW COMMIT. - -For latest status see comments in https://linaro.atlassian.net/browse/$jira_card . -$(cat $artifacts/jenkins/jira-status.txt) - -First_bad build: \$FIRST_BAD_ARTIFACTS/ -Last_good build: \$LAST_GOOD_ARTIFACTS/ -Baseline build: \$BASELINE_ARTIFACTS/ -Even more details: ${BUILD_URL}artifact/$rel_artifacts/ - -Reproduce builds: -<cut> -mkdir investigate-$current_project-$first_bad -cd investigate-$current_project-$first_bad - -# Fetch scripts -git clone https://git.linaro.org/toolchain/jenkins-scripts - -# Fetch manifests and test.sh script -mkdir -p $rel_artifacts/build-baseline $rel_artifacts/build-parameters -curl -o $rel_artifacts/build-baseline/manifest.sh ${BUILD_URL}artifact/$rel_artifacts/build-baseline/manifest.sh --fail -curl -o $rel_artifacts/build-parameters/manifest.sh ${BUILD_URL}artifact/$rel_artifacts/build-parameters/manifest.sh --fail -curl -o $rel_artifacts/test.sh ${BUILD_URL}artifact/$rel_artifacts/test.sh --fail -chmod +x $rel_artifacts/test.sh - -# Reproduce the baseline build (build all pre-requisites) -$build_script ^^ true %%rr[top_artifacts] $rel_artifacts/build-baseline - -# Save baseline build state (which is then restored in $rel_artifacts/test.sh) -mkdir -p ./bisect -rsync -a --del --delete-excluded ${baseline_exclude[@]} ./ ./bisect/baseline/ - -cd $current_project - -# Reproduce first_bad build -git checkout --detach $first_bad -../$rel_artifacts/test.sh - -# Reproduce last_good build -git checkout --detach $last_good -../$rel_artifacts/test.sh - -cd .. -</cut> - -Full commit (up to 1000 lines): -<cut> -$(git -C $current_project show --stat --patch $first_bad | head -n 1000) -</cut> -EOF - - cat > $artifacts/jenkins/mail-subject.draft <<EOF -[TCWG CI] $(cat $artifacts/build-$first_bad/mail/mail-subject.txt) -EOF - - # Set mail recipients last to preserve catch-error value from .yaml file. - # Email developers. - CI_MAIL_RECIPIENTS=("bcc:tcwg-validation@linaro.org") - case "$notify_author@${rr[ci_project]}/${rr[ci_config]}:$current_project" in - ""@*/*:*) ;; - *@tcwg_gcc*/*:*) - CI_MAIL_RECIPIENTS+=("$notify_author") - CI_MAIL_RECIPIENTS+=("cc:gcc-regression@gcc.gnu.org") - ;; - *@tcwg_gnu*/*:*) - CI_MAIL_RECIPIENTS+=("$notify_author") - CI_MAIL_RECIPIENTS+=("cc:gcc-regression@gcc.gnu.org") - ;; - *@tcwg_kernel/llvm-*:linux) - CI_MAIL_RECIPIENTS+=("$notify_author") - CI_MAIL_RECIPIENTS+=("cc:llvm@lists.linux.dev") - CI_MAIL_RECIPIENTS+=("cc:arnd@linaro.org") - ;; - *@tcwg_kernel/*:linux) - CI_MAIL_RECIPIENTS+=("$notify_author") - CI_MAIL_RECIPIENTS+=("cc:linaro-kernel@lists.linaro.org") - CI_MAIL_RECIPIENTS+=("cc:arnd@linaro.org") - ;; - *@tcwg_kernel/*:llvm) - CI_MAIL_RECIPIENTS+=("$notify_author") - CI_MAIL_RECIPIENTS+=("cc:llvm@lists.linux.dev") - ;; - *@tcwg_kernel/*:*) - CI_MAIL_RECIPIENTS+=("$notify_author") - CI_MAIL_RECIPIENTS+=("cc:linaro-toolchain@lists.linaro.org") - ;; - *@tcwg_bmk*/*_VECT*:*) - # Don't report regressions for vectorization, while we are - # debugging it. - ;; - *@tcwg_bmk_gnu*/*:*) -# CI_MAIL_RECIPIENTS+=("$notify_author") -# CI_MAIL_RECIPIENTS+=("cc:gcc-regression@gcc.gnu.org") - ;; - *@tcwg_bmk_llvm*/*:*) -# CI_MAIL_RECIPIENTS+=("$notify_author") -# CI_MAIL_RECIPIENTS+=("linaro-toolchain@lists.linaro.org") - ;; - *@*/*:*) - CI_MAIL_RECIPIENTS+=("linaro-toolchain@lists.linaro.org") - ;; - esac - - ( - IFS="," - cat > $artifacts/jenkins/mail-recipients.draft <<EOF -${CI_MAIL_RECIPIENTS[*]} -EOF - ) - - ( - for i in mail-recipients mail-subject mail-body; do - FIRST_BAD_ARTIFACTS=${BUILD_URL}artifact/$rel_artifacts/build-$first_bad - export FIRST_BAD_ARTIFACTS - LAST_GOOD_ARTIFACTS=${BUILD_URL}artifact/$rel_artifacts/build-$last_good - export LAST_GOOD_ARTIFACTS - BASELINE_ARTIFACTS=${BUILD_URL}artifact/$rel_artifacts/build-baseline - export BASELINE_ARTIFACTS - envsubst '$FIRST_BAD_ARTIFACTS $LAST_GOOD_ARTIFACTS $BASELINE_ARTIFACTS' \ - < $artifacts/jenkins/$i.draft > $artifacts/jenkins/$i.txt - done - ) -else - # Remove any fail-safe email stubs - echo > $artifacts/jenkins/mail-recipients.txt - echo > $artifacts/jenkins/mail-subject.txt - echo > $artifacts/jenkins/mail-body.txt fi trap "" EXIT |