Reset reused watcher state before starting a new ATVM run
- update the watcher start helper to stop any stale watcher instance for the same requested parent build name and remove its old state directory before starting fresh - document that reused parent build names must not inherit stale cancelled, posted, state.json, or subruns state from older runs - update the watcher install and design docs so the controller workflow explicitly treats stale reused-build-name state as part of startup cleanup
This commit is contained in:
@@ -49,6 +49,8 @@ if [[ -z "$BUILD_NAME" ]]; then
|
||||
fi
|
||||
|
||||
RUN_DIR="${STATE_ROOT}/${BUILD_NAME}"
|
||||
systemctl stop "atvm-run-watcher@${BUILD_NAME}.service" >/dev/null 2>&1 || true
|
||||
rm -rf "$RUN_DIR"
|
||||
mkdir -p "$RUN_DIR"
|
||||
|
||||
cat >"${RUN_DIR}/watch.env" <<EOF
|
||||
|
||||
Reference in New Issue
Block a user