fix(cli): fix namespace inspect device counts#6325
Merged
Conversation
Replace stale denormalized counters with real-time counts from the store via GetStats. The namespace document counters can drift from reality over time, causing incorrect values to be displayed. Also add online device count and drop the total field to match the UI.
|
Claude finished @geovannewashington's task in 4m 33s —— View job Code Review CompleteReviewed 3 files across code quality, security, testing, Go patterns, and architecture — no issues found. The code looks good as-is. The change correctly replaces denormalized namespace counters with live queries via If you push additional changes and want a new review, tag |
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.
What changed?
Replaced the device count display in
namespace inspectwithreal-time counts from
store.GetStats. Added online device countand removed the total field to align with the UI.
Why
The namespace document stores denormalized device counters that can
drift from reality, e.g. showing
Pending: -1when the actualcount is 2. Querying counts directly from the store guarantees
accurate values.
How to test
./bin/docker-compose up -dcli namespace inspect <namespace>on a namespace withknown device counts
dashboard