-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
test: added Ubuntu error code support to test-process-uid-gid.js #28219
Conversation
The change looks reasonable, other than failing linting (please run I'm a bit puzzled why we don't see this, I have developed on Ubuntu for years, and the test passes for me. I have a |
I built Node v12.4.0 from the source in a Dockerfile using a base image of ubuntu:bionic, which is Ubuntu 18.04.2. It very well could be an issue on my end because I'm pretty inexperienced with Docker and Node in general, but this was my only failing test |
I pushed a commit on top of yours to just use .code. I don't think the original .message string is possible, its not a current string. We never noticed it was wrong, I assume, because none of our ci machines or developers have this setup. Thanks. Lets see how it goes in ci. If you feel like rebasing this and squashing all three commits together with a new message, please do so, Otherwise, if you aren't comfortable enough with git to do that, I can do it when I land this. |
Thank you for the input. The original .message string confused me as well, but I assumed it was because the other contributor was running Ubuntu 16.04.1 and the message had changed in version 18.04.2. I agree the change to a .code check is the best move. This is my first time contributing to OSS on github and I have learned a lot. If you could squash the commits together, that would be great! Thanks |
When the 'nobody' user is missing use .code to detect this, its more robust than than the .message string. Refs: nodejs#19594
@nodejs/collaborators first time contribution, needs another review, please. |
Landed in e57bf47. Thanks for the contribution! 🎉 (If you're interested in other possible contributions to Node.js but don't have a good idea of where to start looking, some ideas are posted at https://www.nodetodo.org/next-steps/.) |
When the 'nobody' user is missing use .code to detect this, its more robust than than the .message string. Refs: nodejs#19594 PR-URL: nodejs#28219 Reviewed-By: Sam Roberts <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Yongsheng Zhang <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Yuta Hiroto <[email protected]> Reviewed-By: Anto Aravinth <[email protected]>
This comment has been minimized.
This comment has been minimized.
Ignore that last comment, it landed with author |
When the 'nobody' user is missing use .code to detect this, its more robust than than the .message string. Refs: #19594 PR-URL: #28219 Reviewed-By: Sam Roberts <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Yongsheng Zhang <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Yuta Hiroto <[email protected]> Reviewed-By: Anto Aravinth <[email protected]>
This change adds exception handling for the error code received when process.setgid('nobody') is called on Ubuntu, where the standard 'nobody' group from UNIX systems is named 'nogroup'. Coverage had previously been added for the error message, but with Ubuntu 18 this message has changed. Using the error code, which is intended to be unchanging, will hopefully prevent the need for updates in the future.
Refs: #19594
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes