#!/bin/bash # sparkyfitness's undo case on 9202. Its happy path ran FIRST (box/sparkyfitness/move.txt), so the app is on 18; # the undo case needs it on 15 again. Through the product only: remove (stop + remove with data), the DRILL # catalog put back at 15 (a revert commit in the drill repo — never the live catalog), a fresh install at 15, # seed + C1, the drill step put back, then undocase.py. Evidence: box/sparkyfitness/undo-*.txt. set -u cd "$(dirname "$0")" D=/mnt/5_hdd/felhom.eu/drill/app-catalog-drill L=../box/sparkyfitness/undo-setup.txt exec > >(tee -a "$L") 2>&1 echo "# $(date -u +%FT%TZ) sparkyfitness undo-case setup" python3 - <<'PY' import sys; sys.path.insert(0, '.') import walk as w w.login() w.remove("sparkyfitness") print("volumes left:", w.guest("docker volume ls -q | grep -i sparky || echo none").strip()) PY git -C $D pull -q --rebase origin main STEP=$(git -C $D log --format=%h -1 --grep='DRILL sparkyfitness: sparkyfitness-db postgres:15-alpine -> postgres:18-alpine') echo "drill step commit: $STEP" git -C $D revert --no-edit "$STEP" >/dev/null && git -C $D push -q origin main && git -C $D log --oneline -1 python3 -c " import sys; sys.path.insert(0,'.'); import walk as w; w.login(); print('sync_rescan', w.sync_rescan('sparkyfitness','postgres:15-alpine'))" timeout 1500 python3 boxmove.py prep sparkyfitness sparky 2>&1 | tail -8 REV=$(git -C $D log --format=%h -1) git -C $D revert --no-edit "$REV" >/dev/null && git -C $D push -q origin main && git -C $D log --oneline -1 python3 -c " import sys; sys.path.insert(0,'.'); import walk as w; w.login(); print('sync_rescan', w.sync_rescan('sparkyfitness','postgres:18-alpine'))" timeout 1500 python3 undocase.py sparkyfitness sparky sparkyfitness-db sparky sparkyfitness_db 2>&1 | grep -E 'RESULT|before:|after:|setup|control|phase \+' | cut -c1-200