-
Notifications
You must be signed in to change notification settings - Fork 485
Upgrade Warp #5870
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
Upgrade Warp #5870
Conversation
@@ -570,27 +571,35 @@ async fn search_stream_endpoint( | |||
.unwrap_or_else(|_| HeaderValue::from_static("Search stream error")); | |||
let mut trailers = HeaderMap::new(); | |||
trailers.insert("X-Stream-Error", header_value); | |||
let _ = sender.send_trailers(trailers).await; | |||
sender.abort(); | |||
// let _ = tx.send_trailers(trailers).await; |
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 commented this out because mpsc::channel
does not have send_trailers
. Do we need this?
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've just discovered http_body_util::channel::Channel::new();
(behind the channel
feature). I have a feeling we can use that and it'll work nicely.
quickwit/Cargo.toml
Outdated
@@ -123,17 +123,17 @@ hex = "0.4" | |||
home = "0.5" | |||
hostname = "0.3" | |||
http = "1.3" | |||
http-body = "1.0" | |||
http-body-util = "0.1.3" |
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.
While we're at it.
http-body-util = "0.1.3" | |
http-body-util = "0.1" |
@@ -570,27 +571,35 @@ async fn search_stream_endpoint( | |||
.unwrap_or_else(|_| HeaderValue::from_static("Search stream error")); | |||
let mut trailers = HeaderMap::new(); | |||
trailers.insert("X-Stream-Error", header_value); | |||
let _ = sender.send_trailers(trailers).await; | |||
sender.abort(); | |||
// let _ = tx.send_trailers(trailers).await; |
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've just discovered http_body_util::channel::Channel::new();
(behind the channel
feature). I have a feeling we can use that and it'll work nicely.
PR is blocked by this issue. Warp does not allow returning streams or other custom body types. This is needed for search stream endpoint in |
9b3e032
to
b9db83b
Compare
Description
How was this PR tested?
make test-all