-
Notifications
You must be signed in to change notification settings - Fork 171
Add thv status command for detailed workload info #3161
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Implement a new status command that displays comprehensive information about a specific MCP server workload, including resource usage metrics. Features: - Display workload details: name, status, health context, uptime, group, transport, URL, port, PID, CPU usage, and memory usage - Support both text (key-value) and JSON output formats (--format flag) - Add GetWorkloadStats to Runtime interface for CPU/memory metrics - Add StartedAt and ProcessID fields to core.Workload for uptime/PID tracking Components affected: - cmd/thv/app: New status command and tests - pkg/container/docker: GetWorkloadStats implementation with CPU calculation - pkg/container/kubernetes: GetWorkloadStats stub - pkg/container/runtime: WorkloadStats struct and interface updates - pkg/core: Workload struct extended with StartedAt, ProcessID - pkg/workloads: Manager interface and file_status updates - test/e2e: Status command integration tests Closes stacklok#3053 Signed-off-by: carlos <21148423+carlos-gn@users.noreply.github.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3161 +/- ##
==========================================
- Coverage 64.68% 64.67% -0.02%
==========================================
Files 369 369
Lines 35963 35964 +1
==========================================
- Hits 23264 23261 -3
- Misses 10868 10875 +7
+ Partials 1831 1828 -3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Signed-off-by: carlos <21148423+carlos-gn@users.noreply.github.com>
3e2a8ba to
d869b45
Compare
f1c30dd to
c1fad6e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Large PR Detected
This PR exceeds 1000 lines of changes and requires justification before it can be reviewed.
How to unblock this PR:
Add a section to your PR description with the following format:
## Large PR Justification
[Explain why this PR must be large, such as:]
- Generated code that cannot be split
- Large refactoring that must be atomic
- Multiple related changes that would break if separated
- Migration or data transformationAlternative:
Consider splitting this PR into smaller, focused changes (< 1000 lines each) for easier review and reduced risk.
See our Contributing Guidelines for more details.
This review will be automatically dismissed once you add the justification section.
c1fad6e to
d869b45
Compare
PR size has been reduced below the XL threshold. Thank you for splitting this up!
Signed-off-by: carlos <21148423+carlos-gn@users.noreply.github.com>
4a10bf6 to
2f3e00b
Compare
|
@carlos-gn LGTM, will merge. |
Summary
thv status <workload-name>command to display detailed workload information--formatflagStartedAtandProcessIDfields tocore.Workloadfor uptime and PID trackingTest plan
Closes #3053