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

nghttp2: Update to 1.47 #20381

Conversation

alessandrogario
Copy link
Contributor

@alessandrogario alessandrogario commented Mar 16, 2022

Commit Message: nghttp2: Update to 1.47
Fixes #20101

@repokitteh-read-only
Copy link

As a reminder, PRs marked as draft will not be automatically assigned reviewers,
or be handled by maintainer-oncall triage.

Please mark your PR as ready when you want it to be reviewed!

🐱

Caused by: #20381 was opened by alessandrogario.

see: more, trace.

@repokitteh-read-only repokitteh-read-only bot added the deps Approval required for changes to Envoy's external dependencies label Mar 16, 2022
@repokitteh-read-only
Copy link

CC @envoyproxy/dependency-shepherds: Your approval is needed for changes made to (bazel/.*repos.*\.bzl)|(bazel/dependency_imports\.bzl)|(api/bazel/.*\.bzl)|(.*/requirements\.txt)|(.*\.patch).
envoyproxy/dependency-shepherds assignee is @moderation

🐱

Caused by: #20381 was opened by alessandrogario.

see: more, trace.

@alessandrogario alessandrogario force-pushed the alessandro/feature/update-nghttp2-add-header-validation-option branch from f3a8e0b to 3d9048d Compare March 17, 2022 12:51
@phlax
Copy link
Member

phlax commented Mar 17, 2022

@alessandrogario this is failing general linting on the patch files (see https://dev.azure.com/cncf/envoy/_build/results?buildId=103969&view=logs&j=c5dd2866-6ab3-5f3c-3a44-4cef0ec909b5&t=a9eb66d6-8944-5769-b3f7-476949dadcb8&l=1223)

im thinking in this case we more want to exclude the patch files as they can correctly have the formatting that this checks for (trailing whitespace, mixed tabs/spaces, no newline)

ill fix the issue upstream to address

@phlax
Copy link
Member

phlax commented Mar 17, 2022

the other thing im wondering about is whether we could/should update nghttp2 at the same time (#20101)

@alessandrogario alessandrogario force-pushed the alessandro/feature/update-nghttp2-add-header-validation-option branch 2 times, most recently from ee70b47 to f8a6866 Compare March 17, 2022 17:09
@alessandrogario
Copy link
Contributor Author

the other thing im wondering about is whether we could/should update nghttp2 at the same time (#20101)

Hello @phlax! Would you like me to update the library too?

@alessandrogario alessandrogario marked this pull request as ready for review March 17, 2022 17:24
@phlax
Copy link
Member

phlax commented Mar 17, 2022

Would you like me to update the library too?

i reckon - it just means we wont have to redo the patches as quickly i think

@phlax
Copy link
Member

phlax commented Mar 17, 2022

seems like you fixed the patch matching anyhow - i raised a PR to improve the matcher here envoyproxy/toolshed#450 - but i wont land it if its not necessary i think

@yanavlasov yanavlasov self-assigned this Mar 17, 2022
@alessandrogario
Copy link
Contributor Author

seems like you fixed the patch matching anyhow - i raised a PR to improve the matcher here envoyproxy/pytooling#450 - but i wont land it if its not necessary i think

It seems like a good idea to fix it, so that we can use patch files with the correct file names (as generated by git format-patch). Thanks for looking into it!

@alessandrogario
Copy link
Contributor Author

alessandrogario commented Mar 18, 2022

Would you like me to update the library too?

i reckon - it just means we wont have to redo the patches as quickly i think

Hello @phlax!

I have updated the nghttp2 library and its patches, but I am now encountering an error with the //test/integration:h1_capture_persistent_fuzz_test test.

I have tried to reproduce it but tests are all failing when I try to run them locally through the CI scripts; what is the preferred way to run them on the development machine?

EDIT: I was able to run the test locally, and it seems to be passing. Is this caused by some kind of timeout on the CI?

$ bazel build //test/integration:h1_capture_persistent_fuzz_test
Starting local Bazel server and connecting to it...
INFO: Analyzed target //test/integration:h1_capture_persistent_fuzz_test (419 packages loaded, 19754 targets configured).
INFO: Found 1 target...
Target //test/integration:h1_capture_persistent_fuzz_test up-to-date:
  bazel-bin/test/integration/h1_capture_persistent_fuzz_test
INFO: Elapsed time: 763.736s, Critical Path: 72.86s
INFO: 2626 processes: 31 internal, 2595 linux-sandbox.
INFO: Build completed successfully, 2626 total actions

@yanavlasov
Copy link
Contributor

/retest

@repokitteh-read-only
Copy link

Retrying Azure Pipelines:
Retried failed jobs in: envoy-presubmit

🐱

Caused by: a #20381 (comment) was created by @yanavlasov.

see: more, trace.

@alessandrogario alessandrogario force-pushed the alessandro/feature/update-nghttp2-add-header-validation-option branch from f8a6866 to dfa0ab3 Compare March 18, 2022 14:37
@alessandrogario alessandrogario changed the title nghttp2: Update patches, add support for disabling header validation nghttp2: Update to 1.47, add support for disabling header validation Mar 18, 2022
Copy link
Contributor

@yanavlasov yanavlasov left a comment

Choose a reason for hiding this comment

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

/wait

source/common/http/http2/codec_impl.cc Outdated Show resolved Hide resolved
@alessandrogario alessandrogario force-pushed the alessandro/feature/update-nghttp2-add-header-validation-option branch from dfa0ab3 to 41fe4cb Compare March 21, 2022 21:10
@alessandrogario alessandrogario force-pushed the alessandro/feature/update-nghttp2-add-header-validation-option branch from 41fe4cb to 0d205be Compare March 22, 2022 12:27
@alyssawilk
Copy link
Contributor

Yeah, AFIK we're doing this for testing of UVH, but don't plan on using UHV in production until we switch to oghttp2 which will allow runtime disable of only header validation (not frame validation). So I think this is fine for an interim test-only solution especially if we comment what the long term plan is.
cc @yanavlasov for a second check

@alessandrogario
Copy link
Contributor Author

alessandrogario commented Apr 26, 2022

Yeah, AFIK we're doing this for testing of UVH, but don't plan on using UHV in production until we switch to oghttp2 which will allow runtime disable of only header validation (not frame validation). So I think this is fine for an interim test-only solution especially if we comment what the long term plan is. cc @yanavlasov for a second check

Thanks for the explanation! I'll keep removing all the failing/crashing tests with an #if !defined(ENVOY_ENABLE_UHV). Where possible, I'll try to just add a return statement to skip it

@alessandrogario
Copy link
Contributor Author

Yeah, AFIK we're doing this for testing of UVH, but don't plan on using UHV in production until we switch to oghttp2 which will allow runtime disable of only header validation (not frame validation). So I think this is fine for an interim test-only solution especially if we comment what the long term plan is. cc @yanavlasov for a second check

Thanks for the explanation! I'll keep removing all the failing/crashing tests with an #if !defined(ENVOY_ENABLE_UHV). Where possible, I'll try to just add a return statement to skip it

I am starting to hit additional problems outside the tests due to the additional things that NGHTTP2_OPTMASK_NO_HTTP_MESSAGING disables. The ConnectionManagerImpl class for example is now failing many asserts such as:

  // Verify header sanity checks which should have been performed by the codec.
  ASSERT(HeaderUtility::requestHeadersValid(*request_headers_).has_value() == false);

@alyssawilk
Copy link
Contributor

well if we're doing validation in Envoy we're going to want to not validate the codec is doing said validation. I think these are things that will just have to change as part of UHV :-)

Copy link
Contributor

@yanavlasov yanavlasov left a comment

Choose a reason for hiding this comment

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

Oh sorry, just realized compile_time_options build failed a bunch of tests. I think for now we can just put in the #ifdef to skip them. You can do in the SetUp() method for the test fixture class and add GTEST_SKIP(); if it fails all (or most) of the tests in the suite. The uring tests use similar method. As we add UHV we can re-enable these tests. For tests suites that fail just a few tests we can use the method suggested below with a function that causes tests to be skipped, so we do not loose too much coverage in the compilet_time_options build

Copy link
Contributor

@yanavlasov yanavlasov left a comment

Choose a reason for hiding this comment

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

/wait

test/common/http/http2/codec_impl_test.cc Outdated Show resolved Hide resolved
@yanavlasov
Copy link
Contributor

/wait

@alessandrogario alessandrogario marked this pull request as draft May 3, 2022 10:42
@alessandrogario alessandrogario force-pushed the alessandro/feature/update-nghttp2-add-header-validation-option branch from e1286ff to 2195167 Compare May 3, 2022 12:52
@phlax
Copy link
Member

phlax commented May 19, 2022

@alessandrogario looks like this needs a main merge - and a minor (trailing whitespace) formatting nit

copying out the ci advice

  Please fix your editor to ensure:

      - no trailing whitespace
      - no preceding mixed tabs/spaces
      - all files end with a newline

@alessandrogario
Copy link
Contributor Author

@alessandrogario looks like this needs a main merge - and a minor (trailing whitespace) formatting nit

copying out the ci advice

  Please fix your editor to ensure:

      - no trailing whitespace
      - no preceding mixed tabs/spaces
      - all files end with a newline

Hello @phlax! I think this PR can be closed, but waiting on @yanavlasov to make sure.

Signed-off-by: Alessandro Gario <alessandro.gario@gmail.com>
@alessandrogario alessandrogario force-pushed the alessandro/feature/update-nghttp2-add-header-validation-option branch from 2b89428 to 7bbdf76 Compare May 26, 2022 10:23
@alessandrogario alessandrogario changed the title nghttp2: Update to 1.47, add support for disabling header validation nghttp2: Update to 1.47 May 26, 2022
@alessandrogario
Copy link
Contributor Author

alessandrogario commented May 26, 2022

@alessandrogario looks like this needs a main merge - and a minor (trailing whitespace) formatting nit
copying out the ci advice

  Please fix your editor to ensure:

      - no trailing whitespace
      - no preceding mixed tabs/spaces
      - all files end with a newline

Hello @phlax! I think this PR can be closed, but waiting on @yanavlasov to make sure.

I think adding UHV here is no longer required (cc @yanavlasov), so the only commit left in the branch just updates the nghttp2 library to the latest version. Feel free to merge it if it is useful or close it otherwise

@alessandrogario alessandrogario marked this pull request as ready for review May 26, 2022 10:37
@phlax
Copy link
Member

phlax commented May 27, 2022

/retest

@repokitteh-read-only
Copy link

Retrying Azure Pipelines:
Retried failed jobs in: envoy-presubmit

🐱

Caused by: a #20381 (comment) was created by @phlax.

see: more, trace.

@phlax
Copy link
Member

phlax commented May 27, 2022

cc @moderation i think we can land this as it now only updates the nghttp2 lib and CI is green

@moderation
Copy link
Contributor

/lgtm deps

@repokitteh-read-only repokitteh-read-only bot removed the deps Approval required for changes to Envoy's external dependencies label May 27, 2022
Copy link
Member

@phlax phlax left a comment

Choose a reason for hiding this comment

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

lgtm, thanks @alessandrogario

@phlax phlax dismissed yanavlasov’s stale review May 27, 2022 13:19

Only nghttp2 update remains

@phlax phlax enabled auto-merge (squash) May 27, 2022 13:19
@phlax
Copy link
Member

phlax commented May 30, 2022

/retest

@phlax phlax merged commit 2608d13 into envoyproxy:main May 30, 2022
@alessandrogario alessandrogario deleted the alessandro/feature/update-nghttp2-add-header-validation-option branch May 30, 2022 14:06
Amila-Rukshan pushed a commit to Amila-Rukshan/envoy that referenced this pull request Jun 28, 2022
Signed-off-by: Alessandro Gario <alessandro.gario@gmail.com>
Signed-off-by: Amila Senadheera <amila.15@cse.mrt.ac.lk>
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.

Newer release available com_github_nghttp2_nghttp2: v1.47.0 (current: v1.46.0)
6 participants