From 2ec5b107ea66a505a9ac0bcebe8ba694cceddd91 Mon Sep 17 00:00:00 2001 From: neodk2004 Date: Fri, 14 Aug 2026 07:44:31 +0200 Subject: [PATCH] chore(deploy): quiet down Sentry build logging after root-causing the sourcemap failure Confirmed via extensive isolated reproduction (docker run, plain BuildKit RUN step, and Node child_process.spawn -- all three succeed) that TLS and the sentry-cli invocation itself are fine; GlitchTip's releases API rejects the authenticated request with "CSRF check Failed" (403) even with clean token auth and no cookies. That's a server-side GlitchTip issue (separate Docker stack), not something fixable from this repo. Keeping ca-certificates/SSL_CERT_FILE since they're correct regardless. --- docker/Dockerfile | 10 ++++------ next.config.ts | 12 ++++++------ 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 37411fc..0ce1845 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -16,15 +16,13 @@ WORKDIR /app # sentry-cli (invoked by withSentryConfig during `npm run build` to upload # source maps) is a Rust binary whose vendored OpenSSL doesn't reliably -# autodetect Alpine's CA bundle location, causing "unable to get local -# issuer certificate" against GlitchTip's TLS cert. Install the bundle and -# point SSL_CERT_FILE/SSL_CERT_DIR at it explicitly. +# autodetect Alpine's CA bundle location. Install the bundle and point +# SSL_CERT_FILE/SSL_CERT_DIR at it explicitly — cheap and correct regardless +# of the separate GlitchTip-side CSRF 403 that currently blocks the actual +# upload (see next.config.ts). RUN apk add --no-cache ca-certificates ENV SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt ENV SSL_CERT_DIR=/etc/ssl/certs -# Temporary — full sentry-cli request/response logging to diagnose the -# sourcemap upload failure. Remove once resolved. -ENV SENTRY_LOG_LEVEL=debug COPY --from=deps /app/node_modules ./node_modules COPY . . diff --git a/next.config.ts b/next.config.ts index f2106dc..cdcd9cd 100644 --- a/next.config.ts +++ b/next.config.ts @@ -44,12 +44,12 @@ export default withSentryConfig(withNextIntl(nextConfig), { org: process.env.SENTRY_ORG, project: process.env.SENTRY_PROJECT, authToken: process.env.SENTRY_AUTH_TOKEN, - // Temporarily verbose (was silent: true) — GlitchTip still shows minified - // stacktraces after the build-arg fix in b469389, so the next deploy needs - // to surface the upload plugin's actual log instead of swallowing it. - // Revert to silent: true once a successful upload is confirmed. - silent: false, - debug: true, + // Sourcemap upload currently fails against GlitchTip with a CSRF 403 on + // the releases API (confirmed server-side issue, not a build config + // problem — see commit history around 2026-08-14). Keeping silent so this + // known, non-fatal failure doesn't spam every build log; re-enable + // debug:true if investigating further. + silent: true, sourcemaps: { disable: !process.env.SENTRY_AUTH_TOKEN }, disableLogger: true, });