Skip to content

dns: remove dns.lookup and dnsPromises.lookup options type coercion - #41431

Merged
aduh95 merged 2 commits into
nodejs:masterfrom
aduh95:no-dns-lookup-options-type-coercion
Apr 12, 2022
Merged

aduh95 merged 2 commits into
nodejs:masterfrom
aduh95:no-dns-lookup-options-type-coercion

Conversation

@aduh95

@aduh95 aduh95 commented Jan 7, 2022

Copy link
Copy Markdown
Contributor

No description provided.

@aduh95 aduh95 added the semver-major PRs that contain breaking changes and should be released in the next major version. label Jan 7, 2022
@nodejs-github-bot

ghost commented Jan 7, 2022

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/net

@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. lib / src Issues and PRs involving general changes in the lib/ or src/ directories. needs-ci PRs that need a full CI run. labels Jan 7, 2022
Comment thread doc/api/deprecations.md Resolved
@aduh95
aduh95 force-pushed the no-dns-lookup-options-type-coercion branch from 740a691 to 8e53d29 Compare April 3, 2022 17:08
@aduh95 aduh95 added the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Apr 3, 2022
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Apr 3, 2022
@nodejs-github-bot

ghost commented Apr 3, 2022

Copy link
Copy Markdown
Collaborator

@aduh95
aduh95 force-pushed the no-dns-lookup-options-type-coercion branch from 8e53d29 to 13c8788 Compare April 3, 2022 19:39
@nodejs-github-bot

ghost commented Apr 3, 2022

Copy link
Copy Markdown
Collaborator

@aduh95

ghost commented Apr 3, 2022

Copy link
Copy Markdown
Contributor Author

@nodejs/tsc can we get this into v18.x?

ghost left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM if CITGM doesn't find problems.

Comment thread src/node_os.cc Outdated

ghost Apr 3, 2022

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm concerned about these two specific changes, moving from IPv4 to 4 and IPv6 to 6. I'm 100% sure those will break some of my modules (Fastify v4).

ghost Apr 3, 2022

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The reason for this change is that currently passing an address object to the DNS resolver, the 'IPv6' string is converted to 0.
Would it be reasonable to ask you to update the code that using that to expect one form or the other? Something like info.family === 6 || info.family === 'IPv6'? If not, we could make the DNS resolver accept a string and interpret 'IPv6' same as 6.

ghost Apr 25, 2022 •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume this change will hurt the community a lot.

I personally would see this:

If not, we could make the DNS resolver accept a string and interpret 'IPv6' same as 6.

as the better solution

ghost Apr 28, 2022

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed here. I realize that Node v18 was a major version change, but changing the output of a widely used API (socket.address()) just so another core-Node API could match up with it instead of making the DNS resolver more flexible seems pretty overkill!

ghost May 5, 2022

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now that it's out in the wild, can confirm it caused some widespread breaking for us that's going to make node 18 a pain and very uncertain to roll out.

ghost May 7, 2022

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume this change will hurt the community a lot.

Can confirm completely unexpected breakage

ghost May 7, 2022

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aduh95 @mcollina Any chance to think about that change again and consider alternatives?

ghost May 9, 2022

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe a new issue is more visible to the nodejs team and allows a better discussion ... so see #43014 ... Please "thumbs up" it if you support to adjust this to be backward compatible. Thank you

ghost left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@aduh95
aduh95 force-pushed the no-dns-lookup-options-type-coercion branch from 13c8788 to 84164de Compare April 4, 2022 13:31
@aduh95

ghost commented Apr 4, 2022

Copy link
Copy Markdown
Contributor Author

CITGM (master): https://ci.nodejs.org/view/Node.js-citgm/job/citgm-smoker/2904/
CITGM (aduh95:no-dns-lookup-options-type-coercion): https://ci.nodejs.org/view/Node.js-citgm/job/citgm-smoker/2905/

@mcollina mcollina added the notable-change PRs with changes that should be highlighted in changelogs. label Apr 4, 2022
@aduh95 aduh95 added request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. author ready PRs with CI started, the required approvals, and no outstanding review comments. labels Apr 6, 2022
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Apr 6, 2022
@nodejs-github-bot

ghost commented Apr 6, 2022

Copy link
Copy Markdown
Collaborator

@nodejs-github-bot

ghost commented Apr 8, 2022

Copy link
Copy Markdown
Collaborator

@richardlau

ghost commented Apr 8, 2022

Copy link
Copy Markdown
Member

@aduh95 If it helps the failures in the recent CI runs for this PR have all been running inside containers.

@nodejs-github-bot

ghost commented Apr 8, 2022

Copy link
Copy Markdown
Collaborator

@nodejs-github-bot

ghost commented Apr 8, 2022

Copy link
Copy Markdown
Collaborator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c++ Issues and PRs that require attention from people who are familiar with C++. commit-queue-rebase PRs the Commit Queue should land as multiple self-contained commits. lib / src Issues and PRs involving general changes in the lib/ or src/ directories. needs-ci PRs that need a full CI run. notable-change PRs with changes that should be highlighted in changelogs. semver-major PRs that contain breaking changes and should be released in the next major version.

Projects

None yet

Development

Successfully merging this pull request may close these issues.