-
Notifications
You must be signed in to change notification settings - Fork 29.7k
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
net: support passing undefined to listen() #14234
Conversation
@cjihrig What was happening is that |
@nodejs/lts PTAL, this is the LTS part of the fix for #14205 |
-1 / 0, | ||
].forEach(function(port) { | ||
assert.throws(function() { | ||
net.Server().listen({ port: port }, common.fail); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This first argument should be port
not an object.
|
||
net.Server().listen(true).on('error', common.mustCall(function(err) { | ||
assert.strictEqual(err.code, 'EACCES'); | ||
})); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fwiw, this can be simplified to ....
net.Server().listen(true).on('error', common.expectsError({ code: 'EACCES' }));
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
expectsError doesn't exist on 6.x, AFAICT
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah! heh... good point ;-)
a1bbca6
to
efa1a33
Compare
@nodejs/lts PTAL |
@sam-github is this semver-minor? I guess if it restores previous behaviour that was then broken it's a bugfix. |
Waiting on confirmation if this is a bugfix or not. It will likely not make the v6.11.2-rc today, but willing to roll it into the next rc later this week if it is indeed a patch |
@MylesBorins This is a bug fix, see #14205 (comment), I want to land, but do I need one approval, or two? @cjihrig is the domain expert here and approved it, maybe his LGTM is all I need? |
I agree with bug fix. |
8c378b6
to
6580202
Compare
For consistency with 4.x and 8.x. This commit also contains a forward port of #14232 to confirm that 4.x and 6.x behave identically with respect to the port argument. PR-URL: #14234 Refs: #14205 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Sam Roberts <[email protected]>
Landed in 0b17a45 |
For consistency with 4.x and 8.x. This commit also contains a forward port of #14232 to confirm that 4.x and 6.x behave identically with respect to the port argument. PR-URL: #14234 Refs: #14205 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Sam Roberts <[email protected]>
@sam-github This seems to be breaking windows CI so I'm backing it out of v6.11.2 for now edit: for clarity I'm keeping it on staging for now, please let me know if you can figure out why we are getting time outs |
For consistency with 4.x and 8.x. This commit also contains a forward port of #14232 to confirm that 4.x and 6.x behave identically with respect to the port argument. PR-URL: #14234 Refs: #14205 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Sam Roberts <[email protected]>
I'm backing this out of staging as the broken test is blocking CI on other PRS. @sam-github please reopen, rebase, and try to get this passing on windows. edit: here is a gist of the patch as you may have deleted the branch and links above could be removed in cache flush https://gist.github.com/MylesBorins/f5ab7d9a23126c13c36ead9b2fa64f92 |
ping @sam-github just a reminder this got backed out. I can't reopen this as you deleted your branch |
@MylesBorins restored branch, won't have time to look more at it until I'm back from vacation |
aaf4e13
to
31f572c
Compare
@nodejs/lts thoughts? |
Thoughts on what exactly? The test is still failing on Windows, correct? I'm good with this landing once that it resolved. |
39c381c
to
8c25a95
Compare
I'm baffled that this has windows specific behaviour, and I'm looking into it. starting with re-running ci: https://ci.nodejs.org/job/node-test-pull-request/10136/ |
I figured this out, it's because |
8c25a95
to
739a404
Compare
For consistency with 4.x and 8.x. This commit also contains a forward port of nodejs#14232 to confirm that 4.x and 6.x behave identically with respect to the port argument. PR-URL: nodejs#14234 Refs: nodejs#14205 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Sam Roberts <[email protected]>
d1a1331
to
e925c97
Compare
@MylesBorins last ci passed except for lint (fixed) and arm (probably broken), this should pass: |
landed in caeee38 |
For consistency with 4.x and 8.x. This commit also contains a forward port of #14232 to confirm that 4.x and 6.x behave identically with respect to the port argument. Backport-PR-URL: #14234 PR-URL: #14234 Refs: #14205 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Sam Roberts <[email protected]>
@cjihrig should we hold off on landing this until the bugs are all fixed in 8.x? |
Just reiterating from IRC. I believe this should stay in the release if everything is passing. The bugs on 8.x in question are slightly different (#14205 (comment)). |
Notable Changes: * net: - support passing undefined to listen() to match behavior in v4.x and v8.x (Sam Roberts) nodejs/node#14234 PR-URL: nodejs/node#15506
For consistency with 4.x and 8.x.
This commit also contains a forward port of
#14232 to confirm that 4.x and 6.x
behave identically with respect to the port argument.
Ref: #14205
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)