fix(operator): warn when VirtualMCPServer inline telemetry is ignored - #6408
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6408 +/- ##
==========================================
+ Coverage 78.13% 78.17% +0.03%
==========================================
Files 768 768
Lines 74649 74660 +11
==========================================
+ Hits 58324 58362 +38
+ Misses 16320 16293 -27
Partials 5 5 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
fc67cfa to
c25df52
Compare
Signed-off-by: Ravi Tharuma <RaviTharuma@users.noreply.github.com>
Review asked emitInlineTelemetryIgnoredEvent to take only the VirtualMCPServer and evaluate Spec.Config.Telemetry and Spec.TelemetryConfigRef inside the helper. Co-authored-by: Ravi Tharuma <RaviTharuma@users.noreply.github.com>
c25df52 to
102a76a
Compare
There was a problem hiding this comment.
Pull request overview
This PR addresses the operator-managed VirtualMCPServer footgun where spec.config.telemetry is ignored by documenting the behavior and emitting a Warning event (InlineTelemetryIgnored) when inline telemetry is set without spec.telemetryConfigRef, helping users understand why /metrics is not registered (and scrapes hit the MCP handler with HTTP 406).
Changes:
- Add a one-shot-style Warning event emission path in the VirtualMCPServer reconciler for ignored inline telemetry.
- Update operator and general observability docs to state that inline telemetry is an operator no-op for VirtualMCPServer and to describe the 406 scrape symptom.
- Add unit test coverage for the new event emission behavior.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| docs/operator/virtualmcpserver-observability.md | Updates vMCP operator observability docs to explain inline telemetry is ignored and that the operator emits a warning. |
| docs/observability.md | Updates general observability docs to distinguish inline telemetry behavior across resource types, including vMCP operator no-op. |
| cmd/thv-operator/controllers/virtualmcpserver_vmcpconfig.go | Emits the inline-telemetry-ignored Warning during VMCP config reconciliation. |
| cmd/thv-operator/controllers/virtualmcpserver_controller.go | Adds emitInlineTelemetryIgnoredEvent helper for Warning event emission. |
| cmd/thv-operator/controllers/virtualmcpserver_controller_test.go | Adds unit tests for the new Warning event emission behavior. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
The unit-test job failed on TestUpstreamTokenRefresher_RowIdentity, which this PR does not touch. Retrigger so required checks can go green. Co-authored-by: Ravi Tharuma <RaviTharuma@users.noreply.github.com>
|
@blkt the nit is in (emitInlineTelemetryIgnoredEvent takes only vmcp and computes usesIgnoredInline internally). Thread is resolved. Please re-review. |
Document that the event is not strictly one-shot, drop the 50ms timeout from the recorder test, and stop claiming CEL rejects inline telemetry plus telemetryConfigRef.
Follow-up from #6276 after closing #6277. Operator ignores spec.config.telemetry and emits a one-shot Warning (InlineTelemetryIgnored) when it is set without telemetryConfigRef. Docs no longer claim inline still works for operator vMCP. /metrics stays unregistered without the ref (HTTP 406).