diff options
author | Maxim Kuvyrkov <maxim.kuvyrkov@linaro.org> | 2022-08-05 15:32:10 +0000 |
---|---|---|
committer | Maxim Kuvyrkov <maxim.kuvyrkov@linaro.org> | 2022-08-08 13:56:32 +0000 |
commit | 3b5333a1e4301cb21c5ef9df0dd6655c6004b454 (patch) | |
tree | d6cecb167e2bfa03a3f1acb62c625cb347445bf6 | |
parent | 964be8ef4558242af7a8f421970ade8fa7228b9d (diff) |
round-robin.sh: Rework handling of ${rr[update_baseline]}
* rename "update" to "onsuccess"
* rename "reset" to "force"
* merge "push" into "force"
Change-Id: I3e2f960f6aaf1215e1c035a706a6ba9a8fb4450b
-rwxr-xr-x | round-robin-bisect.sh | 9 | ||||
-rw-r--r-- | round-robin.sh | 39 | ||||
-rwxr-xr-x | tcwg_bmk-build.sh | 3 | ||||
-rwxr-xr-x | tcwg_gnu-build.sh | 7 | ||||
-rwxr-xr-x | tcwg_kernel-build.sh | 3 |
5 files changed, 27 insertions, 34 deletions
diff --git a/round-robin-bisect.sh b/round-robin-bisect.sh index bfa2c0df..6ba5af74 100755 --- a/round-robin-bisect.sh +++ b/round-robin-bisect.sh @@ -76,7 +76,7 @@ $build_script \ %% $rel_artifacts/manifests/build-baseline.sh \ @@ $rel_artifacts/manifests/build-parameters.sh \ ==rr[mode] build \ - ==rr[update_baseline] push \ + ==rr[update_baseline] force \ ==rr[top_artifacts] "$rel_artifacts/build-baseline" \ --verbose "$verbose" \ "${rebase_workaround_opts[@]}" @@ -200,6 +200,7 @@ $build_script \ %% $rel_artifacts/manifests/build-\$rev.sh \ @@ $rel_artifacts/manifests/build-parameters.sh \ ==rr[mode] bisect \ + ==rr[update_baseline] ignore \ ==rr[${current_project}_git] "$bad_url#\$rev" \ ==rr[top_artifacts] $rel_artifacts/build-\$rev \ --verbose "$verbose" & @@ -276,7 +277,7 @@ if [ x"$res" = x"0" ]; then sed -i -e "s/\$/-bad_rev-good/" $artifacts/jenkins/build-name cat >> $artifacts/trigger-build-rebase <<EOF linux_git=$bad_url#$baseline_rev -update_baseline=reset +update_baseline=force EOF else echo "WARNING: build for bad_rev $bad_rev succeeded" @@ -286,7 +287,7 @@ EOF case "${rr[ci_project]}/${rr[ci_config]}" in tcwg_bmk*/*-O[23]*) cat > $artifacts/trigger-build-reset <<EOF -update_baseline=reset +update_baseline=force EOF ;; esac @@ -634,7 +635,7 @@ if [ x"$reset_rev" != x"" ]; then \ # regressions (worse than $bad_rev). cp $artifacts/build-$reset_rev/trigger-build-$current_project \ $artifacts/trigger-build-1-reset - echo "update_baseline=reset" >> $artifacts/trigger-build-1-reset + echo "update_baseline=force" >> $artifacts/trigger-build-1-reset fi # Trigger master build now instead of waiting for next timed SCM trigger. diff --git a/round-robin.sh b/round-robin.sh index b040e483..ab7b10bb 100644 --- a/round-robin.sh +++ b/round-robin.sh @@ -26,18 +26,15 @@ declare -gA rr #rr[mode]="$mode" # How to handle baseline: -# - init: use "empty" results for base-artifacts, which will make current -# build successful. Push our artifacts as the one and only entry. -# - update: update baseline branches of base-artifacts and components' repos +# - onsuccess: update baseline branches of base-artifacts and components' repos # on success (generate trigger files for bisection on failure). -# - reset: ignore failures in check_regression(), which will make current +# - force: ignore failures in check_regression(), which will make current # build successful. Push our artifacts to the top of base-artifacts/. -# - push: push results from current build (whatever they are, regressions are -# ignored) as new commit to base-artifacts, and update baseline -# branches. This is useful for user projects, e.g., to generate -# historical results for several toolchain versions. +# - init: use "empty" results for base-artifacts, which will make current +# build successful. Push our artifacts as the one and only entry. # - ignore: Do not affect baseline. Useful for developer testing. -#rr[update_baseline]=update/reset/init/push/ignore +#rr[update_baseline]=onsuccess/force/init/ignore + # Target architecture to build for: arm or aarch64. #rr[target]="$target" @@ -118,7 +115,7 @@ reset_artifacts () $run_step_artifacts/console.log \ "$run_step_top_artifacts/jenkins/*" - if [ ${rr[update_baseline]} = "update" ] && + if [ ${rr[update_baseline]} = "onsuccess" ] && [ x"$(git ls-remote --heads https://git-us.linaro.org/toolchain/ci/base-artifacts.git refs/heads/${rr[baseline_branch]})" = x ]; then echo "WARNING: BASELINE IS NOT FOUND; INITIALIZING BASELINE" rr[update_baseline]="init" @@ -602,7 +599,6 @@ EOF } # Check if current build regressed compared to the baseline -# (unless ${rr[update_baseline]} is set to "reset"). check_regression () { ( @@ -653,13 +649,14 @@ check_regression () single_component=$(print_single_updated_component) local trigger_dest - if [ x"${rr[update_baseline]}" = x"update" ]; then - # When "updating" baseline place trigger-* files at top level + if [ x"${rr[update_baseline]}" = x"onsuccess" ]; then + # We are seeing a failure, so instead of updating baseline start + # reducing/bisecting the failure. Create trigger-* files at top level # where jenkins expects them -- and trigger the followup builds. trigger_dest="${rr[top_artifacts]}" else - # We don't want to trigger follow up builds when "pushing" - # baseline. So, for the record, place trigger-* files in + # We don't want to trigger follow up builds when forcing + # the baseline. So, for the record, place trigger-* files in # the step's artifacts directory. trigger_dest="$run_step_artifacts" fi @@ -749,8 +746,8 @@ EOF ) fi - if [ x"${rr[update_baseline]}" = x"update" ]; then - echo "Detected a regression in \"update\" mode!" + if [ x"${rr[update_baseline]}" = x"onsuccess" ]; then + echo "Detected a regression!" false else # Compare results to generate logs and other artifacts, @@ -772,10 +769,8 @@ update_baseline () return elif [ x"${rr[update_baseline]}" = x"init" ]; then amend="--amend" - elif [ x"${rr[update_baseline]}" = x"push" ]; then - : else - # ${rr[update_baseline]} == update, reset + # ${rr[update_baseline]} == onsuccess, force local prev_head="" # We discard baseline entries for results worse or same than @@ -792,7 +787,7 @@ update_baseline () # For every regression we want to keep artifacts for the first-bad # build, so reset to the most relevant regression (marked by reset-baseline). if [ -f base-artifacts/reset-baseline ] \ - && [ x"${rr[update_baseline]}" = x"update" ]; then + && [ x"${rr[update_baseline]}" = x"onsuccess" ]; then prev_head=$(git -C base-artifacts rev-parse HEAD) fi git -C base-artifacts reset --hard HEAD^ @@ -827,7 +822,7 @@ update_baseline () local msg_title="$rev_count: ${rr[update_baseline]}" - if [ x"${rr[update_baseline]}" = x"reset" ]; then + if [ x"${rr[update_baseline]}" = x"force" ]; then # Create a marker for builds that reset baselines (these are builds # for bisected regressions). touch base-artifacts/reset-baseline diff --git a/tcwg_bmk-build.sh b/tcwg_bmk-build.sh index 14089db3..30c4a409 100755 --- a/tcwg_bmk-build.sh +++ b/tcwg_bmk-build.sh @@ -19,7 +19,7 @@ rr[mode]="${rr[mode]-build}" # Set custom revision for one of the projects, and use baseline revisions # for all other projects. rr[baseline_branch]="${rr[baseline_branch]-linaro-local/ci/${rr[ci_project]}/${rr[ci_config]}}" -rr[update_baseline]="${rr[update_baseline]-update}" +rr[update_baseline]="${rr[update_baseline]-ignore}" rr[top_artifacts]="${rr[top_artifacts]-$(pwd)/artifacts}" # Set metric to perf by default. @@ -149,7 +149,6 @@ case "${rr[mode]}" in "Invalid single updated component \"$single_updated_component\"" false ;; esac - default_finish_at="check_regression" ;; esac if [ x"$start_at" = x"default" ]; then diff --git a/tcwg_gnu-build.sh b/tcwg_gnu-build.sh index b879137e..2241f437 100755 --- a/tcwg_gnu-build.sh +++ b/tcwg_gnu-build.sh @@ -19,7 +19,7 @@ rr[mode]="${rr[mode]-build}" # Set custom revision for one of the projects, and use baseline revisions # for all other projects. rr[baseline_branch]="${rr[baseline_branch]-linaro-local/ci/${rr[ci_project]}/${rr[ci_config]}}" -rr[update_baseline]="${rr[update_baseline]-update}" +rr[update_baseline]="${rr[update_baseline]-ignore}" rr[top_artifacts]="${rr[top_artifacts]-$(pwd)/artifacts}" # Resolve top_artifacts to absolute dir because some of the subsequent @@ -91,7 +91,6 @@ case "${rr[mode]}" in qemu:*) default_start_at="build_abe-qemu" ;; *) assert_with_msg "Trying to bisecting unknown component: $(print_single_updated_component)" false ;; esac - default_finish_at="check_regression" ;; esac if [ x"$start_at" = x"default" ]; then @@ -131,13 +130,13 @@ no_regression_p () local ignore_ERRORs_opt="" if [ ${#runtestflags[@]} != 0 ] \ || { [ x"${rr[mode]}" = x"build" ] \ - && [ x"${rr[update_baseline]}" = x"push" ]; }; then + && [ x"${rr[update_baseline]}" = x"force" ]; }; then # We are running a subset of the testsuite, which might generate # ERRORs in GCC testsuites that will have no tests to run -- # ignore these ERRORs, because they are unstable from run to run. # # Also, we must ignore ERRORs during bisection baseline runs - # (rr[mode]=build, rr[update_baseline]=push) so that ERRORs + # (rr[mode]=build, rr[update_baseline]=force) so that ERRORs # don't creep into automatically-generated flaky XFAILs. ignore_ERRORs_opt="--ignore_ERRORs" echo "NOT COMPARING PARTIAL RESULTS" \ diff --git a/tcwg_kernel-build.sh b/tcwg_kernel-build.sh index 4b44b5b3..43a3722b 100755 --- a/tcwg_kernel-build.sh +++ b/tcwg_kernel-build.sh @@ -20,7 +20,7 @@ rr[mode]="${rr[mode]-build}" # for all other projects. rr[ci_project]="${rr[ci_project]-tcwg_kernel}" rr[baseline_branch]="${rr[baseline_branch]-linaro-local/ci/${rr[ci_project]}/${rr[ci_config]}}" -rr[update_baseline]="${rr[update_baseline]-update}" +rr[update_baseline]="${rr[update_baseline]-ignore}" rr[top_artifacts]="${rr[top_artifacts]-$(pwd)/artifacts}" # {toolchain_name}-{toolchain_ver}-{target}-{linux}-{linux_config} @@ -67,7 +67,6 @@ case "${rr[mode]}" in qemu) default_start_at="build_abe-qemu" ;; *) assert false ;; esac - default_finish_at="check_regression" ;; esac if [ x"$start_at" = x"default" ]; then |