-
Notifications
You must be signed in to change notification settings - Fork 4.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
[http1] Refactor H/1 codec with a parser interface #15263
Conversation
Co-authored-by: Derek Argueta <darguetap@gmail.com> Signed-off-by: Asra Ali <asraa@google.com>
Signed-off-by: Asra Ali <asraa@google.com>
Signed-off-by: Asra Ali <asraa@google.com>
Thanks for getting this pushed Asra! 🚀 |
Signed-off-by: Asra Ali <asraa@google.com>
Signed-off-by: Asra Ali <asraa@google.com>
Signed-off-by: Asra Ali <asraa@google.com>
Signed-off-by: Asra Ali <asraa@google.com>
Signed-off-by: Asra Ali <asraa@google.com>
Signed-off-by: Asra Ali <asraa@google.com>
Signed-off-by: Asra Ali <asraa@google.com>
/wait |
Signed-off-by: Asra Ali <asraa@google.com>
Yay! Thanks Yan! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just skimmed through and looks great to me! Not sure if @alyssawilk wants to take a quick look or not.
Signed-off-by: Asra Ali <asraa@google.com>
ah k - so not a bug - i was going to open another flake issue - phew! |
ah, so verify examples failures should all merge main? Nice catch! |
Signed-off-by: Asra Ali <asraa@google.com>
Signed-off-by: Asra Ali <asraa@google.com>
I think this is a legit failure in grpc-bridge, trying to debug with running locally, but I'll need to rebuild the docker images that verify_examples uses -- just turning up trace logging to identify the issue doesn't work (and grpc-bridge doesn't have integration tests, but maybe that's the fastest way to repro outside of verify_examples) @phlax |
Signed-off-by: Asra Ali <asraa@google.com>
@asraa is only failing locally or in ci also ? |
I'm pretty sure it's local as well. I built my own envoy, spun up both proxies with the config, spun up the client and server, and ran the code, and couldn't get back the header per the example. I couldn't run with the artifact created in CI or just be running ./verify_examples so I'm not 100% sure if something else went wrong. |
the easier way to test an individual example/sandbox (eg grpc) is:
i would avoid the verify_examples.sh script |
not sure what the cause of the fail is @asraa - the fail is here it doesnt look like a flake |
Yeah, I agree -- I'm trying right now to fix up the ci/Dockerfile-envoy to grab my locally build binary and change the dockerfiles in grpc bridge to use my local one, turn up trace logging and check |
if you build the docker image with your binary and then set
as long as your docker image is correctly named it should use yours without attempting to pull the one from dockerhub |
Sounds good, I think that's what I have, I've built envoy (and su-exec) binary, moved it to build_envoy/envoy-binary, run and changed grpc-bridge/Dockerfile-(server/client) to pull Seems like envoy is starting up, but I get failures when sending the request:
|
Got it!! I followed the directs in examples/grpc-bridge to generate the stubs and bring everything up. I see the failure in the parser on an ASSERT. Thanks! (It's either a problem with the F_CHUNKED value or the presence of content length) Edit: got it, I reverted the check for all one bits to compare with ULLONG_MAX as before, my logic was wrong to check that. |
Great news that you figured this out. @asraa would you mind adding a dedicated test for whatever broke that doesn't depend on verify examples? /wait |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
Co-authored-by: Derek Argueta darguetap@gmail.com
Signed-off-by: Asra Ali asraa@google.com
Commit Message: Refactors the HTTP/1 codec to use an interface Parser. http_parser implements the Parser as the legacy parser (hard-coded in) to prepare for a new parser implementation with llhttp.
Risk Level: Medium. big refactor.
Testing: Unit and integration tests pass.
See #9033 for history.
Part of: #5155
Performance: there is a small performance degradation with the refactor https://gist.github.com/asraa/8babd3516acd447aa0f2ff5aa61d2e19
BTW on naming the methods.
onHeadersComplete()
,onMessageComplete()
are top-level virtual methods in the Parser. Server/Client specific sub-routings are calledonHeadersCompleteBase()