From a2475416c9eb4d93db4d3bcbc25e73e7de535721 Mon Sep 17 00:00:00 2001 From: MickLesk <47820557+MickLesk@users.noreply.github.com> Date: Thu, 8 Oct 2026 09:47:00 +0200 Subject: [PATCH] BookOrbit: retry the client build when the bundler crashes Since rolldown 1.2.8, vite build dies at random with SIGSEGV or SIGBUS (rolldown#10860, closed upstream), which stopped the 3.3.0 update with exit 139 (#17753). Retry the client build up to three times before giving up. --- ct/bookorbit.sh | 7 ++++++- install/bookorbit-install.sh | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/ct/bookorbit.sh b/ct/bookorbit.sh index 500ae374d..9a12774f9 100644 --- a/ct/bookorbit.sh +++ b/ct/bookorbit.sh @@ -48,7 +48,12 @@ function update_script() { $STD corepack prepare "pnpm@${PNPM_VERSION}" --activate $STD pnpm install --frozen-lockfile - $STD pnpm --filter client run build-only + # vite's bundler (rolldown) crashes at random on some builds, rolldown#10860. + for attempt in 1 2 3; do + $STD pnpm --filter client run build-only && break + [[ $attempt -eq 3 ]] && { msg_error "Client build failed three times"; exit 1; } + msg_warn "Client build failed (attempt $attempt), retrying" + done $STD pnpm --filter server run build cp -r /opt/bookorbit/client/dist /opt/bookorbit/server/public mkdir -p /opt/bookorbit/server/migrations diff --git a/install/bookorbit-install.sh b/install/bookorbit-install.sh index 14e574fe1..074d23fdf 100644 --- a/install/bookorbit-install.sh +++ b/install/bookorbit-install.sh @@ -33,7 +33,12 @@ PNPM_VERSION=$(jq -r '.packageManager | ltrimstr("pnpm@")' /opt/bookorbit/packag $STD corepack prepare "pnpm@${PNPM_VERSION}" --activate $STD pnpm install --frozen-lockfile -$STD pnpm --filter client run build-only +# vite's bundler (rolldown) crashes at random on some builds, rolldown#10860. +for attempt in 1 2 3; do + $STD pnpm --filter client run build-only && break + [[ $attempt -eq 3 ]] && { msg_error "Client build failed three times"; exit 1; } + msg_warn "Client build failed (attempt $attempt), retrying" +done $STD pnpm --filter server run build cp -r /opt/bookorbit/client/dist /opt/bookorbit/server/public mkdir -p /opt/bookorbit/server/migrations