Skip to content

Added HTTP/2 support in conformance test roundtripper #1983

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

Closed
wants to merge 1 commit into from
Closed

Added HTTP/2 support in conformance test roundtripper #1983

wants to merge 1 commit into from

Conversation

ibilalkayy
Copy link
Contributor

@ibilalkayy ibilalkayy commented Apr 30, 2023

What type of PR is this?

/kind feature
/area conformance

What this PR does / why we need it:

This PR adds support for HTTP/2 in the conformance test roundtripper package. The changes include updating the Request struct in roundtripper.go to include an HTTP2Transport field and modifying the defaultTransport function in roundtripper.go to create an HTTP/2 transport if required, using the http2.ConfigureTransport function from the golang.org/x/net/http2 package.

These changes will enable users to set the HTTP2Transport field when creating a Request in the conformance test, allowing for HTTP/2 support. This addition helps overcome the limitation of just using HTTP/1 in the conformance test, especially when the upstream backend host might only support HTTP/2.

Which issue(s) this PR fixes:

Fixes #1982

Does this PR introduce a user-facing change?:

Added support for HTTP/2 in the conformance test roundtripper package.

@k8s-ci-robot k8s-ci-robot added kind/feature Categorizes issue or PR as related to a new feature. area/conformance-test Issues or PRs related to Conformance tests. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Apr 30, 2023
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: ibilalkayy
Once this PR has been reviewed and has the lgtm label, please assign dcbw for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Apr 30, 2023
@k8s-ci-robot
Copy link
Contributor

Hi @ibilalkayy. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@ibilalkayy ibilalkayy changed the title Add HTTP/2 support in conformance test roundtripper Added HTTP/2 support in conformance test roundtripper Apr 30, 2023
Copy link
Member

@sunjayBhatia sunjayBhatia left a comment

Choose a reason for hiding this comment

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

not really a comment on the exact content of the change, but should we err on the side of adding these sorts of changes along with the tests that need them? I don't think there are any such conformance tests that test HTTP/2 backend capabilities at the moment

@robscott
Copy link
Member

robscott commented May 1, 2023

Agree with @sunjayBhatia here, this would be best to save until we have test(s) that need this. @ibilalkayy was there a specific test you were hoping this would enable?

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 1, 2023
@k8s-ci-robot
Copy link
Contributor

PR needs rebase.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@gauravkghildiyal
Copy link
Member

Unless, I'm missing something, I believe one can already achieve the requirements of the issue. Refer comment #1982 (comment)

Please correct me if I misunderstood something.

@sunjayBhatia
Copy link
Member

Unless, I'm missing something, I believe one can already achieve the requirements of the issue. Refer comment #1982 (comment)

Please correct me if I misunderstood something.

All the existing conformance tests use a known backend that is deployed as part of the tests (the ingress-conformance echo server) so there isn't anything in the tests I'm aware of that an HTTP/2 backend is relevant for yet (the still-draft conformance tests for gRPC route look like they will have their own gRPC echo server but will use a gRPC client)

Copy link

@pramodrj07 pramodrj07 left a comment

Choose a reason for hiding this comment

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

LGTM. I was thinking of passing the client. But this seems like a better solution.

@aojea
Copy link
Contributor

aojea commented May 1, 2023

gRPC echo server but will use a gRPC client

just important note for e2e tests and something that is a terrible headache is that grpc uses http2 under the hood https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md, so the only way to differentiate between http2 and grpc at the transport level is by checking the "content-type" header that should begin with "application/grpc"

@pramodrj07
Copy link

t to save until we have test(s) that need thi

We are using conformance tests to test specific scenarios where we need http2 support. Currently we have a wrapper around the existing round tripper. But this native support will be much helpful going forward.

@sunjayBhatia - Agree to your point on non-existence of any http2 related conformance test at the moment. Going forward do you see any support for http2 support in the near future?

@sunjayBhatia
Copy link
Member

@sunjayBhatia - Agree to your point on non-existence of any http2 related conformance test at the moment. Going forward do you see any support for http2 support in the near future?

The outcome of this GEP should lead to some conformance tests being developed: #1979

@shaneutt
Copy link
Member

shaneutt commented Aug 2, 2023

As this PR hasn't received an update in some time, and needs some conflict resolution I'm going to mark this as "draft" for the time being as this helps us to better organize our reviews. Please let us know if you're blocked!

@shaneutt shaneutt marked this pull request as draft August 2, 2023 14:58
@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Aug 2, 2023
@ibilalkayy ibilalkayy closed this by deleting the head repository Nov 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/conformance-test Issues or PRs related to Conformance tests. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. kind/feature Categorizes issue or PR as related to a new feature. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Request for information/support on http2 transport enablement in conformance test
8 participants