feat: enhance fleet status with observability dashboard#928
Merged
Conversation
Upgrade `homeboy fleet status` from a flat version list to a full observability dashboard: - Server health deduplication (shared servers collected once) - Component version drift detection (local vs remote + release state) - Fleet-level summary (servers, components, services, warnings) - Aggregated warnings across all servers with source context - Human-readable table output to stderr in terminals - Exit code 1 when servers unreachable or services down Replaces shadow FleetProjectStatus/FleetComponentStatus types in the CLI layer with richer core types. All three modes preserved: live, --cached, --health-only.
Contributor
Homeboy Results —
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #613
Upgrades
homeboy fleet statusfrom a flat version list to a full fleet observability dashboard — server health, component drift, release state, and fleet-wide summaries in one command.Before vs After
Before:
fleet statusreturnedVec<FleetProjectStatus>with component versions and health. No summary, no drift detection, no release state, no deduplication.After: Returns
FleetStatusResultwith per-project detail AND fleet-wide summary:{ "projects": [{ "project_id": "chubes-site", "server_id": "chubes-net", "health": { "uptime": "2 weeks", "load": {...}, "disk": {"percent": 58}, "memory": {"percent": 10} }, "components": [{ "component_id": "data-machine", "local_version": "0.55.2", "remote_version": "0.54.0", "drift": "needs_update", "unreleased_commits": 0, "version_source": "live" }] }], "summary": { "servers": { "total": 1, "healthy": 1, "warning": 0, "unreachable": 0, "services_up": 0, "services_down": 0 }, "components": { "total": 1, "current": 0, "needs_update": 1, "needs_bump": 0, "unknown": 0 }, "projects": { "total": 1, "healthy": 1, "warning": 0, "unreachable": 0 } } }Human-readable table (stderr in terminals)
What changed
Core (
fleet/status.rs)FleetComponentDriftenum (current, needs_update, behind_remote, needs_bump, docs_only, unknown)calculate_release_state()FleetStatusSummarywith project, component, and server countsFleetWarningwith server_id + project_id contextFleetStatusResult: New wrapper type combining projects + summaryCLI (
commands/fleet.rs)FleetProjectStatus/FleetComponentStatustypes (used core types directly)Modes preserved
fleet status <id>— full live dashboardfleet status <id> --cached— local versions only, no SSHfleet status <id> --health-only— health metrics only, skip componentsTesting