ci: bump Node heap to 4 GB for sdk-generation pyright step#43
Merged
Conversation
The Generate workflow has been OOM-crashing on the v2025-11-15 SDKs: FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory Diagnosis (run 26171584374): - Speakeasy CLI's Compile SDK step invokes `uv run python -m pyright` on each generated SDK. - Pyright is a Node.js application. On the v2025-11-15 embedded SDK, pyright's peak RSS is ~3.77 GB (measured locally). - The Generate runner's default Node max-old-space-size is ~2 GB, so pyright OOMs before completing. Reproduced locally: NODE_OPTIONS=--max-old-space-size=2048 → identical OOM NODE_OPTIONS=--max-old-space-size=4096 → pyright passes (0 errors) Pass NODE_OPTIONS via `cli_environment_variables` (the `Gusto/sdk-generation-action` reusable workflow propagates these into the Speakeasy CLI's process env, which pyright inherits via uv → python → node).
8aef283 to
f804dd3
Compare
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.
Summary
The Generate workflow has been OOM-crashing on the v2025-11-15 SDKs (see run #26171584374):
```
FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
```
Plumbs `NODE_OPTIONS=--max-old-space-size=4096` through to the Speakeasy CLI's process env via the reusable workflow's `cli_environment_variables` input.
Diagnosis
Local repro
Locally pyright on `gusto_embedded_v_2025_11_15` uses 3.77 GB. Constraining Node to the runner's default heap reproduces the exact CI error:
```
$ NODE_OPTIONS=--max-old-space-size=2048 uv run python -m pyright src/gusto_embedded_v_2025_11_15
FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory
```
Bumping to 4 GB clears it:
```
$ NODE_OPTIONS=--max-old-space-size=4096 uv run python -m pyright src/gusto_embedded_v_2025_11_15
0 errors, 0 warnings, 0 informations
```
Test plan
🤖 Generated with Claude Code