fix: normalize underscore max old space flags#3540
fix: normalize underscore max old space flags#3540immanuwell wants to merge 1 commit intotriggerdotdev:mainfrom
Conversation
🦋 Changeset detectedLatest commit: 84e1bf6 The changes in this PR will be included in the next version bump. This PR includes changesets to release 29 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
WalkthroughThis PR updates the Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Hi @immanuwell, thanks for your interest in contributing! This project requires that pull request authors are vouched, and you are not in the list of vouched users. This PR will be closed automatically. See https://github.com/triggerdotdev/trigger.dev/blob/main/CONTRIBUTING.md for more details. |
Summary
Tiny papercut fix:
nodeOptionsWithMaxOldSpaceSize()now strips the Node-accepted--max_old_space_size=...form before adding its own heap flag.Without this, valid
NODE_OPTIONScan end up with two heap-size flags. Kinda sneaky, easy to miss.Related: #1897
Repro
node --max_old_space_size=64 -e "console.log('ok')"Node 20 accepts that flag. The old helper only removed
--max-old-space-size=..., so this input:turned into:
This is triggerable in practice: no cloud quota or hard ceiling blocks it, it is just a valid Node/V8 flag in
NODE_OPTIONS. The repo also uses this underscore form in the deploy image code, so yep, it is not just theory.Tests
pnpm --dir packages/core test src/v3/machines/max-old-space.test.ts --run pnpm --dir packages/core typecheck