-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
feat: This upgrades the Sentry CLI to v3 #18510
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| /* eslint-disable no-console */ | ||
| const SentryCli = require('@sentry/cli'); | ||
| const { SentryCli } = require('@sentry/cli'); | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: The Remix createRelease.js script uses outdated Sentry CLI v3 API calls for creating releases and uploading source maps, which will cause runtime failures.
Severity: CRITICAL | Confidence: High
🔍 Detailed Analysis
The script packages/remix/scripts/createRelease.js was only partially migrated to support Sentry CLI v3. The call to sentry.releases.new(release) is incorrect, as the v3 API expects two arguments, like releases.new(release.name, {}). Additionally, the uploadSourceMaps() function is called with a live: 'rejectOnError' option, which was removed in v3. These outdated API calls, which contrast with the correctly updated react-router package in the same pull request, will cause the Remix release script to fail at runtime.
💡 Suggested Fix
Update packages/remix/scripts/createRelease.js to use the correct Sentry CLI v3 API. Change the sentry.releases.new(release) call to sentry.releases.new(release.name, {}). Remove the deprecated live: 'rejectOnError' option from the uploadSourceMaps() call, aligning the implementation with the react-router package.
🤖 Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.
Location: packages/remix/scripts/createRelease.js#L3
Potential issue: The script `packages/remix/scripts/createRelease.js` was only partially
migrated to support Sentry CLI v3. The call to `sentry.releases.new(release)` is
incorrect, as the v3 API expects two arguments, like `releases.new(release.name, {})`.
Additionally, the `uploadSourceMaps()` function is called with a `live: 'rejectOnError'`
option, which was removed in v3. These outdated API calls, which contrast with the
correctly updated `react-router` package in the same pull request, will cause the Remix
release script to fail at runtime.
Did we get this right? 👍 / 👎 to inform future reviews.
Reference ID: 7522976
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added // @ts-check in order to see the changes in the future
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Remix createRelease.js not updated for v3 API
The remix package import was updated to use the v3 named export, but the API calls were not updated to match the v3 signature. In handleOnBuildEnd.ts, releases.new() was updated to require a second parameter {} and the live: 'rejectOnError' option was removed from uploadSourceMaps. However, createRelease.js still uses sentry.releases.new(release) without the second parameter (line 28) and still passes live: 'rejectOnError' to uploadSourceMaps (line 35). This inconsistency may cause the remix sourcemaps upload functionality to break with Sentry CLI v3.
packages/remix/scripts/createRelease.js#L27-L28
sentry-javascript/packages/remix/scripts/createRelease.js
Lines 27 to 28 in dec11c9
| await sentry.releases.new(release); |
packages/remix/scripts/createRelease.js#L34-L35
sentry-javascript/packages/remix/scripts/createRelease.js
Lines 34 to 35 in dec11c9
| useArtifactBundle: !argv.disableDebugIds, | |
| live: 'rejectOnError', |
node-overhead report 🧳Note: This is a synthetic benchmark with a minimal express app and does not necessarily reflect the real-world performance impact in an application.
|
|
Put to draft since the self-hosted version might change |
|
Closed for the same reason as stated here: #18512 (comment) |
This upgrades the Sentry CLI to v3: https://github.com/getsentry/sentry-cli/releases/tag/3.0.0
With that we would only support self-hosted versions 25.11.1 and higher, so this might land in SDK v11.
Merge checks
Closes #18511 (added automatically)