This is an automated email from the ASF dual-hosted git repository. aw pushed a commit to branch YETUS-1034-release in repository https://gitbox.apache.org/repos/asf/yetus.git
commit cbb4bb7ebe9124d6cbea308e4e918c5d51a3442f Author: Allen Wittenauer <[email protected]> AuthorDate: Fri Nov 13 07:26:20 2020 -0800 YETUS-1079. github-status-recovery is out of order (#200) Signed-off-by: Akira Ajisaka <[email protected]> --- precommit/src/main/shell/test-patch.d/github.sh | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/precommit/src/main/shell/test-patch.d/github.sh b/precommit/src/main/shell/test-patch.d/github.sh index 79fcbab..636bb59 100755 --- a/precommit/src/main/shell/test-patch.d/github.sh +++ b/precommit/src/main/shell/test-patch.d/github.sh @@ -963,6 +963,7 @@ function github_status_write mkdir -p "${recoverydir}" cp -p "${tempfile}" "${recoverydir}/${GITHUB_STATUS_RECOVERY_COUNTER}.json" ((GITHUB_STATUS_RECOVERY_COUNTER=GITHUB_STATUS_RECOVERY_COUNTER+1)) + echo "${RESULT}" > "${PATCH_DIR}/github-status-retry/finalresult.txt" fi fi return ${retval} @@ -988,6 +989,8 @@ function github_status_recovery return 0 fi + big_console_header "Attempting GitHub Status Recovery" + retrydir="${filename##*/github-status-retry/}" ghr=$(echo "${retrydir}" | cut -f1-2 -d/) GITHUB_REPO=${GITHUB_REPO:-${ghr}} @@ -1010,15 +1013,19 @@ function github_status_recovery return 1 fi - while read -r; do - github_status_write "${REPLY}" - retval=$? - done < <(find "${PATCH_DIR}/github-status-retry" -type f) + RESULT=$(cat "${PATCH_DIR}/github-status-retry/finalresult.txt") if [[ "${GITHUB_CHECK_ANNOTATIONS}" == true ]]; then bugsystem_linecomments_trigger fi + while read -r; do + github_status_write "${REPLY}" + retval=$? + done < <(find "${PATCH_DIR}/github-status-retry" -type f -name '*.json') + + github_end_checkrun "${RESULT}" + return ${retval} }
