Skip to content

ci(lint): give the ESLint pass an explicit 4 GB heap - #8092

Merged
cixzhang merged 1 commit into
meta:mainfrom
vjeux:ci/lint-eslint-heap
Oct 24, 2026
Merged

cixzhang merged 1 commit into
meta:mainfrom
vjeux:ci/lint-eslint-heap

Conversation

@vjeux

@vjeux vjeux commented Oct 24, 2026

Copy link
Copy Markdown
Contributor

Maintainer impact

The lint job intermittently dies with "JavaScript heap out of memory" (exit 134) in pnpm lint. Pull requests that add core source hit it (#8045, #8055, #8059, #8060, #8067), and a re-push can pass. Main runs at about 92% of the runner's default heap, so any growing pull request will start tripping it.

Intended invariant

No product, rule or lint-result change; only the Run ESLint step's Node heap limit is raised.

Change

.github/workflows/lint.yml, step Run ESLint: NODE_OPTIONS: '--max-old-space-size=4096', with a comment.

  • 2-core-ubuntu-arm has 8 GB of RAM (GitHub's larger-runner reference), and Node's default heap limit there is about 2 GB. The OOM log's last full collection held 1917 MB of 2006 MB committed.
  • At 4 GB the pass peaks at 3.3 GB RSS. The Sandbox build on this runner class already sets 8 GB.

Evidence

Full eslint . --cache from a fresh cache, Node 24, --trace-gc; peak heap is the largest heap at a full collection.

tree heap limit result peak heap full GCs peak RSS wall
main 2048 MB pass 1889 MB (2008 committed) 47 2.26 GB 2:27
#8067 2048 MB pass 1933 MB — 2.31 GB 2:31
#8060 2048 MB pass 1920 MB — 2.28 GB 2:29
main 3072 MB pass 2374 MB 22 2.80 GB 1:58
main 4096 MB pass 2907 MB 18 3.34 GB 1:59
  • Main's live set is under 2 GB; larger limits just let the heap grow.
  • Each of those pull requests adds 30–45 MB.
  • At 4 GB the pass is ~20% faster.

Where it goes, on main at 2048 MB:

  • packages/core/src alone peaks at 1869 MB; the rest of the repository at 1176 MB.
  • Core without its 550 test files peaks at 1605 MB, though they stay in the type-aware program (core's tsconfig includes all of src).

Follow-ups for maintainers, not part of this change:

  • Keep tests out of the type-aware program, with a lint-only tsconfig or type-aware rules on non-test files.
  • Splitting the pass saves little while typed core dominates.

Scope

  • No intended public API, product behavior, visual direction, or policy change.
  • Product changes discovered during the work were removed or split.
  • Public text and artifacts contain no internal Meta context.

Testing

The full lint pass needs about 1.9 GB of heap on main, almost all of it in
the type-aware pass over packages/core/src, and Node's default limit on
the 8 GB lint runner is about 2 GB. Pull requests that add a few percent
of source intermittently run it out of memory (exit 134). A 4 GB limit
keeps the pass under half the runner's RAM (3.3 GB peak RSS measured)
and spends less time in garbage collection.
@vercel

vercel Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
astryx Ready Ready Preview Oct 24, 2026 5:03am UTC

Request Review

@astracat-bot

astracat-bot Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Oct 24, 2026, 5:21 AM UTC

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Oct 24, 2026

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Recommended for approval: the 4 GB heap cap on the Run ESLint step keeps the required lint job, its routing and its findings unchanged, and this pull request's own lint run passed on the 2-core runner with the cap in place. The heap and memory figures in the new workflow comment hold up, so no changes are needed.

[Automated review]

@github-actions

Copy link
Copy Markdown
Contributor

PR Analysis Report

📚 Storybook Preview

View Storybook for this PR

🧪 Sandbox Preview

View Sandbox for this PR

No new or modified components detected.

Bundle Size Summary

No component packages changed.

Accessibility Audit

Status: No accessibility violations detected.

Visual Regression

46 of 494 shot(s) changed.

A change here is a question, not a failure: check whether the after is the
picture you intended. Record that review on the PR. Baseline maintenance is an
explicit dispatch of CI; this report never rewrites the baseline or adds a release gate.

component story theme mode pixels
Selector Indicator Space Bottom Sheet Narrow End RTL neutral light 753,933
Selector Indicator Space Bottom Sheet Wide Start neutral light 740,072
Chat Full AI Chat probe light 230,823
Chat Full AI Chat probe dark 229,805
RichTextEditor Markdown parity: side by side probe dark 94,866
RichTextEditor Markdown parity: side by side probe light 89,762
Collapsible Dividers probe dark 66,445
Collapsible Dividers probe light 66,445
Chat Default neutral dark 36,304
Chat Default neutral light 35,767
Chat Empty State probe light 23,531
Chat Empty State probe dark 22,622
ChatAutoScroll Scroll Behavior Comparison neutral dark 15,378
ChatAutoScroll Scroll Behavior Comparison neutral light 14,107
Chat With Attachments probe light 13,406
Chat With Attachments probe dark 11,232
ProgressBar With Target Mark probe dark 7,895
ProgressBar With Target Mark probe light 7,895
Markdown Default neutral dark 7,573
Markdown Default neutral light 7,566

and 26 more.


Generated by PR Enrichment workflow | Storybook | Sandbox | View full report

@cixzhang
cixzhang merged commit 770f5d3 into meta:main Oct 24, 2026
63 checks passed
@vjeux
vjeux deleted the ci/lint-eslint-heap branch October 24, 2026 13:34

This branch was successfully deployed

1 active deployment
Preview — 5375464c Deployed Oct 24, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants