Skip to content

Change server-side apply error logs to debug level#326

Merged
Starttoaster merged 2 commits into
mainfrom
debug-log-level-ssa
Feb 26, 2026
Merged

Change server-side apply error logs to debug level#326
Starttoaster merged 2 commits into
mainfrom
debug-log-level-ssa

Conversation

@Starttoaster

@Starttoaster Starttoaster commented Feb 26, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Demote the detailed object-dump logging in serverSideApply from Error to V(1).Info (debug level), so it is hidden at the default info log level but available when running with --zap-log-level=debug.
  • The error itself is already propagated to callers via the returned error, so the object dump is purely diagnostic and was noisy at the default level.

Test plan

  • Run the operator with default flags and confirm the object-dump logs no longer appear on apply errors.
  • Run the operator with --zap-log-level=debug and 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. serverSideApply no longer logs a marshaled/indented JSON dump at error level; it now emits the failing object payload at klog.V(1).Info (debug) while still returning the underlying apply error.

This also drops the encoding/json dependency and switches the diagnostic log to use k8s.io/klog/v2 verbosity gating.

Written by Cursor Bugbot for commit 06f0872. This will update automatically on new commits. Configure here.

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

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread internal/controller/common/kube/reconcilers.go
@Starttoaster
Starttoaster enabled auto-merge (squash) February 26, 2026 23:19
@Starttoaster
Starttoaster merged commit 26cf76b into main Feb 26, 2026
16 checks passed
@Starttoaster
Starttoaster deleted the debug-log-level-ssa branch February 26, 2026 23:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants