-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
[8.x] Backport http2 changes from 10.x #22850
Conversation
Good work! I've tagged this as semver-minor because it adds a new feature to http as well. |
Very nice! Thank you for taking this on |
It actually looks like this already needs a rebase? :/ |
@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. |
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:
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. |
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. |
@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) |
@MylesBorins With the exception of adding the |
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 |
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:
|
Ping @nodejs/lts -- I think this is ready to move forward (let me know if you need anything from my end) |
The linter is failing, it seems to be this commit that is failing:
|
PR-URL: nodejs#19956 Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]>
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 <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: James M Snell <[email protected]>
Fixes: #21416 Backport-PR-URL: #22850 PR-URL: #22256 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: George Adams <[email protected]>
Refs: #19141 Backport-PR-URL: #22850 PR-URL: #22254 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: George Adams <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
Fixes: #19095 Backport-PR-URL: #22850 PR-URL: #22245 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]>
v8.x Backport Note: The timeout has been increased to 10ms. Fixes: #20079 Backport-PR-URL: #22850 PR-URL: #22252 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]>
We don't know what will return when successful or failure for the callback of the function. So this commit makes it more detailled. Backport-PR-URL: #22850 PR-URL: #22366 Refs: #22322 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]>
Remove `It is important to note that` and italics from `waitForTrailers` sentences. Backport-PR-URL: #22850 PR-URL: #22541 Reviewed-By: Vse Mozhet Byt <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
Fixes: #22268 Backport-PR-URL: #22850 PR-URL: #22486 Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: Matteo Collina <[email protected]>
Refs: https://github.com/nghttp2/nghttp2/releases/tag/v1.33.0 Backport-PR-URL: #22850 PR-URL: #22649 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]>
Refs: #22486 Backport-PR-URL: #22850 PR-URL: #22650 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Anatoli Papirovski <[email protected]> Reviewed-By: James M Snell <[email protected]>
New default timeout values of "2 minutes" were added into documentation inside 2 classes under "Event: 'timeout'": 1) Class: Http2SecureServer 2) Class: Http2Server New sections for `.setTimeout()` method were added inside `Http2SecureServer` & `Http2Server` docs. Backport-PR-URL: #22850 PR-URL: #22798 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]>
Indicates is the END_STREAM flag was set on the received HEADERS frame Backport-PR-URL: #22850 PR-URL: #22843 Fixes: #22497 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
Fixes: #22855 Backport-PR-URL: #22850 PR-URL: #22896 Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]>
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. Backport-PR-URL: #22850 PR-URL: #22956 Reviewed-By: Matteo Collina <[email protected]>
A push stream should have its writable side closed upon receipt, to avoid emitting the 'aborted' event when the readable side is closed. Backport-PR-URL: #22850 PR-URL: #22878 Fixes: #22851 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Matteo Collina <[email protected]>
Add a `Http2Session` event whenever a non-ack `PING` is received. Fixes: #18514 Backport-PR-URL: #22850 PR-URL: #23009 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Ujjwal Sharma <[email protected]> Reviewed-By: Anatoli Papirovski <[email protected]> Reviewed-By: Denys Otrishko <[email protected]>
In test-http2-session-timeout, setImmediate() is used to wrap makeReq(). makeReq() is asynchronous and setImmediate() is not necessary. Backport-PR-URL: #22850 PR-URL: #23058 Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: Sakthipriyan Vairamani <[email protected]>
In test-http2-session-timeout, provide the number of requests that occurred when the test fails. Backport-PR-URL: #22850 PR-URL: #23058 Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: Sakthipriyan Vairamani <[email protected]>
Backport-PR-URL: #22850 PR-URL: #22466 Reviewed-By: Gus Caplan <[email protected]> Reviewed-By: Tiancheng "Timothy" Gu <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Ali Ijaz Sheikh <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: Yuta Hiroto <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Сковорода Никита Андреевич <[email protected]> Reviewed-By: Anatoli Papirovski <[email protected]> Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
Landed on |
Notable changes: * **assert**: - backport some assert commits (Ruben Bridgewater) [#23223](#23223) * **deps**: - V8: cherry-pick 64-bit hash seed commits (Yang Guo) [#23274](#23274) * **http**: - added aborted property to request (Robert Nagy) [#20094](#20094) * **http2**: - backport http2 changes from 10.x (Kelvin Jin) [#22850](#22850) PR-URL: #23974
Not sure if this is the right place to post this; please redirect me if needed. |
@Flarna if you could open a new issue that documents how to recreate the observed behavior we can get to this ASAP |
@MylesBorins done: #24559 |
Correct sequence of emitting `error` and `close` events for a `Http2Stream`. PR-URL: #24789 Refs: #22850 Refs: #24685 Fixes: #24559 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]>
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), orvcbuild test
(Windows) passes