feat(scout): time storage device cleanup#3958
Conversation
Scout now reports per-device cleanup latency and result through one terminal Event while retaining the existing NVMe and HDD/SAS diagnostics. - Replaces the terminal cleanup records with `ScoutStorageDeviceCleanup` while preserving their `INFO`/`ERROR` levels and messages. - Records `carbide_scout_storage_device_cleanup_duration_seconds` by bounded `device_type` and `outcome` labels. - Covers all four device/result combinations with table-driven log and histogram assertions. Tests added! This supports NVIDIA#3908 Signed-off-by: Chet Nichols III <chetn@nvidia.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (3)
Summary by CodeRabbit
WalkthroughStorage cleanup now emits structured per-device metrics and dynamic success/failure logs for NVMe and HDD/SAS operations. Tests validate labels, error context, duration observations, and log fields; observability documentation lists the new histogram metric. ChangesStorage cleanup observability
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related issues
Sequence Diagram(s)sequenceDiagram
participant CleanupTask
participant ScoutStorageDeviceCleanup
participant CarbideInstrument
CleanupTask->>ScoutStorageDeviceCleanup: construct device type, duration, and result
ScoutStorageDeviceCleanup->>CarbideInstrument: emit structured log and histogram observation
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
@coderabbitai full_review, thanks! |
|
✅ Action performedFull review finished. |
|
🌿 Preview your docs: https://nvidia-preview-pull-request-3958.docs.buildwithfern.com/infra-controller |
Scout now reports per-device cleanup latency and result through one terminal Event while retaining the existing NVMe and HDD/SAS diagnostics.
ScoutStorageDeviceCleanupwhile preserving theirINFO/ERRORlevels and messages.carbide_scout_storage_device_cleanup_duration_secondsby boundeddevice_typeandoutcomelabels.Related issues
This supports #3908
Type of Change
Breaking Changes
Testing
Unit tests added/updated
Integration tests added/updated
Manual testing performed
No testing required (docs, internal refactor, etc.)
cargo test -p carbide-scout metrics::tests --bin forge-scoutcargo make format-nightlycargo make clippycargo make carbide-lintscargo make check-event-namescargo xtask check-metric-docsAdditional Notes
Device paths remain on the existing cleanup spans so the histogram has only the four bounded
device_type/outcomeseries.