Skip to content

Conversation

@JPeer264
Copy link
Member

@JPeer264 JPeer264 commented Dec 9, 2025

(closes #18428)
(closes JS-1266)

This adds support for Node v24 in the prune script.

On top this also adds a test that is testing against the current Node version (as suggested in #14491 (review)). Since we have a matrix for our integration tests, this test would fail once we add Node v26 - where we are forced to update the ABI manually.

Theoretically we could also use node-abi, but decided against it to keep the dependencies low.

@linear
Copy link

linear bot commented Dec 9, 2025

18: '108',
20: '115',
22: '127',
24: '134',
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: The NODE_TO_ABI mapping for Node.js v24 is incorrect, using '134' instead of the stable '137' ABI version.
Severity: CRITICAL | Confidence: High

🔍 Detailed Analysis

The NODE_TO_ABI mapping at line 66 incorrectly hardcodes the ABI version for Node.js v24 as '134'. The actual stable release of Node.js 24.0.0 uses ABI version '137'. This discrepancy causes the prune() function to incorrectly filter binaries, leading to the deletion of correct profiler binaries (those with ABI 137) or failure to retain them. Consequently, the application will lack a compatible profiler binary at runtime, resulting in functional failures when attempting to load the native module.

💡 Suggested Fix

Update the NODE_TO_ABI mapping in packages/profiling-node/scripts/prune-profiler-binaries.js to set the ABI for Node.js v24 to '137' instead of '134'.

🤖 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/profiling-node/scripts/prune-profiler-binaries.js#L66

Potential issue: The `NODE_TO_ABI` mapping at line 66 incorrectly hardcodes the ABI
version for Node.js v24 as '134'. The actual stable release of Node.js 24.0.0 uses ABI
version '137'. This discrepancy causes the `prune()` function to incorrectly filter
binaries, leading to the deletion of correct profiler binaries (those with ABI 137) or
failure to retain them. Consequently, the application will lack a compatible profiler
binary at runtime, resulting in functional failures when attempting to load the native
module.

Did we get this right? 👍 / 👎 to inform future reviews.
Reference ID: 6493649

@JPeer264 JPeer264 merged commit 847daf0 into develop Dec 10, 2025
38 checks passed
@JPeer264 JPeer264 deleted the jp/add-more-profiling-support branch December 10, 2025 16:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

sentry-prune-profiler-binaries does not recognize NodeJS 24 as a valid major node version

3 participants