fix(2): echo abra restore output (backupbot post-hook) into run log for diagnosis
This commit is contained in:
@ -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:
|
||||
|
||||
Reference in New Issue
Block a user