Skip to content

Commit

Permalink
build(deps): update tokio-util to v0.7 (#1490)
Browse files Browse the repository at this point in the history
This branch updates `tokio-util` to v0.7.0.

The dependabot-generated PR for this update doesn't work, because this
is a breaking API change. The only update that was necessary here was
changing the use of `tokio_util::sync::PollSender` in
`linkerd-proxy-discover` to use the updated method names.

Closes #240

Signed-off-by: Eliza Weisman <eliza@buoyant.io>
(cherry picked from commit 7f17318)
Signed-off-by: Oliver Gould <ver@buoyant.io>
  • Loading branch information
hawkw authored and olix0r committed Mar 30, 2022
1 parent 23e474e commit 572ba9d
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 10 deletions.
26 changes: 20 additions & 6 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ dependencies = [
"indexmap",
"slab",
"tokio",
"tokio-util",
"tokio-util 0.6.9",
"tracing",
]

Expand Down Expand Up @@ -1025,7 +1025,7 @@ dependencies = [
"tokio",
"tokio-rustls",
"tokio-test",
"tokio-util",
"tokio-util 0.7.0",
]

[[package]]
Expand Down Expand Up @@ -1100,7 +1100,7 @@ dependencies = [
"linkerd-stack",
"pin-project",
"tokio",
"tokio-util",
"tokio-util 0.7.0",
"tower",
"tracing",
]
Expand Down Expand Up @@ -2199,7 +2199,7 @@ dependencies = [
"futures-core",
"pin-project-lite",
"tokio",
"tokio-util",
"tokio-util 0.6.9",
]

[[package]]
Expand Down Expand Up @@ -2229,6 +2229,20 @@ dependencies = [
"tokio",
]

[[package]]
name = "tokio-util"
version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "64910e1b9c1901aaf5375561e35b9c057d95ff41a44ede043a03e09279eabaf1"
dependencies = [
"bytes",
"futures-core",
"futures-sink",
"log",
"pin-project-lite",
"tokio",
]

[[package]]
name = "tonic"
version = "0.6.2"
Expand All @@ -2252,7 +2266,7 @@ dependencies = [
"prost-derive",
"tokio",
"tokio-stream",
"tokio-util",
"tokio-util 0.6.9",
"tower",
"tower-layer",
"tower-service",
Expand Down Expand Up @@ -2287,7 +2301,7 @@ dependencies = [
"slab",
"tokio",
"tokio-stream",
"tokio-util",
"tokio-util 0.6.9",
"tower-layer",
"tower-service",
"tracing",
Expand Down
2 changes: 2 additions & 0 deletions deny.toml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ skip = [
# Waiting on a tokio release that updates parking_lot to v0.12.
{ name = "parking_lot", version = "0.11" },
{ name = "parking_lot_core", version = "0.8" },
# waiting on `h2` and `tower` releases that update h2 to v0.7
{ name = "tokio-util", version = "0.6" }
]
skip-tree = [
# Hasn't seen a new release since 2017. Pulls in an older version of nom.
Expand Down
2 changes: 1 addition & 1 deletion linkerd/io/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ linkerd-errno = { path = "../errno" }
tokio = { version = "1", features = ["io-util", "net"] }
tokio-rustls = "0.22"
tokio-test = { version = "0.4", optional = true }
tokio-util = { version = "0.6", features = ["io"] }
tokio-util = { version = "0.7", features = ["io"] }
pin-project = "1"

[dev-dependencies]
Expand Down
2 changes: 1 addition & 1 deletion linkerd/proxy/discover/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ linkerd-error = { path = "../../error" }
linkerd-proxy-core = { path = "../core" }
linkerd-stack = { path = "../../stack" }
tokio = { version = "1", features = ["rt", "sync", "time"] }
tokio-util = "0.6.9"
tokio-util = "0.7"
tower = { version = "0.4.11", features = ["discover"] }
tracing = "0.1.30"
pin-project = "1"
Expand Down
4 changes: 2 additions & 2 deletions linkerd/proxy/discover/src/buffer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ where
// The watchdog bounds the amount of time that the send buffer stays
// full. This is designed to release the `discover` resources, i.e.
// if we expect that the receiver has leaked.
match this.tx.poll_send_done(cx) {
match this.tx.poll_reserve(cx) {
Poll::Ready(Ok(())) => {
this.watchdog.as_mut().set(None);
}
Expand Down Expand Up @@ -181,7 +181,7 @@ where
}
};

this.tx.start_send(up).ok().expect("sender must be ready");
this.tx.send_item(up).ok().expect("sender must be ready");
}
}
}
Expand Down

0 comments on commit 572ba9d

Please sign in to comment.