From f09f2a70edb685bd3e91cbee82060ef0dfa52975 Mon Sep 17 00:00:00 2001 From: Vitaly Buka Date: Tue, 19 Nov 2024 18:32:57 -0800 Subject: [PATCH] Reapply "[sanitize] Skip build requests older than 3h" (#295) (#316) Buildbot is not ready yet https://github.com/llvm/llvm-zorg/issues/250#issuecomment-2485187944 This reverts commit 26a33cdbfaa6bbfc1feb1d76ce59fb727c072839. --- zorg/buildbot/builders/sanitizers/buildbot_functions.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/zorg/buildbot/builders/sanitizers/buildbot_functions.sh b/zorg/buildbot/builders/sanitizers/buildbot_functions.sh index 827323b28..13e110e69 100755 --- a/zorg/buildbot/builders/sanitizers/buildbot_functions.sh +++ b/zorg/buildbot/builders/sanitizers/buildbot_functions.sh @@ -144,6 +144,11 @@ function buildbot_update { git checkout -f "${BUILDBOT_REVISION}" git status git rev-list --pretty --max-count=1 HEAD + # FIXME: Workaround for https://github.com/llvm/llvm-zorg/issues/250 + [[ "${SKIP_OLD:-1}" == "0" ]] || [[ ! -v BUILDBOT_SCHEDULER ]] || [[ "${BUILDBOT_SCHEDULER}" == "force-build-scheduler" ]] || (git log -1 --after='3 hours ago' | grep .) || { + echo Revision is not recent enough + exit 1 + } ) || { build_exception ; exit 1 ; } LLVM=$ROOT/llvm-project/llvm fi @@ -204,7 +209,7 @@ function build_clang_at_release_tag { then echo "@@@BUILD_STEP using pre-built stage1 clang at r${host_clang_revision}@@@" else - BUILDBOT_MONO_REPO_PATH="" BUILDBOT_REVISION="${host_clang_revision}" buildbot_update + SKIP_OLD=0 BUILDBOT_MONO_REPO_PATH="" BUILDBOT_REVISION="${host_clang_revision}" buildbot_update rm -rf ${STAGE1_DIR} echo @@@BUILD_STEP build stage1 clang at $host_clang_revision@@@