Repository navigation
internal/cri/server: avoid debug log formatting for container spec - #13972
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.
Suppressed comments (1)
internal/cri/server/podsandbox/sandbox_run.go:152
- The newly added debug log block creates
logger := log.G(ctx)but then callslog.G(ctx)again inside theif, leavingloggerunused. Also, the log message is truncated ("sandbox container spe"). Use the existingloggerentry and fix the message text.
logger := log.G(ctx)
if logger.Logger.IsLevelEnabled(log.DebugLevel) {
log.G(ctx).WithFields(log.Fields{
"podsandboxid": id,
"spec": spec,
mxpv
approved these changes
Aug 20, 2026
Member
Author
Only construct the debug log entry when debug logging is enabled, and log the runtime spec as a structured field instead of formatting it with spew. Signed-off-by: Sebastiaan van Stijn <[email protected]>
samuelkarp
approved these changes
Aug 28, 2026
samuelkarp
enabled auto-merge
August 28, 2026 18:52
fuweid
approved these changes
Aug 28, 2026
This was referenced Sep 15, 2026
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.
Only construct the debug log entry when debug logging is enabled, and log the runtime spec as a structured field instead of formatting it with spew.