-
Notifications
You must be signed in to change notification settings - Fork 170
Add StatusReporter abstraction for vMCP runtime #3159
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
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3159 +/- ##
==========================================
- Coverage 64.79% 64.74% -0.05%
==========================================
Files 381 382 +1
Lines 37149 37187 +38
==========================================
+ Hits 24071 24078 +7
- Misses 11191 11223 +32
+ Partials 1887 1886 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@JAORMX can you take some time to review this PR so that I can keep working this serials. |
|
Sorry for the delay in reviewing this! |
|
Since you guys take your time to get this reviewed. I will try to resolve all these. But it would take some time provided it has been some time. Just let you know. Thanks. |
|
Hey @4t8dd, I owe you an apology. You did everything right and we dropped the ball. Leaving your PR without review for 3 weeks while someone else started re-implementing the same thing isn't okay. Your PR is the one we want to land. Happy to help with the merge conflicts if useful. We're tightening up our process so this doesn't happen again. Thanks for sticking with it. |
743a193 to
89fd73f
Compare
89fd73f to
202016c
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.
Pull request overview
This PR implements a StatusReporter abstraction to enable the vMCP runtime to report operational status. The abstraction provides a foundation for the runtime to communicate its state (phase, discovered backends, health conditions) back to control planes, eliminating the need for duplicate backend discovery between the operator and runtime.
Changes:
- Introduces
StatusReporterinterface withReportStatus()andStart()methods returning shutdown functions - Adds Status model types (Phase, Conditions, DiscoveredBackends) and
ToCRDStatus()mapping method - Implements
LoggingReporterfor CLI mode that logs status at Debug level - Integrates status reporter lifecycle into vMCP server with shutdown function pattern
Reviewed changes
Copilot reviewed 16 out of 16 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| pkg/vmcp/types.go | Adds Status model, Phase constants, Condition constants, DiscoveredBackend type with DeepCopy methods, and ToCRDStatus() conversion method |
| pkg/vmcp/status/reporter.go | Defines StatusReporter interface with ReportStatus and Start methods |
| pkg/vmcp/status/logging_reporter.go | Implements LoggingReporter for CLI mode with debug-level logging |
| pkg/vmcp/status/logging_reporter_test.go | Tests for LoggingReporter covering basic functionality and nil status handling |
| pkg/vmcp/status/doc.go | Package documentation for status reporting abstraction |
| pkg/vmcp/server/server.go | Integrates StatusReporter into server lifecycle with shutdownFuncs pattern |
| pkg/vmcp/server/server_test.go | Adds tests for reporter lifecycle integration and stub reporter for testing |
| cmd/vmcp/app/commands.go | Creates LoggingReporter instance for CLI mode |
| cmd/thv-operator/api/v1alpha1/virtualmcpserver_types.go | Aliases DiscoveredBackend to canonical pkg/vmcp definition |
| cmd/thv-operator/controllers/virtualmcpserver_controller.go | Uses ToCRDStatus() method to simplify status mapping |
| cmd/thv-operator/controllers/virtualmcpserver_discover_backends_test.go | Updates test assertions to use BackendStatus constants |
| cmd/thv-operator/api/v1alpha1/zz_generated.deepcopy.go | Removes autogenerated DeepCopy methods (now in pkg/vmcp/types.go) |
| docs/arch/10-virtual-mcp-architecture.md | Documents status reporting design and integration |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
yrobla
left a comment
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.
please review copilot's comments + some of my pending comments
|
wait.
|
202016c to
934a00f
Compare
|
@JAORMX no problem. I also want to make this before my holiday soon. |
934a00f to
4805e90
Compare
efc52bb to
ff8721f
Compare
Implement StatusReporter interface and LoggingReporter to enable vMCP runtime to report operational status (phase, discovered backends, health conditions). This commit provides: - Reporter interface with ReportStatus() and Start() methods - Status model: Phase, Conditions, DiscoveredBackends - LoggingReporter: Logs status updates for debugging (no persistence) - Integration into vMCP server lifecycle with shutdown function pattern The interface is designed to support future implementations that persist status to different backends. This PR includes only the logging implementation for CLI mode. Integration: - vMCP server calls reporter.Start() which returns shutdown function - CLI mode uses LoggingReporter with logging disabled by default - Status reporting is optional (nil reporter = disabled) Related: stacklok#3147 Signed-off-by: 4t8dd <wanger.xyz@gmail.com>
ff8721f to
8f1ce60
Compare
|
@4t8dd thanks for your hard work and patience there, merging! |
Implement StatusReporter interface and LoggingReporter to enable vMCP runtime to report operational status (phase, discovered backends, health conditions). This commit provides: - Reporter interface with ReportStatus() and Start() methods - Status model: Phase, Conditions, DiscoveredBackends - LoggingReporter: Logs status updates for debugging (no persistence) - Integration into vMCP server lifecycle with shutdown function pattern The interface is designed to support future implementations that persist status to different backends. This PR includes only the logging implementation for CLI mode. Integration: - vMCP server calls reporter.Start() which returns shutdown function - CLI mode uses LoggingReporter with logging disabled by default - Status reporting is optional (nil reporter = disabled) Related: #3147 Signed-off-by: 4t8dd <wanger.xyz@gmail.com>
Implement StatusReporter interface and LoggingReporter to enable vMCP runtime to report operational status (phase, discovered backends, health conditions).
This commit provides:
The interface is designed to support future implementations that persist status to different backends. This PR includes only the logging implementation for CLI mode.
Integration:
Related: #3147