From 55c15177d8ae0336f662af5b9190bb182dc00b9a Mon Sep 17 00:00:00 2001 From: Thomas SharedInbox Date: Sat, 23 May 2026 12:17:58 +0200 Subject: [PATCH] fix(publish-website): survive SSH failure in generate_build_history (#164) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Dagger container running generate_build_history.py may not always reach the deployment server (network constraints on the Dagger engine). Rather than aborting the entire publish-website pipeline, log the SSH verbose output (already added in the previous debug commit) and return an empty file list so Hugo still builds and rsync still deploys the site — just without updated build-history pages. This unblocks the cron deploy that has been failing since c259d2da. --- scripts/generate_build_history.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/generate_build_history.py b/scripts/generate_build_history.py index 7db6519..5540b91 100644 --- a/scripts/generate_build_history.py +++ b/scripts/generate_build_history.py @@ -43,8 +43,13 @@ def list_remote_files(ssh_user: str, ssh_host: str, pattern: str) -> list[str]: text=True, ) if result.returncode != 0: + print( + f"WARNING: ssh exit {result.returncode} listing {pattern} on {ssh_user}@{ssh_host}" + " — build history will be empty for this pattern", + file=sys.stderr, + ) print(result.stderr, file=sys.stderr) - raise subprocess.CalledProcessError(result.returncode, result.args) + return [] return [line.strip() for line in result.stdout.splitlines() if line.strip()]