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

update linkerd2-cache and linkerd2-lock to std::future #490

Merged
merged 15 commits into from
May 4, 2020
106 changes: 51 additions & 55 deletions Cargo.lock
Original file line number Diff line number Diff line change
@@ -123,9 +123,9 @@ dependencies = [

[[package]]
name = "bytes"
version = "0.5.3"
version = "0.5.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "10004c15deb332055f7a4a208190aed362cf9a7c2f6ab70a305fba50e1105f38"
checksum = "130aac562c0dd69c56b3b1cc8ffd2e17be31d0b6c25b61c96b76231aa23e39e1"

[[package]]
name = "c2-chacha"
@@ -670,9 +670,6 @@ name = "lazy_static"
version = "1.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bc5729f27f159ddd61f4df6228e827e86643d4d3e7c32183cb30a1c08f604a14"
dependencies = [
"spin",
]

[[package]]
name = "libc"
@@ -719,7 +716,7 @@ dependencies = [
"ring",
"rustls",
"tokio 0.1.22",
"tokio 0.2.19",
"tokio 0.2.20",
"tokio-compat",
"tokio-connect",
"tokio-current-thread",
@@ -790,7 +787,7 @@ dependencies = [
"rand 0.7.2",
"regex 1.0.0",
"tokio 0.1.22",
"tokio 0.2.19",
"tokio 0.2.20",
"tokio-compat",
"tokio-timer",
"tower 0.3.1",
@@ -801,7 +798,7 @@ dependencies = [
"tower-request-modifier",
"tower-spawn-ready",
"tracing",
"tracing-futures 0.2.3",
"tracing-futures 0.2.4",
"tracing-log",
"tracing-subscriber",
]
@@ -899,7 +896,7 @@ dependencies = [
"futures 0.3.4",
"linkerd2-error",
"pin-project",
"tokio 0.2.19",
"tokio 0.2.20",
"tokio-test",
"tower 0.3.1",
"tower-test",
@@ -911,12 +908,12 @@ dependencies = [
name = "linkerd2-cache"
version = "0.1.0"
dependencies = [
"futures 0.1.26",
"futures 0.3.4",
"linkerd2-error",
"linkerd2-lock",
"linkerd2-stack",
"tokio 0.1.22",
"tower 0.1.1",
"tokio 0.2.20",
"tower 0.3.1",
"tracing",
"tracing-futures 0.1.0",
]
@@ -927,7 +924,7 @@ version = "0.1.0"
dependencies = [
"futures 0.3.4",
"pin-project",
"tokio 0.2.19",
"tokio 0.2.20",
"tower 0.3.1",
"tracing",
]
@@ -964,7 +961,7 @@ dependencies = [
"futures 0.3.4",
"linkerd2-error",
"pin-project",
"tokio 0.2.19",
"tokio 0.2.20",
"tokio-test",
]

@@ -1085,11 +1082,13 @@ dependencies = [
name = "linkerd2-lock"
version = "0.1.0"
dependencies = [
"futures 0.1.26",
"futures 0.3.4",
"linkerd2-error",
"rand 0.7.2",
"tokio 0.1.22",
"tower 0.1.1",
"tokio 0.2.20",
"tokio-test",
"tower 0.3.1",
"tower-test",
"tracing",
"tracing-futures 0.1.0",
"tracing-log",
@@ -1174,9 +1173,9 @@ dependencies = [
"futures 0.3.4",
"linkerd2-error",
"pin-project",
"tokio 0.2.19",
"tokio 0.2.20",
"tower 0.3.1",
"tracing-futures 0.2.3",
"tracing-futures 0.2.4",
]

[[package]]
@@ -1188,7 +1187,7 @@ dependencies = [
"linkerd2-io",
"linkerd2-proxy-core",
"pin-project",
"tokio 0.2.19",
"tokio 0.2.20",
"tower 0.3.1",
]

@@ -1234,7 +1233,7 @@ dependencies = [
"rand 0.7.2",
"task-compat",
"tokio 0.1.22",
"tokio 0.2.19",
"tokio 0.2.20",
"tokio-connect",
"tokio-timer",
"tower 0.1.1",
@@ -1438,7 +1437,7 @@ dependencies = [
"futures 0.3.4",
"linkerd2-error",
"pin-project",
"tokio 0.2.19",
"tokio 0.2.20",
"tower 0.3.1",
]

@@ -1486,7 +1485,7 @@ dependencies = [
"linkerd2-error",
"linkerd2-stack",
"pin-project",
"tokio 0.2.19",
"tokio 0.2.20",
"tokio-connect",
"tokio-test",
"tower 0.3.1",
@@ -1766,18 +1765,18 @@ dependencies = [

[[package]]
name = "pin-project"
version = "0.4.8"
version = "0.4.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7804a463a8d9572f13453c516a5faea534a2403d7ced2f0c7e100eeff072772c"
checksum = "6f6a7f5eee6292c559c793430c55c00aea9d3b3d1905e855806ca4d7253426a2"
dependencies = [
"pin-project-internal",
]

[[package]]
name = "pin-project-internal"
version = "0.4.8"
version = "0.4.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "385322a45f2ecf3410c68d2a549a4a2685e8051d0f278e39743ff4e451cb9b3f"
checksum = "8988430ce790d8682672117bc06dda364c0be32d3abd738234f19f3240bad99a"
dependencies = [
"proc-macro2 1.0.10",
"quote 1.0.2",
@@ -1792,9 +1791,9 @@ checksum = "237844750cfbb86f67afe27eee600dfbbcb6188d734139b534cbfbf4f96792ae"

[[package]]
name = "pin-utils"
version = "0.1.0-alpha.4"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5894c618ce612a3fa23881b152b608bafb8c56cfc22f434a3ba3120b40f7b587"
checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184"

[[package]]
name = "ppv-lite86"
@@ -2169,9 +2168,9 @@ dependencies = [

[[package]]
name = "ring"
version = "0.16.7"
version = "0.16.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "796ae8317a07b04dffb1983bdc7045ccd02f741f0b411704f07fd35dbf99f757"
checksum = "1ba5a8ec64ee89a76c98c549af81ff14813df09c3e6dc4766c3856da48597a0c"
dependencies = [
"cc",
"lazy_static",
@@ -2266,9 +2265,9 @@ dependencies = [

[[package]]
name = "sharded-slab"
version = "0.0.8"
version = "0.0.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ae75d0445b5d3778c9da3d1f840faa16d0627c8607f78a74daf69e5b988c39a1"
checksum = "06d5a3f5166fb5b42a5439f2eee8b9de149e235961e3eb21c5808fc3ea17ff3e"
dependencies = [
"lazy_static",
]
@@ -2447,11 +2446,10 @@ dependencies = [

[[package]]
name = "tokio"
version = "0.2.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7d9c43f1bb96970e153bcbae39a65e249ccb942bd9d36dbdf086024920417c9c"
version = "0.2.20"
source = "git+https://github.com/tokio-rs/tokio?rev=45773c56413267cbcf9d5e7877e8dc4afc1e5b07#45773c56413267cbcf9d5e7877e8dc4afc1e5b07"
dependencies = [
"bytes 0.5.3",
"bytes 0.5.4",
"fnv",
"futures-core",
"lazy_static",
@@ -2494,7 +2492,7 @@ dependencies = [
"futures-core",
"futures-util",
"pin-project-lite",
"tokio 0.2.19",
"tokio 0.2.20",
"tokio-current-thread",
"tokio-executor",
"tokio-reactor",
@@ -2555,8 +2553,7 @@ dependencies = [
[[package]]
name = "tokio-macros"
version = "0.2.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f0c3acc6aa564495a0f2e1d59fab677cd7f81a19994cfc7f3ad0e64301560389"
source = "git+https://github.com/tokio-rs/tokio?rev=45773c56413267cbcf9d5e7877e8dc4afc1e5b07#45773c56413267cbcf9d5e7877e8dc4afc1e5b07"
dependencies = [
"proc-macro2 1.0.10",
"quote 1.0.2",
@@ -2638,13 +2635,13 @@ dependencies = [

[[package]]
name = "tokio-test"
version = "0.2.0"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "09cf9705471976fa5fc6817d3fbc9c4ff9696a6647af0e5c1870c81ca7445b05"
checksum = "ed0049c119b6d505c4447f5c64873636c7af6c75ab0d45fd9f618d82acb8016d"
dependencies = [
"bytes 0.5.3",
"bytes 0.5.4",
"futures-core",
"tokio 0.2.19",
"tokio 0.2.20",
]

[[package]]
@@ -2714,13 +2711,13 @@ version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "be8242891f2b6cbef26a2d7e8605133c2c554cd35b3e4948ea892d6d68436499"
dependencies = [
"bytes 0.5.3",
"bytes 0.5.4",
"futures-core",
"futures-io",
"futures-sink",
"log",
"pin-project-lite",
"tokio 0.2.19",
"tokio 0.2.20",
]

[[package]]
@@ -2749,7 +2746,7 @@ dependencies = [
"futures-core",
"futures-util",
"pin-project",
"tokio 0.2.19",
"tokio 0.2.20",
"tower-layer 0.3.0 (git+https://github.com/tower-rs/tower?rev=8752a3811788e94670c62dc0acbc9613207931b1)",
"tower-service 0.3.0",
"tracing",
@@ -2966,7 +2963,7 @@ checksum = "9ba4bbc2c1e4a8543c30d4c13a4c8314ed72d6e07581910f665aa13fde0153c8"
dependencies = [
"futures-util",
"pin-project",
"tokio 0.2.19",
"tokio 0.2.20",
"tokio-test",
"tower-layer 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"tower-service 0.3.0",
@@ -3021,12 +3018,11 @@ dependencies = [

[[package]]
name = "tracing-core"
version = "0.1.6"
version = "0.1.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "528c8ebaaa16cdac34795180b046c031775b0d56402704d98c096788f33d646a"
checksum = "0aa83a9a47081cd522c09c81b31aec2c9273424976f922ad61c053b58350b715"
dependencies = [
"lazy_static",
"spin",
]

[[package]]
@@ -3043,9 +3039,9 @@ dependencies = [

[[package]]
name = "tracing-futures"
version = "0.2.3"
version = "0.2.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "58b0b7fd92dc7b71f29623cc6836dd7200f32161a2313dd78be233a8405694f6"
checksum = "ab7bb6f14721aa00656086e9335d363c5c8747bae02ebe32ea2c7dece5689b4c"
dependencies = [
"futures 0.1.26",
"pin-project",
@@ -3075,9 +3071,9 @@ dependencies = [

[[package]]
name = "tracing-subscriber"
version = "0.2.3"
version = "0.2.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dedebcf5813b02261d6bab3a12c6a8ae702580c0405a2e8ec16c3713caf14c20"
checksum = "1d53c40489aa69c9aed21ff483f26886ca8403df33bdc2d2f87c60c1617826d2"
dependencies = [
"ansi_term",
"chrono",
3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -65,4 +65,5 @@ debug = false
webpki = { git = "https://github.com/seanmonstar/webpki", branch = "cert-dns-names-0.21" }
# backport danburkert/prost#268 to `prost` 0.5 temporarily.
prost = { git = "https://github.com/linkerd/prost", branch = "v0.5.x" }
tower = { version = "0.3", git = "https://github.com/tower-rs/tower", rev = "8752a3811788e94670c62dc0acbc9613207931b1"}
tower = { version = "0.3", git = "https://github.com/tower-rs/tower", rev = "8752a3811788e94670c62dc0acbc9613207931b1"}
tokio = { version = "0.2", git = "https://github.com/tokio-rs/tokio", rev = "45773c56413267cbcf9d5e7877e8dc4afc1e5b07"}
19 changes: 10 additions & 9 deletions linkerd/app/core/src/svc.rs
Original file line number Diff line number Diff line change
@@ -251,15 +251,16 @@ impl<S> Stack<S> {
// self.push(http::insert::target::layer())
// }

// pub fn cache<T, L, U>(self, track: L) -> Stack<cache::Cache<T, cache::layer::NewTrack<L, S>>>
// where
// T: Eq + std::hash::Hash,
// S: NewService<T> + Clone,
// L: tower::layer::Layer<cache::layer::Track<S>> + Clone,
// L::Service: NewService<T, Service = U>,
// {
// self.push(cache::CacheLayer::new(track))
// }
pub fn cache<T, L, U>(self, track: L) -> Stack<cache::Cache<T, cache::layer::NewTrack<L, S>>>
where
T: Eq + std::hash::Hash + 'static,
S: NewService<T> + Clone,
S::Service: 'static,
L: tower::layer::Layer<cache::layer::Track<S>> + Clone,
L::Service: NewService<T, Service = U>,
{
self.push(cache::CacheLayer::new(track))
}

pub fn push_fallback<F: Clone>(self, fallback: F) -> Stack<stack::Fallback<S, F>> {
self.push(stack::FallbackLayer::new(fallback))
2 changes: 1 addition & 1 deletion linkerd/app/integration/Cargo.toml
Original file line number Diff line number Diff line change
@@ -44,7 +44,7 @@ tower = "0.1"
tower-grpc = { version = "0.1", default-features = false, features = ["protobuf"] }
tracing = "0.1.9"
tracing-futures = "0.1"
webpki = "0.21"
webpki = "=0.21.0"
Copy link
Member

Choose a reason for hiding this comment

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

BTW, i published an updated version of our fork a while ago https://github.com/linkerd/webpki/tree/cert-dns-names-0.21

futures-03 = { package = "futures", version = "0.3", features = ["compat"]}

[dev-dependencies]
6 changes: 3 additions & 3 deletions linkerd/cache/Cargo.toml
Original file line number Diff line number Diff line change
@@ -6,11 +6,11 @@ edition = "2018"
publish = false

[dependencies]
futures = "0.1"
futures = "0.3"
linkerd2-error = { path = "../error" }
linkerd2-lock = { path = "../lock" }
linkerd2-stack = { path = "../stack" }
tokio = "0.1"
tower = "0.1"
tokio = "0.2"
tower = { version = "0.3", default-features = false, features = ["util"] }
tracing = "0.1"
tracing-futures = "0.1"
Loading