fix(node-core,vercel-edge): Use HEROKU_BUILD_COMMIT env var for default release#19617
Merged
andreiborza merged 1 commit intodevelopfrom Mar 4, 2026
Merged
fix(node-core,vercel-edge): Use HEROKU_BUILD_COMMIT env var for default release#19617andreiborza merged 1 commit intodevelopfrom
andreiborza merged 1 commit intodevelopfrom
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix prepared a fix for the issue found in the latest run.
- ✅ Fixed: Tests fail on CI due to pre-existing env vars
- Added vi.stubEnv('GITHUB_SHA', '') to all three tests to neutralize the higher-priority environment variable that would otherwise interfere with Heroku env var tests on CI.
Or push these changes by commenting:
@cursor push 7bf78a0a3a
Preview (7bf78a0a3a)
diff --git a/packages/node-core/test/sdk/getSentryRelease.test.ts b/packages/node-core/test/sdk/getSentryRelease.test.ts
--- a/packages/node-core/test/sdk/getSentryRelease.test.ts
+++ b/packages/node-core/test/sdk/getSentryRelease.test.ts
@@ -7,18 +7,21 @@
describe('getSentryRelease', () => {
it('uses HEROKU_BUILD_COMMIT env var', () => {
+ vi.stubEnv('GITHUB_SHA', '');
vi.stubEnv('HEROKU_BUILD_COMMIT', 'heroku-build-commit-sha');
expect(getSentryRelease()).toBe('heroku-build-commit-sha');
});
it('falls back to HEROKU_SLUG_COMMIT if HEROKU_BUILD_COMMIT is not set', () => {
+ vi.stubEnv('GITHUB_SHA', '');
vi.stubEnv('HEROKU_SLUG_COMMIT', 'heroku-slug-commit-sha');
expect(getSentryRelease()).toBe('heroku-slug-commit-sha');
});
it('prefers HEROKU_BUILD_COMMIT over HEROKU_SLUG_COMMIT', () => {
+ vi.stubEnv('GITHUB_SHA', '');
vi.stubEnv('HEROKU_BUILD_COMMIT', 'heroku-build-commit-sha');
vi.stubEnv('HEROKU_SLUG_COMMIT', 'heroku-slug-commit-sha');
Contributor
size-limit report 📦
|
Contributor
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.
|
…lt release Add HEROKU_BUILD_COMMIT as the primary env var for detecting the release on Heroku, keeping HEROKU_SLUG_COMMIT as a fallback since it is deprecated by Heroku. Closes: #19615 Agent transcript: https://claudescope.sentry.dev/share/w_FBx963Azo2_3JULQsv03PCYKpkBHg3NHWZaL6HiYU
0f60aad to
d9ce688
Compare
JPeer264
approved these changes
Mar 4, 2026
nicohrubec
approved these changes
Mar 4, 2026
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.

Add
HEROKU_BUILD_COMMITas the primary env var for detecting the release on Heroku, keepingHEROKU_SLUG_COMMITas a fallback since it is deprecated by Heroku.Closes: #19615