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

Remove the client::conn combined-version types #2960

Closed
seanmonstar opened this issue Aug 24, 2022 · 2 comments · Fixed by #2987
Closed

Remove the client::conn combined-version types #2960

seanmonstar opened this issue Aug 24, 2022 · 2 comments · Fixed by #2987
Labels
A-client Area: client. C-feature Category: feature. This is adding a new feature. E-medium Effort: medium. Some knowledge of how hyper internal works would be useful.
Milestone

Comments

@seanmonstar
Copy link
Member

seanmonstar commented Aug 24, 2022

The public client API for 1.0 will be the version-specific types at client::conn::{http1, http2}. The combined version may exist in hyper-util, but at least it should be removed from hyper proper. Doing so isn't particularly complex, but it will mean fixing up all the tests.

  • Delete hyper::client::conn::{SendRequest, Connection} types.
  • Update examples/* to use the hyper::client::conn::http1 types (or http2 if appropriate).
  • Update tests/* to use conn::http1 in most places, and conn::http2 when specifically testing for HTTP/2.
@seanmonstar seanmonstar added this to the 1.0 RC1 milestone Aug 24, 2022
Michael-J-Ward added a commit to Michael-J-Ward/hyper that referenced this issue Aug 24, 2022
See hyperium#2960
"""
The public client API for 1.0 will be the version-specific types at client::conn::{http1, http2}. The combined version may exist in hyper-util, but at least it should be removed from hyper proper. Doing so isn't particularly complex, but it will mean fixing up all the tests.
"""
@seanmonstar seanmonstar moved this from Todo to In Progress in hyper 1.0 Aug 25, 2022
@Michael-J-Ward
Copy link
Contributor

ffi::client is also effected.

How would you like me to handle that?

@seanmonstar
Copy link
Member Author

Ohhh, I had forgotten about that. I guess a pared-down enum could be used in ffi::client. I can do that if it seems hairy, let me know.

Repository owner moved this from In Progress to Done in hyper 1.0 Sep 21, 2022
cratelyn added a commit to linkerd/linkerd2-proxy that referenced this issue Dec 3, 2024
…tion

this commit updates code in `linkerd-proxy-http`'s HTTP/2 client code,
and the `linkerd-app-test` crate's `TestServer`, to use the new
`hyper::client::conn::http2::SendRequest` backported from the 1.x major
release.

see <hyperium/hyper#2960> for more information.

this commit refrains from updating the broader client connection system,
and addresses the breaking changes to `SendRequest` made in the 1.0
major release, namely:

* send request is no longer a tower service:
  * <https://docs.rs/hyper/0.14.31/hyper/client/conn/struct.SendRequest.html#impl-Service%3CRequest%3CB%3E%3E-for-SendRequest%3CB%3E>
  * <https://docs.rs/hyper/1.5.1/hyper/client/conn/http2/struct.SendRequest.html#trait-implementations>

* `send_request()` now returns an anonymous `impl Future` and not a
  named `ResponseFuture`, as in `0.14`.
  * <https://docs.rs/hyper/0.14.31/hyper/client/conn/struct.ResponseFuture.html>
  * <https://docs.rs/hyper/1.5.1/hyper/client/conn/http2/struct.SendRequest.html#method.send_request>

NB: this change depends on <hyperium/hyper#3798>.
cratelyn added a commit to linkerd/linkerd2-proxy that referenced this issue Dec 3, 2024
…tion

this commit updates code in `linkerd-proxy-http`'s HTTP/2 client code,
and the `linkerd-app-test` crate's `TestServer`, to use the new
`hyper::client::conn::http2::SendRequest` backported from the 1.x major
release.

see <hyperium/hyper#2960> for more information.

this commit refrains from updating the broader client connection system,
and addresses the breaking changes to `SendRequest` made in the 1.0
major release, namely:

* send request is no longer a tower service:
  * <https://docs.rs/hyper/0.14.31/hyper/client/conn/struct.SendRequest.html#impl-Service%3CRequest%3CB%3E%3E-for-SendRequest%3CB%3E>
  * <https://docs.rs/hyper/1.5.1/hyper/client/conn/http2/struct.SendRequest.html#trait-implementations>

* `send_request()` now returns an anonymous `impl Future` and not a
  named `ResponseFuture`, as in `0.14`.
  * <https://docs.rs/hyper/0.14.31/hyper/client/conn/struct.ResponseFuture.html>
  * <https://docs.rs/hyper/1.5.1/hyper/client/conn/http2/struct.SendRequest.html#method.send_request>

NB: this change depends on <hyperium/hyper#3798>.

Signed-off-by: katelyn martin <[email protected]>
cratelyn added a commit to linkerd/linkerd2-proxy that referenced this issue Dec 3, 2024
…tion

this commit updates code in `linkerd-proxy-http`'s HTTP/2 client code,
and the `linkerd-app-test` crate's `TestServer`, to use the new
`hyper::client::conn::http2::SendRequest` backported from the 1.x major
release.

see <hyperium/hyper#2960> for more information.

this commit refrains from updating the broader client connection system,
and addresses the breaking changes to `SendRequest` made in the 1.0
major release, namely:

* send request is no longer a tower service:
  * <https://docs.rs/hyper/0.14.31/hyper/client/conn/struct.SendRequest.html#impl-Service%3CRequest%3CB%3E%3E-for-SendRequest%3CB%3E>
  * <https://docs.rs/hyper/1.5.1/hyper/client/conn/http2/struct.SendRequest.html#trait-implementations>

* `send_request()` now returns an anonymous `impl Future` and not a
  named `ResponseFuture`, as in `0.14`.
  * <https://docs.rs/hyper/0.14.31/hyper/client/conn/struct.ResponseFuture.html>
  * <https://docs.rs/hyper/1.5.1/hyper/client/conn/http2/struct.SendRequest.html#method.send_request>

NB: this change depends on <hyperium/hyper#3798>.

Signed-off-by: katelyn martin <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-client Area: client. C-feature Category: feature. This is adding a new feature. E-medium Effort: medium. Some knowledge of how hyper internal works would be useful.
Projects
No open projects
Status: Done
2 participants