Skip to content

fix(core): remove unused getTerminalOutput from BatchProcess#34604

Merged
FrozenPandaz merged 2 commits intomasterfrom
nxc-3959
Feb 25, 2026
Merged

fix(core): remove unused getTerminalOutput from BatchProcess#34604
FrozenPandaz merged 2 commits intomasterfrom
nxc-3959

Conversation

@leosvelperez
Copy link
Copy Markdown
Member

Current Behavior

BatchProcess accumulates all stdout/stderr output in terminalOutputChunks and exposes it via getTerminalOutput(), but nothing ever calls getTerminalOutput(). The accumulated strings are unique allocations (created via chunk.toString()), not shared with the output callbacks or process.stdout.write.

For verbose batched tasks (e.g., Maven/Gradle with hundreds of tasks), this can hold tens to hundreds of MB for the entire batch duration.

Expected Behavior

Remove the dead accumulation code. stdout/stderr chunks are still forwarded to process.stdout/process.stderr and output callbacks as before — only the unused storage is removed.

@leosvelperez leosvelperez requested a review from a team as a code owner February 25, 2026 15:53
@netlify
Copy link
Copy Markdown

netlify bot commented Feb 25, 2026

Deploy Preview for nx-dev ready!

Name Link
🔨 Latest commit 8fb55d9
🔍 Latest deploy log https://app.netlify.com/projects/nx-dev/deploys/699f289537950b0008575f60
😎 Deploy Preview https://deploy-preview-34604--nx-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@nx-cloud
Copy link
Copy Markdown
Contributor

nx-cloud bot commented Feb 25, 2026

View your CI Pipeline Execution ↗ for commit 8fb55d9

Command Status Duration Result
nx affected --targets=lint,test,build,e2e,e2e-c... ✅ Succeeded 12m 7s View ↗
nx run-many -t check-imports check-lock-files c... ✅ Succeeded 3m 29s View ↗
nx-cloud record -- nx-cloud conformance:check ✅ Succeeded 8s View ↗
nx-cloud record -- nx format:check ✅ Succeeded 1s View ↗
nx-cloud record -- nx sync:check ✅ Succeeded <1s View ↗

☁️ Nx Cloud last updated this comment at 2026-02-25 17:08:15 UTC

@netlify
Copy link
Copy Markdown

netlify bot commented Feb 25, 2026

Deploy Preview for nx-docs ready!

Name Link
🔨 Latest commit 8fb55d9
🔍 Latest deploy log https://app.netlify.com/projects/nx-docs/deploys/699f289542174a0008fa0edd
😎 Deploy Preview https://deploy-preview-34604--nx-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@leosvelperez leosvelperez self-assigned this Feb 25, 2026
Copy link
Copy Markdown
Contributor

@nx-cloud nx-cloud bot left a comment

Choose a reason for hiding this comment

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

Nx Cloud has identified a flaky task in your failed CI:

🔂 Since the failure was identified as flaky, we triggered a CI rerun by adding an empty commit to this branch.

Nx Cloud View detailed reasoning in Nx Cloud ↗

🔔 Heads up, your workspace has pending recommendations ↗ to auto-apply fixes for similar failures.


🎓 Learn more about Self-Healing CI on nx.dev

@FrozenPandaz FrozenPandaz merged commit 872b9c9 into master Feb 25, 2026
23 checks passed
@FrozenPandaz FrozenPandaz deleted the nxc-3959 branch February 25, 2026 17:39
FrozenPandaz pushed a commit that referenced this pull request Feb 26, 2026
## Current Behavior

`BatchProcess` accumulates all stdout/stderr output in
`terminalOutputChunks` and exposes it via `getTerminalOutput()`, but
nothing ever calls `getTerminalOutput()`. The accumulated strings are
unique allocations (created via `chunk.toString()`), not shared with the
output callbacks or `process.stdout.write`.

For verbose batched tasks (e.g., Maven/Gradle with hundreds of tasks),
this can hold tens to hundreds of MB for the entire batch duration.

## Expected Behavior

Remove the dead accumulation code. stdout/stderr chunks are still
forwarded to `process.stdout`/`process.stderr` and output callbacks as
before — only the unused storage is removed.

---------

Co-authored-by: nx-cloud[bot] <71083854+nx-cloud[bot]@users.noreply.github.com>
(cherry picked from commit 872b9c9)
FrozenPandaz pushed a commit that referenced this pull request Feb 26, 2026
## Current Behavior

`BatchProcess` accumulates all stdout/stderr output in
`terminalOutputChunks` and exposes it via `getTerminalOutput()`, but
nothing ever calls `getTerminalOutput()`. The accumulated strings are
unique allocations (created via `chunk.toString()`), not shared with the
output callbacks or `process.stdout.write`.

For verbose batched tasks (e.g., Maven/Gradle with hundreds of tasks),
this can hold tens to hundreds of MB for the entire batch duration.

## Expected Behavior

Remove the dead accumulation code. stdout/stderr chunks are still
forwarded to `process.stdout`/`process.stderr` and output callbacks as
before — only the unused storage is removed.

---------

Co-authored-by: nx-cloud[bot] <71083854+nx-cloud[bot]@users.noreply.github.com>
(cherry picked from commit 872b9c9)
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 3, 2026

This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 3, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants