Private
Public Access
1
0

fix: ServiceStatusData deserialization mismatch with agent response
Some checks failed
CI Pipeline / Rust Format Check (push) Failing after 4s
CI Pipeline / Clippy Lints (push) Successful in 45s
CI Pipeline / Rust Unit Tests (push) Successful in 1m2s
CI Pipeline / Security Audit (push) Successful in 5s
CI Pipeline / Frontend Lint & Type Check (push) Failing after 9s
CI Pipeline / Build .deb & Release (push) Has been skipped

Manager expected fields: name, status, healthy, uptime_secs
Agent actually returns: name, display_name, active_state, sub_state,
load_state, enabled_state, main_pid, healthy

Updated ServiceStatusData to match agent response format.
Updated health_check_poller.rs to use new field names.
This commit is contained in:
2026-05-05 15:13:41 +00:00
parent 6eeedb1793
commit c51b48f7b0
2 changed files with 20 additions and 9 deletions

View File

@ -262,15 +262,18 @@ async fn run_service_check(
Ok(data) => {
let detail = if data.healthy {
format!(
"Service '{}' is {} (uptime: {}s)",
"Service '{}' is {}/{} (enabled: {})",
data.name,
data.status,
data.uptime_secs.map_or("N/A".to_string(), |s| s.to_string())
data.active_state,
data.sub_state,
data.enabled_state
)
} else {
format!(
"Service '{}' status: {} (unhealthy)",
data.name, data.status
"Service '{}' status: {}/{} (unhealthy, enabled: {})",
data.name, data.active_state,
data.sub_state,
data.enabled_state
)
};
(data.healthy, detail)