Skip to content

Commit cf0f4b4

Browse files
sbernauerTechassi
authored andcommitted
chore: Dependecy bumps (#63)
* chore: Dependecy bumps * Bump to 0.4.0 * Use new op-rs tags
1 parent 1f623fa commit cf0f4b4

3 files changed

Lines changed: 34 additions & 13 deletions

File tree

crates/containerdebug/CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@ All notable changes to this project will be documented in this file.
44

55
## [Unreleased]
66

7+
## [0.4.0] - 2026-05-19
8+
9+
### Changed
10+
11+
- Bump `hickory-resolver` to 0.26, `sysinfo` to 0.39 and Rust to 1.95.0 ([#63]).
12+
13+
[#63]: https://github.com/stackabletech/containerdebug/pull/63
14+
715
### Fixed
816

917
- Don't log ANSI escape sequences if stdout is a file ([#59]).

crates/containerdebug/Cargo.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
[package]
22
name = "containerdebug"
3-
version = "0.3.0"
3+
version = "0.4.0"
44
edition = "2024"
55

66
[dependencies]
77
clap = { version = "4.6", features = ["derive"] }
8-
hickory-resolver = "0.25"
8+
hickory-resolver = "0.26"
99
local-ip-address = "0.6"
1010
serde = { version = "1.0", features = ["derive"] }
1111
serde_json = "1.0"
1212
snafu = "0.9"
13-
sysinfo = { version = "0.38", features = ["serde"] }
13+
sysinfo = { version = "0.39", features = ["serde"] }
1414
tokio = { version = "1.51", default-features = false, features = ["rt-multi-thread", "macros"] }
1515
tracing = "0.1"
1616

17-
stackable-shared = {git = "https://github.com/stackabletech/operator-rs", tag = "stackable-telemetry-0.6.3", default-features = false }
18-
stackable-telemetry = {git = "https://github.com/stackabletech/operator-rs", tag = "stackable-telemetry-0.6.3", default-features = false, features = ["clap"] }
17+
stackable-shared = {git = "https://github.com/stackabletech/operator-rs", tag = "stackable-shared-0.1.1", default-features = false }
18+
stackable-telemetry = {git = "https://github.com/stackabletech/operator-rs", tag = "stackable-telemetry-0.6.4", default-features = false, features = ["clap"] }
1919

2020
[build-dependencies]
2121
built = { version = "0.8", features = ["chrono", "git2"] }

crates/containerdebug/src/system_information/network.rs

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
use hickory_resolver::{
2-
TokioResolver, name_server::TokioConnectionProvider, system_conf::read_system_conf,
2+
TokioResolver, net::runtime::TokioRuntimeProvider, proto::rr::RData,
3+
system_conf::read_system_conf,
34
};
45
use local_ip_address::list_afinet_netifas;
56
use serde::Serialize;
@@ -31,11 +32,19 @@ static GLOBAL_DNS_RESOLVER: LazyLock<Option<TokioResolver>> = LazyLock::new(|| {
3132
};
3233
resolver_opts.timeout = Duration::from_secs(5);
3334

34-
Some(
35-
TokioResolver::builder_with_config(resolver_config, TokioConnectionProvider::default())
36-
.with_options(resolver_opts)
37-
.build(),
38-
)
35+
match TokioResolver::builder_with_config(resolver_config, TokioRuntimeProvider::default())
36+
.with_options(resolver_opts)
37+
.build()
38+
{
39+
Ok(resolver) => Some(resolver),
40+
Err(err) => {
41+
tracing::error!(
42+
error = &err as &dyn std::error::Error,
43+
"failed to build DNS resolver, DNS lookups will be skipped"
44+
);
45+
None
46+
}
47+
}
3948
});
4049

4150
/// Captures all system network information, including network interfaces,
@@ -89,8 +98,12 @@ impl SystemNetworkInfo {
8998
.filter_map(|(ip, reverse_lookup)| match reverse_lookup {
9099
Ok(result) => {
91100
let hostnames = result
92-
.into_iter()
93-
.map(|ptr_record| ptr_record.to_utf8())
101+
.answers()
102+
.iter()
103+
.filter_map(|record| match &record.data {
104+
RData::PTR(ptr) => Some(ptr.0.to_utf8()),
105+
_ => None,
106+
})
94107
.collect();
95108
tracing::info!(%ip, ?hostnames, "performed reverse DNS lookup for IP");
96109
Some((ip, hostnames))

0 commit comments

Comments
 (0)