Perfect your code
With built-in code review tools, GitHub makes it easy to raise the quality bar before you ship. Join the 36 million developers who've merged over 200 million pull requests.
Sign up for free See pricing for teams and enterpriseschild_process: truncate output when maxBuffer is exceeded #24951
Conversation
This comment has been minimized.
This comment has been minimized.
nodejs-github-bot
added
the
child_process
label
Dec 11, 2018
Fishrock123
added
the
semver-minor
label
Dec 11, 2018
This comment has been minimized.
This comment has been minimized.
|
@Fishrock123 I would argue this is a kind of bug fix and we do not need the option for it. We could just run CITGM and see if anyone relies on this behavior but I actually doubt that a lot of code relies on the specific error code and that the output is empty in such a case. |
This comment has been minimized.
This comment has been minimized.
|
@nodejs/child_process, and also @nodejs/citgm I suppose. (Since there's no way I can decipher output even if I start a run...) |
This comment has been minimized.
This comment has been minimized.
|
I am happy to look into the CITGM result if you refactor the code / open an alternative one which adds the functionality without option. |
Fishrock123
force-pushed the
Fishrock123:child-process-exec-truncateMaxBuffer
branch
from
978d141
to
c059ef0
Dec 12, 2018
Fishrock123
removed
the
semver-minor
label
Dec 12, 2018
Fishrock123
force-pushed the
Fishrock123:child-process-exec-truncateMaxBuffer
branch
from
c059ef0
to
dfd1f12
Dec 12, 2018
Fishrock123
changed the title
child_process: add truncateMaxBuffer option to exec()
child_process: truncate output when maxBuffer is exceeded
Dec 12, 2018
This comment has been minimized.
This comment has been minimized.
|
@BridgeAR updated as per discussion CI: https://ci.nodejs.org/job/node-test-pull-request/19457/ |
BridgeAR
approved these changes
Dec 12, 2018
Fishrock123
force-pushed the
Fishrock123:child-process-exec-truncateMaxBuffer
branch
from
dfd1f12
to
31e35bd
Dec 12, 2018
addaleax
approved these changes
Dec 15, 2018
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Windows test failures look relevant. |
Trott
reviewed
Dec 15, 2018
|
Blocking on relevant CI failures on Windows. Feel free to dismiss once those are addressed. I'm just blocking to make sure no one accidentally lands this before it's fixed. |
This comment has been minimized.
This comment has been minimized.
|
🤨(wat.) (Why did 4 of the same test case run in anyways:
So.... on windows ( |
Fishrock123
force-pushed the
Fishrock123:child-process-exec-truncateMaxBuffer
branch
from
31e35bd
to
42db815
Dec 19, 2018
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Resume Build CI: https://ci.nodejs.org/job/node-test-pull-request/19672/ |
Fishrock123
added
the
author ready
label
Dec 19, 2018
Trott
dismissed
their
stale review
Dec 19, 2018
test no longer fails
This comment has been minimized.
This comment has been minimized.
|
No one has reviewed this since the last commit was pushed. @addaleax @BridgeAR Can you confirm that this still looks good to you? Anyone else want to review it? @nodejs/child_process @Fishrock123 Are you still in Camp "I Like To Land My Own PRs, Please Don't Land Them For Me, KThxBai"? Or have you moved over to Camp "Sure, Whatevs, Land My PRs If You Want, Save Me The Trouble, Kewl"? |
This comment has been minimized.
This comment has been minimized.
|
I would prefer to land them myself to avoid surprises. Anyways this should be ready to land? It's not clear to me if people are actually ok with this considering no one from the relevant domain has ever commented. |
This comment has been minimized.
This comment has been minimized.
Technically, yes, I believe so.
If you'd be more comfortable getting the approval of someone specific, please do, obviously. (As you know, GitHub notifications can be overwhelming so it's sometimes a good idea to ping folks via other channels.) |
addaleax
approved these changes
Jan 4, 2019
|
Yes, still LGTM |
Fishrock123
force-pushed the
Fishrock123:child-process-exec-truncateMaxBuffer
branch
from
42db815
to
3f6aebf
Jan 12, 2019
This comment has been minimized.
This comment has been minimized.
|
This comment has been minimized.
This comment has been minimized.
As always, some context would be helpful.
|
This comment has been minimized.
This comment has been minimized.
|
I am only noting that it happened. It is clearly unrelated. |
This comment has been minimized.
This comment has been minimized.
|
I don't know how to fix the CI here.... @Trott? Did I re-run this correctly? Do I still need to wait for something? |
This comment has been minimized.
This comment has been minimized.
|
Selecting "Resume Build" from the left-hand nav on the Resume Build: https://ci.nodejs.org/job/node-test-commit/25046/ I have a PR in to fix the flaky test. #25503 Feel free to upvote the request for fast-tracking. |
This comment has been minimized.
This comment has been minimized.
|
Resumed build: https://ci.nodejs.org/job/node-test-commit/25072/ |
This was referenced Jan 16, 2019
This comment has been minimized.
This comment has been minimized.
|
Now that the pesky queue microtask test is fixed, let's re-run CI. Not using "Resume Build" because that doesn't rebase against current master, so it won't get the fix. |
Fishrock123
added some commits
Dec 11, 2018
Fishrock123
force-pushed the
Fishrock123:child-process-exec-truncateMaxBuffer
branch
from
3f6aebf
to
2153075
Jan 23, 2019
This comment has been minimized.
This comment has been minimized.
|
Landed in b1a4e41...e47f972 |
Fishrock123 commentedDec 11, 2018
•
edited
Preserves truncated output for
child_process.exec()whenmaxBufferis exceeded.This is particularly useful for commands which have indistinguishable
error codes for what output they produce.
I am presently running into this and just vendoring
execwith a similar change into some code because... well, I need it, and don't want to re-write all ofexecby hand.Done as an added option / semver-minor because I want it sooner. IMO we should make this the default behavior but I think there's a chance something relies on the old behavior.Done as patch as per discussion.
The old behavior was also completely untested so... commit 1 fixes that.
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes