fix(2): echo abra restore output (backupbot post-hook) into run log for diagnosis

This commit is contained in:
autonomic-bot
2026-05-30 23:37:55 +00:00
parent b2be04b138
commit 4a29ca6a55

View File

@ -188,7 +188,13 @@ def backup_create(domain: str, timeout: int = 900) -> str:
def restore(domain: str, timeout: int = 900) -> None:
_run_pty(["app", "restore", domain, "-n", "-C", "-o"], timeout=timeout)
# Echo the restore output (incl. backupbot's restore.post-hook stdout/stderr, e.g. a recipe's
# pg_backup.sh reimport) into the run log. Restore is otherwise opaque: a post-hook that fails or
# silently no-ops shows up only as a downstream data-integrity assertion RED with no cause. Bounded
# tail keeps it readable.
out = _run_pty(["app", "restore", domain, "-n", "-C", "-o"], timeout=timeout).stdout or ""
tail = out[-4000:]
print(f" [restore output]\n{tail}", flush=True)
def recipe_head_commit(recipe: str) -> str | None: