Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Investigate workflow job failing on main: lint / Run ESLint #44425

Closed
github-actions bot opened this issue Jun 26, 2024 · 8 comments
Closed

Investigate workflow job failing on main: lint / Run ESLint #44425

github-actions bot opened this issue Jun 26, 2024 · 8 comments
Assignees

Comments

@github-actions
Copy link
Contributor

🚨 Failure Summary 🚨:

  • 📋 Job Name: lint / Run ESLint
  • 🔧 Failure in Workflow: Process new code merged to main
  • 🔗 Triggered by PR: PR Link
  • 👤 PR Author: @Krishna2323
  • 🤝 Merged by: @MonilBhavsar
  • 🐛 Error Message:
    failure: Process completed with exit code 134.

⚠️ Action Required ⚠️:

🛠️ A recent merge appears to have caused a failure in the job named lint / Run ESLint.
This issue has been automatically created and labeled with Workflow Failure for investigation.

👀 Please look into the following:

  1. Why the PR caused the job to fail?
  2. Address any underlying issues.

🐛 We appreciate your help in squashing this bug!

@MonilBhavsar
Copy link
Contributor

FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory
No lint issues

Screenshot 2024-06-26 at 6 34 36 PM

@blazejkustra
Copy link
Contributor

I'm able to reproduce this issue reliably on this PR but only locally @MonilBhavsar

@MonilBhavsar
Copy link
Contributor

yes, I can reproduce locally too. Had to manually increase the node memory.
This actions is also failing with the same error https://github.com/Expensify/App/actions/runs/9674218522/job/26689446781

@blazejkustra
Copy link
Contributor

I think we need to increase the node memory for now, I haven't found any other fixes as of now.

-    "lint": "eslint . --max-warnings=0 --cache --cache-location=node_modules/.cache/eslint",
+    "lint": "NODE_OPTIONS=--max_old_space_size=8192 eslint . --max-warnings=0 --cache --cache-location=node_modules/.cache/eslint",

@blazejkustra
Copy link
Contributor

This could be connected to these recent PRs:

@blazejkustra
Copy link
Contributor

Unfortunately ESLint can't be run in parallel (they even have a bounty for this 😅). Something that we could do going forward is to run many instances of ESLint at once for different parts of the project. That could help with the memory problem and speed up lint workflow.

@blazejkustra
Copy link
Contributor

blazejkustra commented Jun 26, 2024

Ultimately it would be awesome to find the root cause why it takes so much memory (if it's a memory leak or not). I tried to debug it today with:

DEBUG=typescript-eslint:* npm run lint
// and
DEBUG=* npm run lint
// and
TIMING=1 DEBUG=eslint:cli-engine npx --node-options='--max-old-space-size=8120' eslint --quiet .

Buut, these logs are very verbose and hard to get any useful information out of it unfortunately.

@MonilBhavsar MonilBhavsar reopened this Jun 27, 2024
@MonilBhavsar
Copy link
Contributor

Thank you for looking! 👍

@roryabraham was quick and increased the node memory https://github.com/Expensify/App/pull/44497/files ⚡ 😄
So we should be good here

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

No branches or pull requests

2 participants