From ab992382bc08e8dcc4b3f262ef752affc0356031 Mon Sep 17 00:00:00 2001 From: David Santos Date: Wed, 8 Apr 2026 00:56:12 +0000 Subject: [PATCH] fix(deploy): restart Fastify API on webhook promote + git safe.directory BIT-1599 follow-up: recent-errors changes live in api/; restart bitreport-error-reporting-api.service alongside other units. Register ER_REPO_ROOT as a safe directory when root runs git against a tree owned by error-reporting (avoids dubious ownership failure on write-version-json / verify). Paperclip: BIT-1599 Made-with: Cursor --- deploy/lxc/webhook-deploy.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/deploy/lxc/webhook-deploy.sh b/deploy/lxc/webhook-deploy.sh index 71ca73b..17e17cf 100755 --- a/deploy/lxc/webhook-deploy.sh +++ b/deploy/lxc/webhook-deploy.sh @@ -17,6 +17,9 @@ set +a _ROOT="${ER_REPO_ROOT:?ER_REPO_ROOT must be set in ${_ENV_FILE}}" cd "${_ROOT}" +# Avoid `fatal: detected dubious ownership` when root runs git on a tree owned by error-reporting. +git config --global --add safe.directory "${_ROOT}" 2>/dev/null || true + # Match your deploy branch (repository uses master today). _DEPLOY_BRANCH="${ER_DEPLOY_BRANCH:-master}" git fetch origin "${_DEPLOY_BRANCH}" @@ -40,6 +43,7 @@ if [[ "${ER_WEBHOOK_RESTART_SERVICES:-1}" == "1" ]]; then systemctl restart bitreport-error-reporting-ingest-api.service systemctl restart bitreport-error-reporting-admin-ui.service systemctl restart bitreport-error-reporting-collector-worker.service + systemctl restart bitreport-error-reporting-api.service fi echo "webhook-deploy: done"