#Avoid creating new release
4 messages · Page 1 of 1 (latest)
Hi @visual karma. I'm happy to dig into this for you! I'll check my internal sources for answers to your question! :wave:
It appears you're experiencing an issue where releases are still being created automatically despite setting release: { create: false } in your Next.js project with Sentry integration.
This is a known behavior with the Next.js SDK. According to the documentation, there are a few things happening:
-
The Next.js SDK includes a Webpack plugin that automatically creates releases and uploads source maps during the build process. Even when you disable release creation with
release: { create: false }, other mechanisms might still be creating releases. -
As mentioned in a GitHub discussion, "The Next.js creates a release by itself" Releases are duplicated. This can happen independently of the GitHub Action or other release creation methods.
-
There's also a known issue where duplicate releases can be created if you set a release value in your Sentry initialization call while also using the Webpack plugin. According to Sentry's help documentation, "When using the Next.js SDK you should only provide your custom release value in your
next.config.jsfile" Why do I see duplicate or unknown releases?.
To fully prevent release creation, you might need to:
-
Make sure you set both
create: falseandfinalize: falsein your release configuration, as mentioned in a GitHub issue: "I also need to setrelease.finalize = falsebecause it was trying to finalize the release as well" Ability to disable SentryWebpackPlugin with @sentry/nextjs v8. -
Consider disabling Sentry completely in development environments:
Sentry.init({
enabled: process.env.NODE_ENV === 'production',
// other options
})
- You could also try setting a specific release name for development builds to avoid cluttering your production releases.