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

Follow up on WebSocket connection support #370

Merged
merged 9 commits into from
Jan 5, 2021

Conversation

kazk
Copy link
Member

@kazk kazk commented Jan 4, 2021

@kazk kazk marked this pull request as draft January 5, 2021 07:47
@kazk kazk marked this pull request as ready for review January 5, 2021 08:01
Copy link
Member

@clux clux left a comment

Choose a reason for hiding this comment

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

comment on panics, but everything else looks great!

@kazk kazk force-pushed the websocket-follow-up branch from b899d1e to ed3f44d Compare January 5, 2021 11:05
@kazk
Copy link
Member Author

kazk commented Jan 5, 2021

Should be ready for merge.

@clux
Copy link
Member

clux commented Jan 5, 2021

Thanks! Looks great.
Left one last comment on the panic!, I am happy to backtrack on it if you still feel strongly about it.
But otherwise I'll merge it later on tonight.

@jbg
Copy link
Contributor

jbg commented Jan 5, 2021

I'm hitting a build error in this branch when using it as a dependency.

There seems to be an undeclared dependency on the io feature of tokio-util being enabled. I get this build error:

error[E0433]: failed to resolve: could not find `io` in `tokio_util`
   --> /cargo/git/checkouts/kube-rs-97ea51fe938f4d16/ed3f44d/kube/src/api/remote_command.rs:173:40
    |
173 |     let mut stdin_stream = tokio_util::io::ReaderStream::new(stdin);
    |                                        ^^ could not find `io` in `tokio_util`

... which is resolved by adding a dependency tokio-util = { version = "0.6", features = ["io"] } to my crate - kube should add the feature to its dependency.

@kazk
Copy link
Member Author

kazk commented Jan 5, 2021

@clux I think it's fine to have WsOther for now. Both WsOther and panic! on unexpected tungstenite::Error variant are hacks. Ideally, tungstenite should have a set of possible errors, so we know exactly what to expect and don't have to propagate this confusion to our users, but it doesn't. Returning WsOther will give our users a choice to ignore or panic depending on their need.

@jbg Thanks for letting us know. Fixed it.

@clux clux merged commit 81e1abb into kube-rs:master Jan 5, 2021
@kazk kazk deleted the websocket-follow-up branch January 5, 2021 17:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants