From 6f2a8c18949ed45f36542d0e4d7366b716c84e25 Mon Sep 17 00:00:00 2001 From: Maksym Pavlenko Date: Thu, 3 Oct 2024 10:56:09 -0700 Subject: [PATCH 01/18] Fix crates that depend on new ttrpc Signed-off-by: Maksym Pavlenko --- crates/shim-protos/examples/ttrpc-server-async.rs | 4 +--- crates/shim-protos/examples/ttrpc-server.rs | 4 +--- crates/shim-protos/tests/ttrpc.rs | 10 +++------- crates/shim/src/asynchronous/mod.rs | 2 +- crates/shim/src/asynchronous/publisher.rs | 3 +-- crates/shim/src/synchronous/mod.rs | 2 +- crates/shim/src/synchronous/publisher.rs | 6 ++---- 7 files changed, 10 insertions(+), 21 deletions(-) diff --git a/crates/shim-protos/examples/ttrpc-server-async.rs b/crates/shim-protos/examples/ttrpc-server-async.rs index c6d373e0..1ae2020a 100644 --- a/crates/shim-protos/examples/ttrpc-server-async.rs +++ b/crates/shim-protos/examples/ttrpc-server-async.rs @@ -60,9 +60,7 @@ impl Task for FakeServer { async fn main() { simple_logger::SimpleLogger::new().init().unwrap(); - let t = Box::new(FakeServer::new()) as Box; - let t = Arc::new(t); - let tservice = create_task(t); + let tservice = create_task(Arc::new(FakeServer::new())); let mut server = Server::new() .bind("unix:///tmp/shim-proto-ttrpc-001") diff --git a/crates/shim-protos/examples/ttrpc-server.rs b/crates/shim-protos/examples/ttrpc-server.rs index 7c6c7360..f4f71891 100644 --- a/crates/shim-protos/examples/ttrpc-server.rs +++ b/crates/shim-protos/examples/ttrpc-server.rs @@ -57,9 +57,7 @@ impl Task for FakeServer { fn main() { simple_logger::SimpleLogger::new().init().unwrap(); - let t = Box::new(FakeServer::new()) as Box; - let t = Arc::new(t); - let tservice = create_task(t); + let tservice = create_task(Arc::new(FakeServer::new())); let mut server = Server::new() .bind("unix:///tmp/shim-proto-ttrpc-001") diff --git a/crates/shim-protos/tests/ttrpc.rs b/crates/shim-protos/tests/ttrpc.rs index 22c439ef..4d82321d 100644 --- a/crates/shim-protos/tests/ttrpc.rs +++ b/crates/shim-protos/tests/ttrpc.rs @@ -72,9 +72,7 @@ fn create_ttrpc_context() -> ( #[test] fn test_task_method_num() { - let server = Arc::new(Box::new(FakeServer::new()) as Box); - let task = create_task(server.clone()); - + let task = create_task(Arc::new(FakeServer::new())); assert_eq!(task.len(), 17); } @@ -98,8 +96,7 @@ fn test_create_task() { request.set_timeout_nano(10000); request.set_metadata(ttrpc::context::to_pb(ctx.metadata.clone())); - let server = Arc::new(Box::new(FakeServer::new()) as Box); - let task = create_task(server.clone()); + let task = create_task(Arc::new(FakeServer::new())); let create = task.get("/containerd.task.v2.Task/Create").unwrap(); create.handler(ctx, request).unwrap(); @@ -140,8 +137,7 @@ fn test_delete_task() { request.set_timeout_nano(10000); request.set_metadata(ttrpc::context::to_pb(ctx.metadata.clone())); - let server = Arc::new(Box::new(FakeServer::new()) as Box); - let task = create_task(server.clone()); + let task = create_task(Arc::new(FakeServer::new())); let delete = task.get("/containerd.task.v2.Task/Delete").unwrap(); delete.handler(ctx, request).unwrap(); diff --git a/crates/shim/src/asynchronous/mod.rs b/crates/shim/src/asynchronous/mod.rs index 4a145310..c43b729b 100644 --- a/crates/shim/src/asynchronous/mod.rs +++ b/crates/shim/src/asynchronous/mod.rs @@ -178,7 +178,7 @@ where let publisher = RemotePublisher::new(&ttrpc_address).await?; let task = shim.create_task_service(publisher).await; - let task_service = create_task(Arc::new(Box::new(task))); + let task_service = create_task(Arc::new(task)); let mut server = Server::new().register_service(task_service); server = server.add_listener(SOCKET_FD)?; server = server.set_domain_unix(); diff --git a/crates/shim/src/asynchronous/publisher.rs b/crates/shim/src/asynchronous/publisher.rs index 1c68f571..fac068ea 100644 --- a/crates/shim/src/asynchronous/publisher.rs +++ b/crates/shim/src/asynchronous/publisher.rs @@ -148,8 +148,7 @@ mod tests { let barrier2 = barrier.clone(); let server_thread = tokio::spawn(async move { let listener = UnixListener::bind(&path1).unwrap(); - let t = Arc::new(Box::new(server) as Box); - let service = create_events(t); + let service = create_events(Arc::new(server)); let mut server = Server::new() .set_domain_unix() .add_listener(listener.as_raw_fd()) diff --git a/crates/shim/src/synchronous/mod.rs b/crates/shim/src/synchronous/mod.rs index d1cfcc38..ced6a9a7 100644 --- a/crates/shim/src/synchronous/mod.rs +++ b/crates/shim/src/synchronous/mod.rs @@ -266,7 +266,7 @@ where let publisher = publisher::RemotePublisher::new(&ttrpc_address)?; let task = shim.create_task_service(publisher); - let task_service = create_task(Arc::new(Box::new(task))); + let task_service = create_task(Arc::new(task)); let mut server = create_server(flags)?; server = server.register_service(task_service); server.start()?; diff --git a/crates/shim/src/synchronous/publisher.rs b/crates/shim/src/synchronous/publisher.rs index 88c4f792..945e82ca 100644 --- a/crates/shim/src/synchronous/publisher.rs +++ b/crates/shim/src/synchronous/publisher.rs @@ -188,8 +188,7 @@ mod tests { use std::os::unix::{io::AsRawFd, net::UnixListener}; let listener = UnixListener::bind(server_address).unwrap(); listener.set_nonblocking(true).unwrap(); - let t = Arc::new(Box::new(FakeServer {}) as Box); - let service = client::create_events(t); + let service = client::create_events(Arc::new(FakeServer {})); let server = Server::new() .add_listener(listener.as_raw_fd()) .unwrap() @@ -200,8 +199,7 @@ mod tests { #[cfg(windows)] { - let t = Arc::new(Box::new(FakeServer {}) as Box); - let service = client::create_events(t); + let service = client::create_events(Arc::new(FakeServer {})); Server::new() .bind(server_address) From 06156f88c829c3a7d63b41c1bde543989e02ecaf Mon Sep 17 00:00:00 2001 From: Maksym Pavlenko Date: Thu, 3 Oct 2024 11:04:03 -0700 Subject: [PATCH 02/18] Pin ttrpc version Signed-off-by: Maksym Pavlenko --- crates/shim-protos/Cargo.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/shim-protos/Cargo.toml b/crates/shim-protos/Cargo.toml index 734cf0f3..8bb9ac35 100644 --- a/crates/shim-protos/Cargo.toml +++ b/crates/shim-protos/Cargo.toml @@ -50,10 +50,10 @@ required-features = ["async"] [dependencies] async-trait = { workspace = true, optional = true } protobuf = "=3.5" -ttrpc = "0.8" +ttrpc = "0.8.2" [build-dependencies] -ttrpc-codegen = "0.4" +ttrpc-codegen = "0.4.2" [dev-dependencies] ctrlc = { version = "3.0", features = ["termination"] } From 32f8deb6e4e31a68131e3b58e10fa175a3291ae5 Mon Sep 17 00:00:00 2001 From: Maksym Pavlenko Date: Thu, 3 Oct 2024 11:26:35 -0700 Subject: [PATCH 03/18] Bump shim-protos to 0.7.1 and shim to 0.7.2 Signed-off-by: Maksym Pavlenko --- crates/shim-protos/Cargo.toml | 2 +- crates/shim/Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/shim-protos/Cargo.toml b/crates/shim-protos/Cargo.toml index 8bb9ac35..c0d04812 100644 --- a/crates/shim-protos/Cargo.toml +++ b/crates/shim-protos/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "containerd-shim-protos" -version = "0.7.0" +version = "0.7.1" authors = [ "Maksym Pavlenko ", "The containerd Authors", diff --git a/crates/shim/Cargo.toml b/crates/shim/Cargo.toml index b6c0159a..e3301373 100644 --- a/crates/shim/Cargo.toml +++ b/crates/shim/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "containerd-shim" -version = "0.7.1" +version = "0.7.2" authors = [ "Maksym Pavlenko ", "The containerd Authors", From 202c756d26c937f96a49ee5e45356132a4a524a0 Mon Sep 17 00:00:00 2001 From: Maksym Pavlenko Date: Thu, 3 Oct 2024 11:50:13 -0700 Subject: [PATCH 04/18] Fix shim dependency to shim-protos and bump to 0.7.3 Signed-off-by: Maksym Pavlenko --- crates/shim/Cargo.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/shim/Cargo.toml b/crates/shim/Cargo.toml index e3301373..44e17a89 100644 --- a/crates/shim/Cargo.toml +++ b/crates/shim/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "containerd-shim" -version = "0.7.2" +version = "0.7.3" authors = [ "Maksym Pavlenko ", "The containerd Authors", @@ -34,7 +34,7 @@ name = "windows-log-reader" path = "examples/windows_log_reader.rs" [dependencies] -containerd-shim-protos = { path = "../shim-protos", version = "0.7.0" } +containerd-shim-protos = { path = "../shim-protos", version = "0.7.1" } go-flag = "0.1.0" lazy_static = "1.4.0" libc.workspace = true From 15f51b089968e841546482e5d7f63c5d3d08d43e Mon Sep 17 00:00:00 2001 From: jiaxiao zhou Date: Thu, 3 Oct 2024 19:57:03 +0000 Subject: [PATCH 05/18] crates/shim-protos/Cargo: relex version requirement for protobuf Signed-off-by: jiaxiao zhou --- crates/shim-protos/Cargo.toml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/shim-protos/Cargo.toml b/crates/shim-protos/Cargo.toml index c0d04812..4a6513d9 100644 --- a/crates/shim-protos/Cargo.toml +++ b/crates/shim-protos/Cargo.toml @@ -49,7 +49,9 @@ required-features = ["async"] [dependencies] async-trait = { workspace = true, optional = true } -protobuf = "=3.5" +# protobuf 3.5 introduces a breaking change: https://github.com/containerd/rust-extensions/issues/295 +# pinning to <3.5.0 until we can update the generated code +protobuf = ">= 3.0, <3.5.0" ttrpc = "0.8.2" [build-dependencies] From 4e60e8a6fa2dc24717cb4eb4464155e12dfda31f Mon Sep 17 00:00:00 2001 From: Maksym Pavlenko Date: Fri, 4 Oct 2024 11:30:19 -0700 Subject: [PATCH 06/18] Bump containerd shim to 0.7.4 Signed-off-by: Maksym Pavlenko --- crates/shim/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/shim/Cargo.toml b/crates/shim/Cargo.toml index 44e17a89..a11a2b3d 100644 --- a/crates/shim/Cargo.toml +++ b/crates/shim/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "containerd-shim" -version = "0.7.3" +version = "0.7.4" authors = [ "Maksym Pavlenko ", "The containerd Authors", From 4b8bd82ea9b4908f2899312fb316bce92253fc16 Mon Sep 17 00:00:00 2001 From: Maksym Pavlenko Date: Fri, 4 Oct 2024 11:57:47 -0700 Subject: [PATCH 07/18] Bump shim protos and fix dependencies Signed-off-by: Maksym Pavlenko --- crates/shim-protos/Cargo.toml | 2 +- crates/shim/Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/shim-protos/Cargo.toml b/crates/shim-protos/Cargo.toml index 4a6513d9..6440f8e4 100644 --- a/crates/shim-protos/Cargo.toml +++ b/crates/shim-protos/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "containerd-shim-protos" -version = "0.7.1" +version = "0.7.2" authors = [ "Maksym Pavlenko ", "The containerd Authors", diff --git a/crates/shim/Cargo.toml b/crates/shim/Cargo.toml index a11a2b3d..620f3ab2 100644 --- a/crates/shim/Cargo.toml +++ b/crates/shim/Cargo.toml @@ -34,7 +34,7 @@ name = "windows-log-reader" path = "examples/windows_log_reader.rs" [dependencies] -containerd-shim-protos = { path = "../shim-protos", version = "0.7.1" } +containerd-shim-protos = { path = "../shim-protos", version = "0.7.2" } go-flag = "0.1.0" lazy_static = "1.4.0" libc.workspace = true From 2050c857d6e885277658056373f857ef141fc55b Mon Sep 17 00:00:00 2001 From: Bryant Biggs Date: Fri, 2 Aug 2024 14:23:45 -0500 Subject: [PATCH 08/18] chore: Update `tonic` and `prost` dependencies to latest --- Cargo.toml | 10 +++++----- crates/client/Cargo.toml | 1 + crates/client/src/lib.rs | 33 +++++++++++++++++++-------------- 3 files changed, 25 insertions(+), 19 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 8733101e..c7745011 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -35,9 +35,9 @@ nix = "0.29" oci-spec = "0.6" os_pipe = "1.1" prctl = "1.0.0" -prost = "0.12" -prost-build = "0.12" -prost-types = "0.12" +prost = "0.13" +prost-build = "0.13" +prost-types = "0.13" serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" simple_logger = { version = "5.0", default-features = false } @@ -45,7 +45,7 @@ tempfile = "3.6" thiserror = "1.0" time = { version = "0.3.29", features = ["serde", "std", "formatting"] } tokio = "1.26" -tonic = "0.11" -tonic-build = "0.11" +tonic = "0.12" +tonic-build = "0.12" tower = "0.4" uuid = { version = "1.0", features = ["v4"] } diff --git a/crates/client/Cargo.toml b/crates/client/Cargo.toml index 9616e08d..d89af8bf 100644 --- a/crates/client/Cargo.toml +++ b/crates/client/Cargo.toml @@ -23,6 +23,7 @@ name = "version" path = "examples/version.rs" [dependencies] +hyper-util = "0.1.6" # https://github.com/hyperium/hyper/issues/3110 prost.workspace = true prost-types.workspace = true tokio = { workspace = true, optional = true } diff --git a/crates/client/src/lib.rs b/crates/client/src/lib.rs index 74dd798d..590d42db 100644 --- a/crates/client/src/lib.rs +++ b/crates/client/src/lib.rs @@ -86,23 +86,28 @@ pub async fn connect( let path = path.as_ref().to_path_buf(); - // Taken from https://github.com/hyperium/tonic/blob/eeb3268f71ae5d1107c937392389db63d8f721fb/examples/src/uds/client.rs#L19 + // Taken from https://github.com/hyperium/tonic/blob/71fca362d7ffbb230547f23b3f2fb75c414063a8/examples/src/uds/client.rs#L21-L28 // There will ignore this uri because uds do not use it // and make connection with UnixStream::connect. - let channel = Endpoint::try_from("http://[::]") - .unwrap() + let channel = Endpoint::try_from("http://[::]")? .connect_with_connector(tower::service_fn(move |_| { - #[cfg(unix)] - { - tokio::net::UnixStream::connect(path.clone()) - } - - #[cfg(windows)] - { - let client = tokio::net::windows::named_pipe::ClientOptions::new() - .open(path.clone()) - .map_err(|e| std::io::Error::from(e)); - async move { client } + let path = path.clone(); + + async move { + #[cfg(unix)] + { + Ok::<_, std::io::Error>(hyper_util::rt::TokioIo::new( + tokio::net::UnixStream::connect(path).await?, + )) + } + + #[cfg(windows)] + { + let client = tokio::net::windows::named_pipe::ClientOptions::new() + .open(path) + .map_err(|e| std::io::Error::from(e)); + client.await + } } })) .await?; From ece15e92755d073c7857f611ef9a3476b047d8e5 Mon Sep 17 00:00:00 2001 From: Bryant Biggs Date: Fri, 2 Aug 2024 14:36:10 -0500 Subject: [PATCH 09/18] fix: Windows client is not awaitable --- crates/client/src/lib.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/crates/client/src/lib.rs b/crates/client/src/lib.rs index 590d42db..4b6d46f5 100644 --- a/crates/client/src/lib.rs +++ b/crates/client/src/lib.rs @@ -103,10 +103,9 @@ pub async fn connect( #[cfg(windows)] { - let client = tokio::net::windows::named_pipe::ClientOptions::new() + tokio::net::windows::named_pipe::ClientOptions::new() .open(path) - .map_err(|e| std::io::Error::from(e)); - client.await + .map_err(|e| std::io::Error::from(e)) } } })) From 81f51386f04cc7b4e2529686994d165db768ff3b Mon Sep 17 00:00:00 2001 From: Bryant Biggs Date: Fri, 2 Aug 2024 16:17:57 -0500 Subject: [PATCH 10/18] chore: Revert change to windows target --- crates/client/src/lib.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/crates/client/src/lib.rs b/crates/client/src/lib.rs index 4b6d46f5..7d8b2866 100644 --- a/crates/client/src/lib.rs +++ b/crates/client/src/lib.rs @@ -103,9 +103,10 @@ pub async fn connect( #[cfg(windows)] { - tokio::net::windows::named_pipe::ClientOptions::new() - .open(path) - .map_err(|e| std::io::Error::from(e)) + let client = tokio::net::windows::named_pipe::ClientOptions::new() + .open(path.clone()) + .map_err(|e| std::io::Error::from(e)); + async move { client } } } })) From 2265428508721a0c659c3c92ad6558c0c563ff62 Mon Sep 17 00:00:00 2001 From: Bryant Biggs Date: Fri, 2 Aug 2024 21:07:37 -0500 Subject: [PATCH 11/18] Update lib.rs Co-authored-by: James Sturtevant Signed-off-by: Bryant Biggs --- crates/client/src/lib.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/crates/client/src/lib.rs b/crates/client/src/lib.rs index 7d8b2866..7b6d2976 100644 --- a/crates/client/src/lib.rs +++ b/crates/client/src/lib.rs @@ -103,10 +103,11 @@ pub async fn connect( #[cfg(windows)] { - let client = tokio::net::windows::named_pipe::ClientOptions::new() - .open(path.clone()) - .map_err(|e| std::io::Error::from(e)); - async move { client } + let client = tokio::net::windows::named_pipe::ClientOptions::new() + .open(&path) + .map_err(|e| std::io::Error::from(e))?; + + Ok::<_, std::io::Error>(hyper_util::rt::TokioIo::new(client)) } } })) From fb4cb85d6625ddbee24eadd013cf7ec3bf0cf0d9 Mon Sep 17 00:00:00 2001 From: Bryant Biggs Date: Fri, 2 Aug 2024 21:20:30 -0500 Subject: [PATCH 12/18] chore: Run `cargo fmt` --- crates/client/src/lib.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/crates/client/src/lib.rs b/crates/client/src/lib.rs index 7b6d2976..89f3a80e 100644 --- a/crates/client/src/lib.rs +++ b/crates/client/src/lib.rs @@ -103,11 +103,11 @@ pub async fn connect( #[cfg(windows)] { - let client = tokio::net::windows::named_pipe::ClientOptions::new() - .open(&path) - .map_err(|e| std::io::Error::from(e))?; - - Ok::<_, std::io::Error>(hyper_util::rt::TokioIo::new(client)) + let client = tokio::net::windows::named_pipe::ClientOptions::new() + .open(&path) + .map_err(|e| std::io::Error::from(e))?; + + Ok::<_, std::io::Error>(hyper_util::rt::TokioIo::new(client)) } } })) From 6f2812f4b84555d682157835bbdeca304d550c6b Mon Sep 17 00:00:00 2001 From: Bryant Biggs Date: Wed, 11 Sep 2024 18:12:13 -0500 Subject: [PATCH 13/18] fix: Correct lint warnings, bump toolchain version due to `cargo::key=value` build directive which is reserved for future use --- crates/runc/src/utils.rs | 1 + crates/shim/src/args.rs | 2 +- crates/shim/src/lib.rs | 2 -- rust-toolchain.toml | 2 +- 4 files changed, 3 insertions(+), 4 deletions(-) diff --git a/crates/runc/src/utils.rs b/crates/runc/src/utils.rs index 750a116a..15596fe0 100644 --- a/crates/runc/src/utils.rs +++ b/crates/runc/src/utils.rs @@ -98,6 +98,7 @@ pub async fn write_value_to_temp_file(value: &T) -> Result>(args: &[S]) -> Result { }) .map_err(|e| Error::InvalidArgument(e.to_string()))?; - if let Some(action) = args.get(0) { + if let Some(action) = args.first() { flags.action = action.into(); } diff --git a/crates/shim/src/lib.rs b/crates/shim/src/lib.rs index 5f447bd7..d428fd82 100644 --- a/crates/shim/src/lib.rs +++ b/crates/shim/src/lib.rs @@ -94,14 +94,12 @@ macro_rules! cfg_async { } cfg_not_async! { - pub use crate::synchronous::*; pub use crate::synchronous::publisher; pub use protos::shim::shim_ttrpc::Task; pub use protos::ttrpc::TtrpcContext; } cfg_async! { - pub use crate::asynchronous::*; pub use crate::asynchronous::publisher; pub use protos::shim_async::Task; pub use protos::ttrpc::r#async::TtrpcContext; diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 23dbc5c8..db3e0d02 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,3 +1,3 @@ [toolchain] -channel = "1.74" +channel = "1.77" components = ["rustfmt", "clippy", "llvm-tools"] From ece6516da5ddb276afeee9a66cf68ad8013fc432 Mon Sep 17 00:00:00 2001 From: Bryant Biggs Date: Wed, 11 Sep 2024 20:21:22 -0500 Subject: [PATCH 14/18] fix: Switch `write` to `write_all` to consume --- crates/shim/src/sys/windows/named_pipe_logger.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/shim/src/sys/windows/named_pipe_logger.rs b/crates/shim/src/sys/windows/named_pipe_logger.rs index 1121c5f1..01830984 100644 --- a/crates/shim/src/sys/windows/named_pipe_logger.rs +++ b/crates/shim/src/sys/windows/named_pipe_logger.rs @@ -100,7 +100,7 @@ impl log::Log for NamedPipeLogger { .current_connection .lock() .unwrap() - .write(message.as_bytes()) + .write_all(message.as_bytes()) { Ok(_) => {} Err(ref e) if e.kind() == io::ErrorKind::Interrupted => { From da4d1f48bff7be25fe0218696c763bbf796f6dd4 Mon Sep 17 00:00:00 2001 From: Bryant Biggs Date: Fri, 4 Oct 2024 09:41:23 -0500 Subject: [PATCH 15/18] fix: Replace `tonic` deprecated methods to fix clippy warnings --- crates/client/build.rs | 2 +- crates/snapshots/build.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/client/build.rs b/crates/client/build.rs index 941bee0d..2c52cb20 100644 --- a/crates/client/build.rs +++ b/crates/client/build.rs @@ -70,7 +70,7 @@ fn main() { tonic_build::configure() .build_server(false) - .compile_with_config(config, PROTO_FILES, &["vendor/"]) + .compile_protos_with_config(config, PROTO_FILES, &["vendor/"]) .expect("Failed to generate GRPC bindings"); for module in FIXUP_MODULES { diff --git a/crates/snapshots/build.rs b/crates/snapshots/build.rs index c6785fa7..862f2206 100644 --- a/crates/snapshots/build.rs +++ b/crates/snapshots/build.rs @@ -26,7 +26,7 @@ const FIXUP_MODULES: &[&str] = &["containerd.services.snapshots.v1"]; fn main() { tonic_build::configure() .build_server(true) - .compile(PROTO_FILES, &["vendor/"]) + .compile_protos(PROTO_FILES, &["vendor/"]) .expect("Failed to generate GRPC bindings"); for module in FIXUP_MODULES { From 3f541b9454f2be062dcd2a5605b87633662ff300 Mon Sep 17 00:00:00 2001 From: Bryant Biggs Date: Fri, 4 Oct 2024 14:52:16 +0000 Subject: [PATCH 16/18] fix: All unused re-export to pass clippy --- crates/shim/src/sys/mod.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/crates/shim/src/sys/mod.rs b/crates/shim/src/sys/mod.rs index 3f98c21e..6972b767 100644 --- a/crates/shim/src/sys/mod.rs +++ b/crates/shim/src/sys/mod.rs @@ -17,4 +17,5 @@ #[cfg(windows)] pub(crate) mod windows; #[cfg(windows)] +#[allow(unused_imports)] pub use crate::sys::windows::NamedPipeLogger; From 304d67069b7e79cd3ddf264aa90a7def6a949604 Mon Sep 17 00:00:00 2001 From: Maksym Pavlenko Date: Mon, 7 Oct 2024 11:35:55 -0700 Subject: [PATCH 17/18] Bump client to 0.6.0 Signed-off-by: Maksym Pavlenko --- crates/client/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/client/Cargo.toml b/crates/client/Cargo.toml index d89af8bf..e062c04a 100644 --- a/crates/client/Cargo.toml +++ b/crates/client/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "containerd-client" -version = "0.5.0" +version = "0.6.0" authors = [ "Maksym Pavlenko ", "The containerd Authors", From 7794b07f1602635d0846a11c7ebf2ee683f94819 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 7 Oct 2024 21:11:27 +0000 Subject: [PATCH 18/18] build(deps): update tower requirement from 0.4 to 0.5 Updates the requirements on [tower](https://github.com/tower-rs/tower) to permit the latest version. - [Release notes](https://github.com/tower-rs/tower/releases) - [Commits](https://github.com/tower-rs/tower/compare/tower-0.4.0...tower-0.5.1) --- updated-dependencies: - dependency-name: tower dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index c7745011..56b4c4df 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -47,5 +47,5 @@ time = { version = "0.3.29", features = ["serde", "std", "formatting"] } tokio = "1.26" tonic = "0.12" tonic-build = "0.12" -tower = "0.4" +tower = "0.5" uuid = { version = "1.0", features = ["v4"] }