Skip to content

ci: bump Node heap to 4 GB for sdk-generation pyright step#43

Merged
azrosen92 merged 1 commit into
mainfrom
fix/sdk-gen-node-heap
May 21, 2026
Merged

ci: bump Node heap to 4 GB for sdk-generation pyright step#43
azrosen92 merged 1 commit into
mainfrom
fix/sdk-gen-node-heap

Conversation

@azrosen92
Copy link
Copy Markdown
Collaborator

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

  • The 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.

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

  • Trigger the Generate workflow on this branch and confirm the Compile SDK step passes for both `gusto_embedded_v_2025_11_15` and `gusto_app_int_v_2025_11_15`
  • Confirm the scheduled cron run on `main` after merge still succeeds

🤖 Generated with Claude Code

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).
@azrosen92 azrosen92 force-pushed the fix/sdk-gen-node-heap branch from 8aef283 to f804dd3 Compare May 20, 2026 20:18
@azrosen92 azrosen92 requested a review from a team May 21, 2026 13:59
Copy link
Copy Markdown
Contributor

@satanas satanas left a comment

Choose a reason for hiding this comment

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

🚢

@azrosen92 azrosen92 merged commit c2616e2 into main May 21, 2026
13 checks passed
@azrosen92 azrosen92 deleted the fix/sdk-gen-node-heap branch May 21, 2026 15:06
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.

2 participants