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 version #60

Merged
merged 1 commit into from
Jan 19, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/net.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ on:
- '**.txt'
- 'art'
workflow_dispatch:
schedule: [cron: "40 1 * * *"]
schedule: [cron: "0 1 */7 * *"]

jobs:
test:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/quinn.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ on:
- '**.txt'
- 'art'
workflow_dispatch:
schedule: [cron: "40 1 * * *"]
schedule: [cron: "0 1 */7 * *"]

jobs:
test:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/s2n.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ on:
- '**.txt'
- 'art'
workflow_dispatch:
schedule: [cron: "40 1 * * *"]
schedule: [cron: "0 1 */7 * *"]

jobs:
test:
Expand Down
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,17 @@ rustdoc-args = ["--cfg", "docsrs"]
auto_impl = "1"
atomic_refcell = "0.1"
agnostic-lite = { version = "0.3", features = ["time"] }
agnostic = "0.4"
agnostic = "0.5"
# agnostic-lite = { version = "0.3", features = ["time"], path = "../agnostic/lite" }
# agnostic = { version = "0.4", path = "../agnostic/agnostic" }
# agnostic = { version = "0.5", path = "../agnostic/agnostic" }
async-lock = "3"
async-channel = "2"
bytes = "1"
byteorder = "1"
derive_more = { version = "1", features = ["full"] }
futures = "0.3"
indexmap = "2"
local-ip-address = "0.6"
getifs = "0.2"
metrics = "0.24"
nodecraft = { version = "0.4", features = [
"transformable",
Expand Down
7 changes: 2 additions & 5 deletions core/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "memberlist-core"
version = "0.3.0"
version = "0.3.1"
edition.workspace = true
license.workspace = true
repository.workspace = true
Expand Down Expand Up @@ -32,7 +32,7 @@ rkyv = ["dep:rkyv", "nodecraft/rkyv", "memberlist-types/rkyv"]

# expose all tests fn for users who want to use other runtime
# see memberlist-wasm for more examples about how to use those tests fn
test = ["tracing-subscriber", "pnet"]
test = ["tracing-subscriber"]

[target.'cfg(target_family = "wasm")'.dependencies]
getrandom = { version = "0.2", features = ["js"] }
Expand Down Expand Up @@ -87,8 +87,6 @@ tracing-subscriber = { version = "0.3", optional = true, features = [
"env-filter",
"tracing-log",
] }
pnet = { version = "0.35", optional = true }


# metrics feature
metrics = { workspace = true, optional = true }
Expand All @@ -98,7 +96,6 @@ tracing-subscriber = { version = "0.3", features = [
"env-filter",
"tracing-log",
] }
pnet = "0.35"
agnostic = { workspace = true, features = ["net", "tokio"] }
rand = "0.8"
tokio = { version = "1", features = ["full"] }
Expand Down
5 changes: 2 additions & 3 deletions transports/net/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "memberlist-net"
version = "0.3.1"
version = "0.3.2"
edition.workspace = true
license.workspace = true
repository.workspace = true
Expand Down Expand Up @@ -74,7 +74,7 @@ crc32fast = "1"
either = "1"
futures.workspace = true
indexmap.workspace = true
local-ip-address.workspace = true
getifs.workspace = true
nodecraft = { workspace = true, features = ["async", "resolver", "agnostic"] }
peekable = { version = "0.2", features = ["future"] }
pin-project.workspace = true
Expand All @@ -97,7 +97,6 @@ aes-gcm = { version = "0.10", optional = true }
cbc = { version = "0.1", optional = true }
rayon = { version = "1.8", optional = true }
weezl = { version = "0.1", optional = true }
pnet = { version = "0.34", optional = true }

# serde
serde = { workspace = true, optional = true }
Expand Down
3 changes: 0 additions & 3 deletions transports/net/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ pub enum NetTransportError<A: AddressResolver, W: Wire> {
/// Returns when there is no explicit advertise address and no private IP address found.
#[error("no private IP address found, and explicit IP not provided")]
NoPrivateIP,
/// Returns when there is no interface addresses found.
#[error("failed to get interface addresses {0}")]
NoInterfaceAddresses(#[from] local_ip_address::Error),
/// Returns when there is no bind address provided.
#[error("at least one bind address is required")]
EmptyBindAddresses,
Expand Down
13 changes: 9 additions & 4 deletions transports/net/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -334,10 +334,15 @@

// find final advertise address
let final_advertise_addr = if advertise_addr.ip().is_unspecified() {
let ip = local_ip_address::local_ip().map_err(|e| match e {
local_ip_address::Error::LocalIpAddressNotFound => NetTransportError::NoPrivateIP,
e => NetTransportError::NoInterfaceAddresses(e),
})?;
let ip = getifs::private_addrs()
.map_err(|_| NetTransportError::NoPrivateIP)
.and_then(|ips| {
if let Some(ip) = ips.into_iter().next().map(|ip| ip.addr()) {
Ok(ip)

Check warning on line 341 in transports/net/src/lib.rs

View check run for this annotation

Codecov / codecov/patch

transports/net/src/lib.rs#L337-L341

Added lines #L337 - L341 were not covered by tests
} else {
Err(NetTransportError::NoPrivateIP)

Check warning on line 343 in transports/net/src/lib.rs

View check run for this annotation

Codecov / codecov/patch

transports/net/src/lib.rs#L343

Added line #L343 was not covered by tests
}
})?;
SocketAddr::new(ip, advertise_addr.port())
} else {
advertise_addr
Expand Down
8 changes: 4 additions & 4 deletions transports/quic/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "memberlist-quic"
version = "0.3.0"
version = "0.3.1"
edition.workspace = true
license.workspace = true
repository.workspace = true
Expand Down Expand Up @@ -57,7 +57,7 @@ byteorder.workspace = true
crossbeam-skiplist = "0.1"
futures.workspace = true
indexmap = "2"
local-ip-address.workspace = true
getifs.workspace = true
memberlist-core.workspace = true
nodecraft = { workspace = true, features = ["async", "resolver", "agnostic"] }
pin-project.workspace = true
Expand All @@ -83,8 +83,8 @@ rustls = { version = "0.23", default-features = false, optional = true }
rcgen = { version = "0.13", optional = true }

# s2n
s2n-quic = { version = "1.51", optional = true }
s2n-quic-transport = { version = "0.51", optional = true }
s2n-quic = { version = "1.52", optional = true }
s2n-quic-transport = { version = "0.52", optional = true }

# compression
rayon = { version = "1.8", optional = true }
Expand Down
3 changes: 0 additions & 3 deletions transports/quic/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ pub enum QuicTransportError<A: AddressResolver, S: StreamLayer, W: Wire> {
/// Returns when there is no explicit advertise address and no private IP address found.
#[error("no private IP address found, and explicit IP not provided")]
NoPrivateIP,
/// Returns when there is no interface addresses found.
#[error("failed to get interface addresses {0}")]
NoInterfaceAddresses(#[from] local_ip_address::Error),
/// Returns when there is no bind address provided.
#[error("at least one bind address is required")]
EmptyBindAddresses,
Expand Down
13 changes: 9 additions & 4 deletions transports/quic/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -224,10 +224,15 @@

// find final advertise address
let final_advertise_addr = if advertise_addr.ip().is_unspecified() {
let ip = local_ip_address::local_ip().map_err(|e| match e {
local_ip_address::Error::LocalIpAddressNotFound => QuicTransportError::NoPrivateIP,
e => QuicTransportError::NoInterfaceAddresses(e),
})?;
let ip = getifs::private_addrs()
.map_err(|_| QuicTransportError::NoPrivateIP)
.and_then(|ips| {
if let Some(ip) = ips.into_iter().next().map(|ip| ip.addr()) {
Ok(ip)

Check warning on line 231 in transports/quic/src/lib.rs

View check run for this annotation

Codecov / codecov/patch

transports/quic/src/lib.rs#L227-L231

Added lines #L227 - L231 were not covered by tests
} else {
Err(QuicTransportError::NoPrivateIP)

Check warning on line 233 in transports/quic/src/lib.rs

View check run for this annotation

Codecov / codecov/patch

transports/quic/src/lib.rs#L233

Added line #L233 was not covered by tests
}
})?;
SocketAddr::new(ip, advertise_addr.port())
} else {
advertise_addr
Expand Down
Loading