Skip to content

dns, errors: Migrate to use internal/errors - #14212

Closed
starkwang wants to merge 1 commit into
nodejs:masterfrom
starkwang:dns-internal-errors
Closed

dns, errors: Migrate to use internal/errors#14212
starkwang wants to merge 1 commit into
nodejs:masterfrom
starkwang:dns-internal-errors

Conversation

@starkwang

@starkwangstarkwang commented Jul 13, 2017

Copy link
Copy Markdown
Contributor

Migrate dns errors to use internal/errors.

Ref: #11273

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines
Affected core subsystem(s)

dns, errors

@nodejs-github-botnodejs-github-bot added dns Issues and PRs related to the dns subsystem. errors Issues and PRs related to JavaScript errors originated in Node.js core. labels Jul 13, 2017
@starkwang
starkwangforce-pushed the dns-internal-errors branch from ebfd843 to be61d5dCompareJuly 13, 2017 06:08
Comment threaddoc/api/errors.md Outdated

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.

Perhaps ERR_DNS_SET_SERVERS_FAILED?

@jasnelljasnell 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.

Very close! thank for doing this. Left a comment I'd like to see addressed.

@starkwang
starkwangforce-pushed the dns-internal-errors branch 2 times, most recently from 1ae02d3 to 56d8131CompareJuly 18, 2017 07:59

@jasnelljasnell 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 CI is green.

@jasnelljasnell added the semver-major PRs that contain breaking changes and should be released in the next major version. label Jul 19, 2017

@XadillaXXadillaX left a comment

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.

LGTM

@XadillaX

Copy link
Copy Markdown
Contributor

@starkwang

starkwang commented Jul 22, 2017

Copy link
Copy Markdown
ContributorAuthor

One failure in CI looks unrelated.
https://ci.nodejs.org/job/node-test-binary-arm/RUN_SUBSET=0,label=pi1-raspbian-wheezy/9392/console

 ...
not ok 23 parallel/test-child-process-fork-exec-path
---
duration_ms: 8.891
severity: fail
stack: |-
...

@refackrefack left a comment

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.

Some nits

Comment threadlib/dns.js Outdated

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.

new indentation rule requires aligning to the call (
#14403

Comment threadlib/dns.js Outdated

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.

i

Comment threadlib/internal/errors.js Outdated

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.

probably better (err, servers) => `c-ares failed to set servers: "${err}" [${servers}]`

Comment threadtest/parallel/test-c-ares.js Outdated

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.

New feature of expectsError can be used without assert.throws:

common.expectsError(dns.resolve('www.google.com',val),{code: 'ERR_INVALID_OPT_VALUE',type: TypeError,message: `The value "${val}" is invalid for option "rrtype"`});

Comment threaddoc/api/errors.md Outdated

@refackrefackJul 24, 2017

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.

Used when `c-ares` failed to set the DNS servers.

@refack

Copy link
Copy Markdown
Contributor

@nodejs/ctc @fhinkel@mcollina@mhdawson

@starkwang
starkwangforce-pushed the dns-internal-errors branch from 56d8131 to 0653452CompareJuly 24, 2017 04:31
@starkwang

Copy link
Copy Markdown
ContributorAuthor

Pushed commit to address comments.

@mcollinamcollina 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

@refack

Copy link
Copy Markdown
Contributor

@refack

Copy link
Copy Markdown
Contributor

Landed in 9cb390d

@refackrefack closed this Jul 24, 2017
refack pushed a commit that referenced this pull request Jul 24, 2017
PR-URL: #14212
Refs: #11273
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Khaidi Chu <i@2333.moe>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dnsIssues and PRs related to the dns subsystem.errorsIssues and PRs related to JavaScript errors originated in Node.js core.semver-majorPRs 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.

6 participants

@starkwang@XadillaX@refack@mcollina@jasnell@nodejs-github-bot