-
-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Update runtimed to fix compatibility issue with the Ark kernel #40889
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
Update runtimed to fix compatibility issue with the Ark kernel #40889
Conversation
crates/client/src/client.rs
Outdated
| request_headers.insert("x-zed-metrics-id", HeaderValue::from_str(&metrics_id)?); | ||
| } | ||
|
|
||
| #[cfg(any(target_os = "windows", target_os = "macos"))] |
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.
A build issue appeared with the update.
I don't understand the details here, but I fixed it following existing code at
zed/crates/client/src/proxy/http_proxy.rs
Lines 67 to 98 in 14b41b1
| #[cfg(any(target_os = "windows", target_os = "macos"))] | |
| async fn https_connect<T>( | |
| stream: T, | |
| target: (&str, u16), | |
| auth: Option<HttpProxyAuthorization<'_>>, | |
| proxy_domain: &str, | |
| ) -> Result<Box<dyn AsyncReadWrite>> | |
| where | |
| T: AsyncReadWrite, | |
| { | |
| let tls_connector = TlsConnector::from(native_tls::TlsConnector::new()?); | |
| let stream = tls_connector.connect(proxy_domain, stream).await?; | |
| http_connect(stream, target, auth).await | |
| } | |
| #[cfg(not(any(target_os = "windows", target_os = "macos")))] | |
| async fn https_connect<T>( | |
| stream: T, | |
| target: (&str, u16), | |
| auth: Option<HttpProxyAuthorization<'_>>, | |
| proxy_domain: &str, | |
| ) -> Result<Box<dyn AsyncReadWrite>> | |
| where | |
| T: AsyncReadWrite, | |
| { | |
| let proxy_domain = rustls_pki_types::ServerName::try_from(proxy_domain) | |
| .context("Address resolution failed")? | |
| .to_owned(); | |
| let tls_connector = TlsConnector::from(std::sync::Arc::new(http_client_tls::tls_config())); | |
| let stream = tls_connector.connect(proxy_domain, stream).await?; | |
| http_connect(stream, target, auth).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.
Thanks! This seems reasonable, but so hard to know...
With my tin foil hat on I am convinced that there's a giant conspiracy by the authors of rust tls libraries to make it impossible to actually set up a project to use tls properly :D
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.
Guh. Yeah.
Cargo.toml
Outdated
| jsonwebtoken = "9.3" | ||
| jupyter-protocol = { git = "https://github.com/ConradIrwin/runtimed", rev = "7130c804216b6914355d15d0b91ea91f6babd734" } | ||
| jupyter-websocket-client = { git = "https://github.com/ConradIrwin/runtimed" ,rev = "7130c804216b6914355d15d0b91ea91f6babd734" } | ||
| jupyter-protocol = { git = "https://github.com/runtimed/runtimed", rev = "2ba4b96a0d093ae957254b08487696f530ef1b65" } |
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.
Conrad's PR (runtimed/runtimed#182) was merged so we should now be able to depend on the main repo.
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.
Does this correspond to an actual released version? Looks like it's tagged with sidecar-v0.8.0, tag: runt-cli-v0.3.0. If so, can we switch back to non-git dependencies?
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.
yep! now updated to latest releases
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.
Ugh, that seems to have broken the tls config
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.
Is there something we need to change in https://github.com/runtimed/runtimed to make this compatible?
| "async-dispatcher-runtime", | ||
| runtimelib = { version = "0.29.0", default-features = false, features = [ | ||
| "async-dispatcher-runtime", "ring" | ||
| ] } |
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.
Thank you so much for doing this absolutely necessary maintenance work to bring Zed up to the latest.
Cargo.toml
Outdated
| runtimelib = { git = "https://github.com/ConradIrwin/runtimed", rev = "7130c804216b6914355d15d0b91ea91f6babd734", default-features = false, features = [ | ||
| "async-dispatcher-runtime", | ||
| runtimelib = { version = "0.29.0", default-features = false, features = [ | ||
| "async-dispatcher-runtime", "ring" |
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.
Going to push up a change over to aws-lc-rs
0fbc3cb to
b27f9ca
Compare
|
@lionel- Ok, we pushed some changes to runtimelib to make sure the feature flags for async-tungstenite match what we use in Zed, to avoid needing to change the tls setup. Assuming this fixes the build issues, will merge. |
|
Thanks @lionel- and @ConradIrwin! |
|
Tried it out this morning, it's looking great. ark-kernel-zed.mp4 |
…ndustries#40889) Closes zed-industries#40888 This updates runtimed to the latest version, which handles the "starting" variant of `execution_state`. It actually handles a bunch of other variants that are not documented in the protocol (see https://jupyter-client.readthedocs.io/en/stable/messaging.html#kernel-status), like "starting", "terminating", etc. I added implementations for these variants as well. Release Notes: - Fixed issue that prevented the Ark kernel from working in Zed (zed-industries#40888). --------- Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
Closes #40888
This updates runtimed to the latest version, which handles the "starting" variant of
execution_state. It actually handles a bunch of other variants that are not documented in the protocol (see https://jupyter-client.readthedocs.io/en/stable/messaging.html#kernel-status), like "starting", "terminating", etc. I added implementations for these variants as well.Release Notes:
execution_state#40888).