-
Notifications
You must be signed in to change notification settings - Fork 75
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
codecov exits with status code 4 if NODE_OPTIONS is set #475
Comments
@gclements-chwy Thank you! This explains that exit code, was getting flustered trying to troubleshoot it. This can happen sometimes with the binary standalone on CircleCI as well. Not sure the fix there. |
Oh! 🤦♀️ I bet you and the other customer arerunningn the "small" size machine. Ok, now the fun part. How to fix this. (talking to myself , mostly) 🤔 |
were you able to reproduce the error going away when this was cleared? It looks like NODE_OPTIONS is empty, by default. |
@drazisil-codecov Yes, 100% an issue with NODE_OPTIONS set, 100% success after calling We are running a The fix may be to file a bug report with the I mostly filed this bug report so you could add a note to the README about clearing NODE_OPTIONS before invoking |
Got it! We'll see about adding a note (@thomasrockhu-codecov can you update the Orb?) Given I'm in sorta a deep dive about Node packing and compression and the like already I'll probably do some research on |
If I had to guess, I'd say it's trying to invoke a instance (vm?) with size max-old-space-size inside an instance with size Setting NODE_OPTIONS is probably not the issue. It's the |
Ah, yes. But what's stumping me is how that However, the Node.js memory garbage collection system appears very similar to Java's and is about as hard to understand :D I ran a stack trace on both "good" and "bad" runs https://gist.github.com/drazisil/a144573590501cd737bac3d436d7cec5
|
Oh, we set it. 😄 We set NODE_OPTIONS=--max-old-space-size=8192 as part of our build to give webpack more RAM than the default of 4GB for a node application IIRC. Makes builds a bit faster than glacial, and webpack is less likely to fall over because it ran out of RAM. |
Well, I feel much less confused now! 🎉 |
Perhaps the uploader could run in a step separate from the one wherein By the way, if you're shopping around for a faster bundler, check out Snowpack. |
I'm running into the same issue with travis. We also set
|
I can also confirm that unsetting NODE_OPTIONS fixes the issue in travis. |
You can. I don't know how to fix it on Travis though. Where would you have gone to troubleshoot this that we can document unsetting NODE_OPTIONS, since this is an unfixable issue with node/pkg itself? |
I'll unset NOTE_OPTIONS before calling the uploader. Thank you |
This uses a GH Action instead of bash script. The bash script has been deprecated. See https://github.com/codecov/codecov-action * Change our uploads by adding a flag for frontend or backend. * Only upload coverage of acceptance tests on backend changes (unsure how this will affect codecov for frontend only changes) This does *NOT* fix the spiky reporting of coverage (which I believe is due to flakey tests, eg, 3 of 4 test instances fail, but we still report 3 of them to codecov. Note, due to a [bug in codecov](codecov/uploader#475), we have to unset `NODE_OPTIONS`
This is a third-party issue. |
Describe the bug
The pkg node module has an issue where if NODE_OPTIONS is set to --max-old-space-size=8192 (it doesn't need to be 8192, the issues mentioned below use 4096) the application will exit with status 4. It's literally this line in the pkg code:
https://github.com/vercel/pkg/blob/5.3.3/prelude/bootstrap.js#L1789
No error messages are printed. The app built with pkg just exits. This issue: vercel/pkg#1194 and this one: vercel/pkg#1217 mention the problem with no resolution.
To Reproduce
In a shell:
The output from the echo will be 4.
Expected behavior
Program just runs
Screenshots
N/A
Additional context
The circleci orb should unset NODE_OPTIONS before invoking codecov
The text was updated successfully, but these errors were encountered: