Change server-side apply error logs to debug level#326
Merged
Conversation
The detailed object logging in serverSideApply is diagnostic information useful during troubleshooting but noisy at default log levels. The error is already returned to the caller, so surfacing the object dump at debug (V(1)) avoids duplicating error context while keeping it available via --zap-log-level=debug. Made-with: Cursor
cmmarslender
approved these changes
Feb 26, 2026
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Starttoaster
enabled auto-merge (squash)
February 26, 2026 23:19
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.
Summary
serverSideApplyfromErrortoV(1).Info(debug level), so it is hidden at the default info log level but available when running with--zap-log-level=debug.error, so the object dump is purely diagnostic and was noisy at the default level.Test plan
--zap-log-level=debugand confirm the object-dump logs appear on apply errors.Made with Cursor
Note
Low Risk
Only adjusts logging behavior on server-side apply failures, lowering noise at default log levels; functional reconcile/apply behavior is unchanged aside from log output and formatting.
Overview
Reduces log noise on server-side apply failures.
serverSideApplyno longer logs a marshaled/indented JSON dump at error level; it now emits the failing object payload atklog.V(1).Info(debug) while still returning the underlying apply error.This also drops the
encoding/jsondependency and switches the diagnostic log to usek8s.io/klog/v2verbosity gating.Written by Cursor Bugbot for commit 06f0872. This will update automatically on new commits. Configure here.