From e18559b83cc3dd4fbd795de734935b2e5df1c624 Mon Sep 17 00:00:00 2001 From: Marc Mintel Date: Thu, 25 Jun 2026 22:32:14 +0200 Subject: [PATCH] fix: enforce deployment priorities and completely strip client sentry bundle --- .gitea/workflows/deploy.yml | 14 ++++++++++++++ instrumentation-client.ts | 4 ++-- next.config.mjs | 6 ++++++ 3 files changed, 22 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index d2ac2cbe1..14e962932 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -210,6 +210,13 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 + - name: 🚦 Priority Gate Check + env: + GITEA_PAT: ${{ secrets.GITEA_PAT }} + CURRENT_RUN_ID: ${{ github.run_id }} + CURRENT_TARGET: ${{ needs.prepare.outputs.target }} + run: bash scripts/priority-gate.sh + - name: 🔐 Registry Auth id: auth env: @@ -289,6 +296,13 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v4 + + - name: 🚦 Priority Gate Check + env: + GITEA_PAT: ${{ secrets.GITEA_PAT }} + CURRENT_RUN_ID: ${{ github.run_id }} + CURRENT_TARGET: ${{ needs.prepare.outputs.target }} + run: bash scripts/priority-gate.sh - name: 📝 Generate Environment shell: bash env: diff --git a/instrumentation-client.ts b/instrumentation-client.ts index cb479e76a..0d42652f6 100644 --- a/instrumentation-client.ts +++ b/instrumentation-client.ts @@ -1,5 +1,5 @@ // Sentry initialization move to GlitchtipErrorReportingService to allow lazy-loading // for PageSpeed 100 optimizations. This file is now empty to prevent the SDK // from being included in the initial JS bundle. -import * as Sentry from '@sentry/nextjs'; -export const onRouterTransitionStart = Sentry.captureRouterTransitionStart; + +export {}; diff --git a/next.config.mjs b/next.config.mjs index 08f71a6a9..20a56968a 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -46,6 +46,12 @@ const nextConfig = { env: { NEXT_PUBLIC_APP_VERSION: process.env.NEXT_PUBLIC_APP_VERSION || process.env.npm_package_version || 'dev', }, + sentry: { + disableClientWebpackPlugin: true, + autoInstrumentServerFunctions: false, + autoInstrumentMiddleware: false, + widenClientFileUpload: false, + }, // Prevent webpack from restarting when .env files are touched via Docker volume mount webpack: (config, { dev, isServer }) => { // Completely strip Next.js forced legacy polyfills for modern browser targets