fix(sandbox-manager): reduce log volume in proxy and infra reconciler#579
fix(sandbox-manager): reduce log volume in proxy and infra reconciler#579AiRanthem wants to merge 1 commit into
Conversation
conditionally log sandbox route refresh only when updated downgrade access logs and internal traces for refresh APIs remove redundant debug log for empty reconcile handlers
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #579 +/- ##
==========================================
- Coverage 79.78% 79.76% -0.03%
==========================================
Files 202 202
Lines 14688 14720 +32
==========================================
+ Hits 11719 11741 +22
- Misses 2544 2550 +6
- Partials 425 429 +4
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Ⅰ. Describe what this PR does
Reduces unnecessary log noise in the sandbox-manager process by:
Proxy
handleRefresh: Replacedweb.RegisterRouteframework with plainhttp.HandlerFuncfor the internal system port (7789). This endpoint only serves inter-pod route refresh calls and doesn't need request ID generation, panic recovery wrapper, or the full web framework overhead. Log verbosity raised toV(DebugLogLevel+1).Infra
refreshRoute: Changed to return aboolindicating whether the route actually changed, so the "route refreshed" debug log only fires on real updates — not on every reconcile cycle where the route is already current.Cache controller: Removed a debug log that fired on every reconcile when no handlers are registered — a normal steady-state condition that doesn't need logging.
Bug fix:
refreshRoutewas usingsbx.GetName()to look up routes, but routes are keyed byutils.GetSandboxID(sbx)(namespace + name). Fixed to use the correct key.Ⅱ. Does this pull request fix one issue?
NONE
Ⅲ. Describe how to verify it
go test ./pkg/proxy/... ./pkg/cache/controllers/... ./pkg/sandbox-manager/infra/... -count=1Ⅳ. Special notes for reviews
handleRefreshendpoint is internal-only (port 7789, used for peer route sync). Removing theweb.RegisterRoutewrapper is safe — Go'snet/httpserver has built-in per-connection panic recovery.GetName()alone could miss routes that are keyed with the fullnamespace/nameformat.