fix(build): do not run the Sentry release upload as a root postbuild hook - #1464
Open
Chirag6722 wants to merge 1 commit into
Open
fix(build): do not run the Sentry release upload as a root postbuild hook#1464Chirag6722 wants to merge 1 commit into
Chirag6722 wants to merge 1 commit into
Conversation
…hook The root `postbuild` hook ran `sentry:sourcemaps` after every `bun run build`, so an ordinary build required Sentry credentials and tried to upload a root-level `dist/` directory that the Turbo build never produces. Drop the hook. `sentry:sourcemaps` stays as an explicit command, and apps/web already owns the deployment path for it via its own `sentry:sourcemaps` plus a `postdeploy` hook, so releases are unaffected. Fixes supermemoryai#1444
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1444.
The root
package.jsonhad:so every
bun run build— local or CI — chained a Sentry release creation and sourcemap upload onto the build. That needs deploy-only credentials to succeed, and it targets a rootdist/that the Turbo build doesn't produce (apps/webemits.next).Change
Remove the root
postbuildhook. Nothing else moves:sentry:sourcemapsstays at the root as an explicit, manually-invocable command.apps/webalready carries its own identicalsentry:sourcemapsplus"postdeploy": "bun run sentry:sourcemaps", which fires ondeploy, after the app build, which is where it belongs.That last point is why this is a safe deletion rather than a behaviour change: the root hook was a duplicate of the web app's, firing at build time instead of deploy time.
Acceptance criteria
bun run buildsucceeds withoutSENTRY_AUTH_TOKEN— verified:7 successful, 7 total, exit 0, with no Sentry configuration present.sentry-cliinvocation in the build output. (The[@sentry/nextjs]deprecation warnings that remain come from the Next.js build plugin, not the CLI upload.)apps/web'spostdeploy.I did not run the pre-change build to demonstrate the failure, because with credentials present that command creates a real release in the
supermemoryorg — not something to trigger from a contributor's machine.Left alone
#1444 also suggests correcting the
distpath /--strip-prefixand replacing the POSIX_SENTRY_RELEASE=$(...)syntax with something cross-platform. Both apply to theapps/webdeploy command and depend on how your deploy pipeline is wired, which I can't see from here — so this PR sticks to removing the hook. Happy to follow up on either if you say what the deployed output layout is.