FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

cluster: remove deprecated API by jasnell · Pull Request #13702 · nodejs/node · GitHub

/ node Public

cluster: remove deprecated API - #13702

Closed
jasnell wants to merge 3 commits into
nodejs:masterfrom
jasnell:remove-deprecated-api
Closed

cluster: remove deprecated API#13702
jasnell wants to merge 3 commits into
nodejs:masterfrom
jasnell:remove-deprecated-api

Conversation

jasnell commented Jun 15, 2017
edited
Loading

Copy link
Copy Markdown
Member

This is an alternative to #13684

  • The deprecation code is preserved and the messaging around the reasoning for the deprecation updated.
  • The change is split into multiple commits to allow easier backporting of selected changes (see cluster: update deprecated API #13704)
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)

cluster

jasnell added the semver-major PRs that contain breaking changes and should be released in the next major version. label Jun 15, 2017
jasnell added this to the 9.0.0 milestone Jun 15, 2017
vsemozhetbyt added the cluster Issues and PRs related to the cluster subsystem. label Jun 15, 2017
jasnell mentioned this pull request Jun 15, 2017
4 tasks
isaacs previously requested changes Jun 15, 2017

isaacs 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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

(I don't think I actually have blocking rights here, but I do have a change to request.)

Comment thread doc/api/deprecations.md 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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

If this word continues to appear in this file, it should have a content warning at the top, and/or a content warning and a click-through to view this section.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I'm fine with a content warning within this line item (where it's more likely to be seen when someone clicks through to find the information for the specific deprecation code. However, it would be helpful if you had a specific suggestion for the wording of such a warning.

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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Would it be possible to not include worker.suicide inside the error message but rather a reference to the documentation?

### DEP0007:  The api used is deprecated, please replace with worker.exitedAfterDisconnect. Please refer to documentation for more information.

In the extended documentation we could start with

Content warning: Self Harm.

Please click here to skip to the next entry.

We can then make "click here" an href to the next header

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

the name of the property is not included in the warning message that is printed to the console., it is included only in this one deprecations.md document. I'd rather not make it any more complicated than that.

isaacs Jun 20, 2017
edited
Loading

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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

This would be an improvement:

 <a id="DEP0007"></a>
 **Content Warning**: self harm.  [Click here to skip to the next entry.](#DEP00008)

-----

### DEP0007: Replace cluster worker.suicide with worker.exitedAfterDisconnect

A much better approach would add a CSS rule like this:

#DEP0007Content { visibility: hidden }
#DEP0007Content:target { visibility: visible }

and then

 <a id="DEP0007"></a>
 **Content Warning**: self harm.  [Click to show](#DEP0007Content)

<div id="DEP0007Content">
...

I realize this adds some complexity, but it's not like it's something we'll have to do very often, and it seems like a very reasonable cost for the benefit it provides.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Shoot. I just now saw this comment come through @isaacs .... of course it was immediately after landing. This specific additional change can be handled and discussed via a separate PR. Sorry about missing it.

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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

@jasnell No problem. Improvements can come iteratively :) Do you want me to take a crack at writing that update, or do you want to tackle it?

mcollina 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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

LGTM

Comment thread doc/api/deprecations.md 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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I disagree with giving sentimental assessment ("unfortunate") to the naming of the property here. It should be a purely technical explanation of the change.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

For that, I disagree. One thing we've have consistently needed to get better at is explaining why things are deprecated and removed.

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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I think you misunderstood. I'm not arguing against explaining why. My gripe is with the word "unfortunate" and the apologetic tone.

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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Regardless of how one feels about "unfortunate", I do think this text:

The naming of the property is unfortunate not only because it is not entirely accurate of the exit semantics, but also because of the potential emotional impact the word carries. In Node.js 6.0.0, the old property was deprecated and replaced with a new [worker.exitedAfterDisconnect][] property.

...would be better as:

In Node.js 6.0.0, the old property was deprecated and replaced with a new [worker.exitedAfterDisconnect][] property. The old property name was inaccurate and unnecessarily emotion-laden.

(If nothing else, please clean up the awkward "accurate of the exit semantics" phrase.)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I just updated the text but I like your suggestion here better @Trott

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Updated to use the suggested wording

jasnell force-pushed the remove-deprecated-api branch 2 times, most recently from 375600b to 9d10355 Compare June 15, 2017 21:28
Comment thread doc/api/deprecations.md 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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Minor nit: I don't think a property name can be "inaccurate", how about "misleading"?

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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I think inaccurate is preferable to misleading here.

"The name is inaccurate" doesn't seem to be...uh...inaccurate. :-D

"The name is misleading" seems a bit loaded and I think less accurate.

Other options, although I'm fine with inaccurate: imprecise, confusing, difficult to construe, easy to misunderstand

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Yeah, I'm not sure that misleading is any better. imprecise could work.

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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

My point is that the name of a property doesn't need to be 100% descriptive, it's usually kind of a mnemonic. In a sense, all property names are "imprecise" to some extent. In case of the property in question, the meaning of the word is quite different from the purpose of the property, which makes it easy to misinterpret/misremember.

refack Jun 20, 2017
edited
Loading

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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

inappropriate? Not appropriate for node in general & not an appropriate description of the status.
Or simply not good

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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

incomplete? inadequate?

Trott Jun 20, 2017
edited
Loading

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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

We could also just remove the inaccurate part entirely as it's not the primary reason for removal AFAICT.

If we want to get better at explaining why we removed something, as @jasnell implores us to do, being direct is probably best anyway:

The old property name was unnecessarily emotion-laden.

jasnell commented Jun 19, 2017

Copy link
Copy Markdown
Member Author

ping @nodejs/ctc

jasnell commented Jun 19, 2017

Copy link
Copy Markdown
Member Author

Given the sign off, I'd like to get this landed by tomorrow, but want to make sure there are no objections
@isaacs ... please see my response to your review here: #13702 (comment)

seishun commented Jun 20, 2017

Copy link
Copy Markdown
Contributor

@jasnell Could you give your opinion on my comment here?

jasnell force-pushed the remove-deprecated-api branch from 9d10355 to 6400a52 Compare June 20, 2017 16:11

jasnell commented Jun 20, 2017

Copy link
Copy Markdown
Member Author

@seishun @Trott ... I've updated the language in the docs a bit.

jasnell commented Jun 20, 2017

Copy link
Copy Markdown
Member Author

seishun commented Jun 20, 2017
edited
Loading

Copy link
Copy Markdown
Contributor

@jasnell Much better now, but I think "did not precisely describe the actual semantics" is an understatement: the actual semantics are pretty much the opposite of what people would expect. (see https://youtu.be/jJaIwea8r2A?t=422) Maybe replace "precisely" with "adequately", or drop it altogether?

Also, I don't think the word itself is emotion-laden. While it can affect people emotionally, it doesn't carry emotion on its own (unlike e.g. "tragedy"), it's just a plain term. Maybe something like "has unnecessary negative connotations" would be better?

Comment thread doc/api/deprecations.md
### DEP0007: Replace cluster worker.suicide with worker.exitedAfterDisconnect

Type: Runtime
Type: End-of-Life

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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Rather unfortunate terminology here, in context. I don't have a better suggestion though :\

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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

We could replace all instances of End-of-Life with Broken and/or Removed, that might be more accurate terminology anyway (but we can also keep that for a follow-up, that might be easier).

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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

This is a fixed term as defined in deprecations.md, so I don't think we want to change this.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I noted the irony also. To change this we would need a change to the deprecation policy as a whole, and the usage here is consistent with general usage in the industry. That's not to say it's particularly good, just that for now there isn't a better option.

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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

@tniessen I know, as I said I’m suggesting that we change the terminology, not this single instance.

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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

@addaleax We both wrote our comments within a minute, I did not see your comment until I had written mine, I was not responding to you ;)

jasnell commented Jun 20, 2017

Copy link
Copy Markdown
Member Author

CI is good. Only failure is unrelated.

jasnell commented Jun 20, 2017

Copy link
Copy Markdown
Member Author

CITGM: https://ci.nodejs.org/view/Node.js-citgm/job/citgm-smoker/882/

@nodejs/ctc ... I will be landing this shortly.

jasnell dismissed isaacs’s stale review June 20, 2017 18:48

Can address feedback separately once specific additional edits are suggested

jasnell added a commit that referenced this pull request Jun 20, 2017
PR-URL: #13702
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
jasnell added a commit that referenced this pull request Jun 20, 2017
PR-URL: #13702
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
jasnell added a commit that referenced this pull request Jun 20, 2017
PR-URL: #13702
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>

jasnell commented Jun 20, 2017

Copy link
Copy Markdown
Member Author

Landed in 3fab9f2, eaaec57, and 1fcb76e

jasnell closed this Jun 20, 2017

refack commented Jun 20, 2017

Copy link
Copy Markdown
Contributor

Landed in 3fab9f2, eaaec57, and 1fcb76e

Not a :tada moment so 💂‍♂️💂‍♂️💂‍♂️

Trott removed the ctc-review label Jun 25, 2017
tniessen added the deprecations Issues and PRs related to deprecations. label Sep 7, 2018
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cluster Issues and PRs related to the cluster subsystem. deprecations Issues and PRs related to deprecations. 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.


Back | FazBrowse Home | New Git URL