From 751e0ba5143643cf80ac0c43ef4b71e7515f0f3d Mon Sep 17 00:00:00 2001 From: "anthony.wen" Date: Fri, 27 Mar 2026 08:34:41 -0400 Subject: [PATCH] Clear stale runner logs before starting ATVM watcher - update the watcher start helper to remove the old /tmp/.log file before starting a fresh watcher instance for a reused build name - prevent the watcher from inheriting stale started_at timestamps from previous runs with the same build name and immediately exiting as HUNG - make reused-build watcher startup safer by resetting both watcher state and the matching temporary runner log --- atvm/watcher-service/start-atvm-run-watcher.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/atvm/watcher-service/start-atvm-run-watcher.sh b/atvm/watcher-service/start-atvm-run-watcher.sh index 5dcb41f..8092ad8 100644 --- a/atvm/watcher-service/start-atvm-run-watcher.sh +++ b/atvm/watcher-service/start-atvm-run-watcher.sh @@ -49,8 +49,10 @@ if [[ -z "$BUILD_NAME" ]]; then fi RUN_DIR="${STATE_ROOT}/${BUILD_NAME}" +RUN_LOG="/tmp/${BUILD_NAME}.log" systemctl stop "atvm-run-watcher@${BUILD_NAME}.service" >/dev/null 2>&1 || true rm -rf "$RUN_DIR" +rm -f "$RUN_LOG" mkdir -p "$RUN_DIR" cat >"${RUN_DIR}/watch.env" <