Skip to content

[8.x] Backport http2 changes from 10.x#22850

Closed
kjin wants to merge 67 commits intonodejs:v8.x-stagingfrom
kjin:o0003
Closed

[8.x] Backport http2 changes from 10.x#22850
kjin wants to merge 67 commits intonodejs:v8.x-stagingfrom
kjin:o0003

Conversation

@kjin
Copy link
Contributor

@kjin kjin commented Sep 13, 2018

This PR tracks an effort to backport new HTTP/2 features from 10.x. It's a work in progress, so this PR is currently more of an FYI and shouldn't really be reviewed (except if it's clear that a commit doesn't really belong).

Note that I have some intermediate commits that currently skip some tests.

Edit: See my comments below.

cc/ @ofrobots @apapirovski @nodejs/http2

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

@nodejs-github-bot nodejs-github-bot added lib / src Issues and PRs related to general changes in the lib or src directory. v8.x labels Sep 13, 2018
@mcollina mcollina added the semver-minor PRs that contain new features and should be released in the next minor version. label Sep 14, 2018
@mcollina
Copy link
Member

Good work! I've tagged this as semver-minor because it adds a new feature to http as well.

@jasnell
Copy link
Member

jasnell commented Sep 14, 2018

Very nice! Thank you for taking this on

@addaleax
Copy link
Member

It actually looks like this already needs a rebase? :/

@kjin
Copy link
Contributor Author

kjin commented Sep 15, 2018

@addaleax Yep, I will be doing the rebase in a bit. Note that the commits as of right now represent maybe 50% of the commits that will be part of this PR... more to come.

@kjin
Copy link
Contributor Author

kjin commented Sep 19, 2018

Update: I've backported commits that have to do with HTTP/2 all the way up to August 15. Based on how many come afterward I'm thinking of just opening a new PR for remaining commits.

I created list of commits based on any commit the all matched the following criteria:

  • Has not been backported to 8.x before, and associated PR does not have the do-not-backport-v8.x label
  • Is on the branch v10.x-staging (as of August 15)
  • Satisfies at least one of the following:
    • Touches files that match at least one of these globs: lib/internal/http2, doc/api/http2.md, test/**/test-http2-*, src/node_http2*
    • Has http2 in the commit name
    • Is from a PR with the http2 label

I removed commits that I believed were too broad to be applied to a PR based around just backporting http2, which resulted in (1) the commits in the PR, and (2) a smaller list of commits that I did not add to this PR but are worth noting. I grouped these commits below based on what I think should be backported together in follow-up PRs:

@addaleax, it seems like you are the author of the majority of these changes, so any advice you might have on how to proceed with these would be appreciated.

@kjin kjin changed the title [WIP] [8.x] Backport http2 changes from 10.x [8.x] Backport http2 changes from 10.x Sep 20, 2018
@kjin
Copy link
Contributor Author

kjin commented Sep 25, 2018

Ping @MylesBorins @addaleax @nodejs/http2 -- Since Node 10 will be going to LTS soon, I want to make sure we have enough time to react to any requested changes/future PRs.

@ofrobots ofrobots removed the wip Issues and PRs that are still a work in progress. label Sep 25, 2018
@MylesBorins
Copy link
Contributor

@kjin thanks for the hard work! We should plan for another 8.x semver minor to accommodate these changes. It looks like there are semver minor changes outside of http2, but if they scoped only to http2 we would be able to land as a semver-patch (as it is not stable in 8.x)

@kjin
Copy link
Contributor Author

kjin commented Sep 25, 2018

@MylesBorins With the exception of adding the ERR_TLS_RENEGOTIATE error, do you know what else would count as semver-minor that is outside of the H2 domain?

@MylesBorins
Copy link
Contributor

From a very quick look I'm thinking about #20094 which is a semver-minor which affects http.

TBH it probably doesn't make sense to just land those changes on http, we should eat the semver-minor on this

@MylesBorins
Copy link
Contributor

@kjin
Copy link
Contributor Author

kjin commented Oct 3, 2018

Update #2: I've added commits that were landed between 10.9 and 10.11. There were some in particular that I opted to change/skip, that might need additional attention:

I believe as it is, this PR passes tests. However, there are a few things I want to get confirmation for from these folks:

@addaleax
Copy link
Member

addaleax commented Oct 3, 2018

@kjin It’s okay not to backport 2a88731, yes

@kjin
Copy link
Contributor Author

kjin commented Oct 15, 2018

Ping @nodejs/lts -- I think this is ready to move forward (let me know if you need anything from my end)

@MylesBorins
Copy link
Contributor

@BethGriggs
Copy link
Member

The linter is failing, it seems to be this commit that is failing:

commit 019e127df96e2a53fa5830446a7c206a4eb3d4e1
Author: James M Snell <jasnell@gmail.com>
Date:   Sun Sep 16 19:13:11 2018 -0700

    http2: add origin frame support
    
    v8.x Backport Note -- as V8 doesn't expose an overload of String::WriteOneByte
    in Node 8 that accepts an isolate argument, the Origins constructor has been
    changed to not accept an isolate.
    
    PR-URL: https://github.com/nodejs/node/pull/22956
    Reviewed-By: Matteo Collina <matteo.collina@gmail.com>

jasnell and others added 2 commits October 16, 2018 09:19
PR-URL: nodejs#19956
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Explicitly added in the docs that the close event does not expect
any arguments when invoked.

Fixes: nodejs#20018

PR-URL: nodejs#20031
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@BethGriggs
Copy link
Member

Landed on v8.x-staging in fe3836a...18a2b3d

@BethGriggs BethGriggs mentioned this pull request Nov 20, 2018
@Flarna
Copy link
Member

Flarna commented Nov 21, 2018

Not sure if this is the right place to post this; please redirect me if needed.
I used 8.13.0 today and it seems that it behaves different compared to 10.12.0 regarding emitting error events.
e.g. if I pass a non existing file to respondWithFile() the error event is issued after the close event for 8.x; for 10.x error is emitted first.

@MylesBorins
Copy link
Contributor

@Flarna if you could open a new issue that documents how to recreate the observed behavior we can get to this ASAP

@Flarna
Copy link
Member

Flarna commented Nov 21, 2018

@MylesBorins done: #24559

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

Labels

lib / src Issues and PRs related to general changes in the lib or src directory. semver-minor PRs that contain new features and should be released in the next minor version.

Projects

None yet

Development

Successfully merging this pull request may close these issues.