Skip to content
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

Add support for Node.js 10 #314

Merged
merged 5 commits into from
May 9, 2018
Merged

Add support for Node.js 10 #314

merged 5 commits into from
May 9, 2018

Conversation

watson
Copy link
Contributor

@watson watson commented Apr 25, 2018

Todo

  • Add Node.js 10 to CI test matrix
  • Fix errors uncovered by the tests

Closes #307

@watson watson requested a review from Qard April 25, 2018 08:20
@watson
Copy link
Contributor Author

watson commented Apr 25, 2018

@Qard Thought I'd just kick of this PR now that Node 10 is out. As our preliminary testing has shown, it will fail, but feel free to push commits to this PR to fix it if you get time.

There's a real chance that the errors are due to Node core using some internals that we can't get access to patch, in which case we have to either see if it can be fixed in Node core or we have do drop support for running it without AsyncHooks in Node 10 Update: seems like the issues are when we run with AsyncHooks - not without 😬

@watson
Copy link
Contributor Author

watson commented Apr 25, 2018

I changed the lint and code coverage tests to use the latest LTS release instead of 10, so that they don't fail just because the latest release have issues. Just so we don't waste time looking in the wrong places.

@Qard
Copy link
Contributor

Qard commented May 1, 2018

The hapi failure is a result of changes to promise hooks in V8, which result in broken continuation from async_hooks when an await occurs. The issue can be tracked here: nodejs/node#20274

@Qard
Copy link
Contributor

Qard commented May 1, 2018

@watson How do we want to handle landing this? Should we configure Node.js 10 to allow failures for now?

@watson
Copy link
Contributor Author

watson commented May 7, 2018

In any case we should probably update the Compatibility docs to mention the missing support.

How about adding this line:

screen shot 2018-05-07 at 19 54 07

@Qard
Copy link
Contributor

Qard commented May 7, 2018

It already states that async_hooks is experimental in the note below there. Perhaps we could just expand that with an additional sentence explaining that async/await in Node.js 10 has known issues?

@watson
Copy link
Contributor Author

watson commented May 7, 2018

I think it's better to have it in the list so it's not buried inside a paragraph. But I agree it could be more to the point. What do you think of this instead:


  • v10.x - Async/Await in Node.js 10 is currently buggy and can therefore not be instrumented properly (nodejs/node#20274)

@Qard
Copy link
Contributor

Qard commented May 7, 2018

Maybe replace "not be instrumented properly" with "not be supported" to make the intent clearer.

@@ -15,8 +15,9 @@ image::https://raw.githubusercontent.com/nodejs/Release/master/schedule.png[]
Some versions of Node.js contain bugs or issues that limit our ability to instrument them correctly.
The following versions of Node.js are known to not be fully instrumented:

- v8.0.x - Recommended solution: Upgrade to v8.2.0 or higher to get full support
- v10.x - Async/Await in Node.js 10 is currently buggy and can therefore not be supported (https://github.com/nodejs/node/issues/20274:[nodejs/node#20274])
Copy link
Contributor

Choose a reason for hiding this comment

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

nodejs/node#20516 is probably a better issue to point to.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

👍 updated

@@ -13,6 +13,9 @@ var semver = require('semver')
// hapi 17+ requires Node.js 8.9.0 or higher
if (semver.lt(process.version, '8.9.0') && semver.gte(pkg.version, '17.0.0')) process.exit()

// hapi does not work on Node.js 10 because of https://github.com/nodejs/node/issues/20274
Copy link
Contributor

Choose a reason for hiding this comment

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

Same as above.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

👍 updated

@alvarolobato alvarolobato added this to the 1.5 milestone May 8, 2018
@watson watson merged commit 50fa747 into elastic:master May 9, 2018
@watson watson deleted the node10 branch May 9, 2018 06:54
watson added a commit that referenced this pull request May 9, 2018
Until nodejs/node#20516 have been resolved,
we have disabled the hapi tests to make sure we still test as much as
possible on Node.js 10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants