You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 298a673
Browse filesBrowse the repository at this point in the historyBrowse files
fix(node,vercel-edge,bundler-plugins): INC-2566 - Ignore commit env vars set to their own name (#25244)
Some builds have `VERCEL_GIT_COMMIT_SHA` set to the literal string
`VERCEL_GIT_COMMIT_SHA` instead of a SHA. Release auto-detection took
that value as the release name, so every build of the app uploaded its
source maps into, and reported events against, one release that never
changes.
This is not theoretical: Sentry has received source map uploads and
events whose release is the literal string `VERCEL_GIT_COMMIT_SHA` from
a number of organizations deploying on Vercel. Some were large enough to
contribute to [INC-2566](https://firetower.getsentry.net/INC-2566). How
those builds end up with that value is still being investigated;
getsentry/sentry#127101 logs the placeholder name at upload time to help
with that. This guard stops the value from becoming the release either
way.
Release detection in the bundler plugins and the Node and Vercel Edge
SDKs now skips a commit env var whose value is its own name, warns, and
moves on to the next candidate. Candidates are read in order and only
until one is found, so a placeholder is only warned about when it would
otherwise have become the release. In the bundler plugins, the Vercel
commit association in `setCommits` uses the same check, so a placeholder
SHA falls back to automatic commit association instead of being sent as
the commit.
Claude-Session: https://claude.ai/code/session_01WgDm3ijhQZQUHGAFFqQzKQ
Co-authored-by: Claude <noreply@anthropic.com>
// This runs before the plugin logger exists, so `silent: true` does not suppress it. That is
327
+
// deliberate: a warning that is easy to miss is how this misconfiguration went unnoticed.
328
+
// eslint-disable-next-line no-console
329
+
console.warn(
330
+
`[@sentry/bundler-plugins] Ignoring the ${name} environment variable as a release name, because its value is its own name. Set the release explicitly, or fix the variable in your build environment.`,
0 commit comments