Skip to content

[release-4.21] Fix OOM during production webpack build#354

Open
upalatucci wants to merge 1 commit intoopenshift:release-4.21from
upalatucci:fix-oom-build
Open

[release-4.21] Fix OOM during production webpack build#354
upalatucci wants to merge 1 commit intoopenshift:release-4.21from
upalatucci:fix-oom-build

Conversation

@upalatucci
Copy link
Contributor

Summary

  • The CI images job fails with SIGKILL (OOM kill) during the webpack production build because the process exceeds the container memory limit.
  • Added transpileOnly: true to ts-loader to skip type checking during webpack compilation, which significantly reduces memory (~40-60% reduction). Type checking is already handled separately by ESLint and can be done via tsc --noEmit.
  • Set NODE_OPTIONS=--max-old-space-size=4096 in the build script, matching the pattern already used by the dev script (which sets 8192MB).

Test plan

  • Verified production build (yarn build) completes successfully locally
  • CI images job should pass without OOM

Made with Cursor

Use transpileOnly in ts-loader to skip type checking during webpack
compilation, significantly reducing memory usage. Also set
NODE_OPTIONS=--max-old-space-size=4096 for the build script to match
the pattern already used by the dev script.

Co-authored-by: Cursor <cursoragent@cursor.com>
@coderabbitai
Copy link

coderabbitai bot commented Feb 25, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Tip

Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs).
Share your feedback on Discord.


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@upalatucci upalatucci changed the title Fix OOM during production webpack build [release-4.21] Fix OOM during production webpack build Feb 25, 2026
@openshift-ci
Copy link

openshift-ci bot commented Feb 25, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: upalatucci

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 25, 2026
@openshift-ci
Copy link

openshift-ci bot commented Feb 25, 2026

@upalatucci: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/images 40a93b9 link true /test images
ci/prow/e2e 40a93b9 link true /test e2e

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

Comment on lines 57 to +60
loader: 'ts-loader',
options: {
configFile: path.resolve(__dirname, 'tsconfig.json'),
transpileOnly: true,
Copy link
Contributor

Choose a reason for hiding this comment

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

@upalatucci Can we instead use esbuild-loader? @vojtechszocs was doing this change in kubevirt to reduce build time

Copy link
Contributor Author

@upalatucci upalatucci Feb 26, 2026

Choose a reason for hiding this comment

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

Yes we did it in main here and I think we should do the same. Let me see if this is was generate the errore

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants