Skip to content

Commit

Permalink
Bump hyper (#1775)
Browse files Browse the repository at this point in the history
* tokio-compat crate

* Fixed http1 upgrade implementation

* Changelog entry

* Removed tokio-compat, using hyper-util pinned to a commit
  • Loading branch information
Razz4780 authored Aug 8, 2023
1 parent b96288b commit c8b8e3a
Show file tree
Hide file tree
Showing 11 changed files with 138 additions and 88 deletions.
120 changes: 71 additions & 49 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 5 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,11 @@ regex = { version = "1", features = ["unicode-case"] }
miette = "5"
fancy-regex = { version = "0.10" }

# TODO(alex): Change when https://github.com/hyperium/http-body/issues/88 is solved.
hyper = { git = "https://github.com/meowjesty/hyper", branch = "issue/922/http2", features = ["full"] }
http-body = { git = "https://github.com/meowjesty/http-body", branch = "issue/922/http2" }
http-body-util = { git = "https://github.com/meowjesty/http-body", branch = "issue/922/http2" }
hyper = { version = "1.0.0-rc.4", features = ["full"] }
# TODO switch to release when available
hyper-util = { git = "https://github.com/hyperium/hyper-util", commit = "f898015fc9eca9f459ddac521db278d904099e89" }
http-body = "1.0.0-rc.2"
http-body-util = "0.1.0-rc.3"
libc = "0.2"
bimap = "0.6.2"
socket2 = { version = "0.5.3", features = ["all"]}
Expand Down
1 change: 1 addition & 0 deletions changelog.d/1774.internal.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Updated `hyper` version.
1 change: 1 addition & 0 deletions mirrord/agent/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ wildmatch = "2"
enum_dispatch = "0.3"
http-body-util = { workspace = true }
hyper = { workspace = true, features = ["full"] }
hyper-util.workspace = true
httparse = "1"
fancy-regex = { workspace = true }
dashmap = { version = "5" }
Expand Down
3 changes: 2 additions & 1 deletion mirrord/agent/src/runtime/crio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ use futures::TryFutureExt;
use http::{Request, Response};
use http_body_util::{BodyExt, Empty};
use hyper::{body::Incoming, client::conn};
use hyper_util::rt::TokioIo;
use k8s_cri::v1alpha2::{runtime_service_client::RuntimeServiceClient, ContainerStatusRequest};
use serde::Deserialize;
use tokio::net::UnixStream;
Expand Down Expand Up @@ -34,7 +35,7 @@ impl CriOContainer {

async fn api_get(path: &str) -> Result<Response<Incoming>> {
let stream = UnixStream::connect(CRIO_DEFAULT_SOCK_PATH).await?;
let (mut request_sender, connection) = conn::http1::handshake(stream).await?;
let (mut request_sender, connection) = conn::http1::handshake(TokioIo::new(stream)).await?;

tokio::spawn(async move {
if let Err(e) = connection.await {
Expand Down
Loading

0 comments on commit c8b8e3a

Please sign in to comment.