Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34.2k
Defensive fix for process.config.variables regression (v5)#6115
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
Uh oh!
There was an error while loading. Please reload this page.
Conversation
jasnell commented Apr 8, 2016
The commit accidentally picked up the extraneous change to |
sneak commented Apr 8, 2016
Yeah, I've no idea where that came from. I didn't git rm anything and haven't touched that file. Shall I recreate the PR? |
jasnell commented Apr 8, 2016
It's an artifact of another update that happened previously where git is not acting nicely with a casing change on the filename. It pops up from time to time, especially when switching between the v4.x-staging and v5.x branches. The easiest thing to do would be to do a hard reset of your dev branch to nodejs/v5.x (e.g. |
sneak commented Apr 8, 2016
done/done. (without long lines 😉) |
jasnell commented Apr 8, 2016
Thank you! CI: https://ci.nodejs.org/job/node-test-pull-request/2220/ |
Fishrock123 commented Apr 8, 2016
Why is this directly landing against release branches and not landing is master? Also could we get some description as to how you do not have |
jasnell commented Apr 8, 2016
@Fishrock123 ... the offending section of code does not exist in |
sneak commented Apr 8, 2016
I don't know what part of the test stack of mocha/coffeescript/istanbul/supertest is mucking about with it, but the app (which I didn't write and haven't modified in a few months) worked fine on 4.2.3 and stopped on 4.2.4. This makes it work again. Further deponent sayeth not. It breaks with the released binaries - I am not building it myself (or, wasn't, until I had to apply this patch). The reason it's in the branches and not in master is because I haven't tested against master, and the part where the fix is applied doesn't seem to be be in master. Look; I'm just a user. I didn't want to spend my entire Thursday tracking down why a test suite on unmodified code worked in October and doesn't work in April on the same LTS runtime; but here we are. This makes it better. Ideally, things (i.e. new features) like FIPS support wouldn't be pushed into an LTS branch at all in the first place (which in my understanding is generally limited to backporting security or logic fixes). I'm just trying to get my work done; learning how you guys build and release software in your neck of the woods is out of scope. I can strip out code from the app in question to get it to a place I can share it, if you'd like. The relevant section of |
Fishrock123 commented Apr 8, 2016
@sneak Could you |
sneak commented Apr 8, 2016
I'm going to remove the proprietary stuff from the app to make a small reproducible test case I can share. It's something one of the testing libraries is doing, I'm sure, to check test coverage or parallelize instances of the app to run tests faster. I'll get you a reproduction. I'm sure it's something stupid being done in a library, but that's no reason to not program defensively in /lib. Not sure why the change is controversial, considering it fixes the problem - but you'll have your test case momentarily. |
jasnell commented Apr 8, 2016
The change isn't controversial as far as I'm concerned but if it is something that one of the downstream modules is doing it would be good to know. (In general, we don't support cases where a module mucks around with Node.js internals). In this particular case, however, given that it's caused by the addition of the additional FIPS check, it's something we should get fixed and this update does exactly that. |
sneak commented Apr 8, 2016
Ahh, one of the test fixtures in the app was overwriting process.config with a new object (using it as a global config structure for the app during testing). I didn't catch it during review before because I didn't know runtime levers were writable like that. I guess there was nothing important in there before the FIPS thing? The app passed all its tests for months. |
Fishrock123 commented Apr 8, 2016
Maybe we should consider freezing some of those objects, if that doesn't give much of a perf hit? |
jasnell commented Apr 8, 2016
I was just typing the same thing. process.config could (and likely should) be made read only. Or, perhaps we turn (It also looks like there's a slight error in the docs for process.config but that's not important here ;-) ...) |
jasnell commented Apr 20, 2016
Quick update on this: I'm working on getting #6266 landed in master. Once that's landed, I plan to backport it to v5 and v4 and refactor the parts inside |
MylesBorins commented Apr 20, 2016
@jasnell once that lands should we close this PR? |
jasnell commented Apr 20, 2016
No, let's keep this open until we can get the backport landed. |
MylesBorins commented Jul 5, 2016
As v5.x is now EOL I'm going to close this. Please feel free to let me know if this is not the right thing to do |
Updated defensive fix (v2 PR of #6110)
This is the 5.x PR, the 4.x one is here:
#6114
Discussion here:
#3755 (comment)