Skip to content

internal/cri/server: avoid debug log formatting for container spec - #13972

Merged
samuelkarp merged 1 commit into
containerd:mainfrom
thaJeztah:no_spew
Aug 28, 2026
Merged

samuelkarp merged 1 commit into
containerd:mainfrom
thaJeztah:no_spew

Conversation

@thaJeztah

Copy link
Copy Markdown
Member

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.

Copilot AI lite review requested due to automatic review settings August 17, 2026 13:44
@github-project-automation github-project-automation Bot moved this to Needs Triage in Pull Request Review Aug 17, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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 calls log.G(ctx) again inside the if, leaving logger unused. Also, the log message is truncated ("sandbox container spe"). Use the existing logger entry 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,

Copilot AI review requested due to automatic review settings August 28, 2026 17:37
@thaJeztah thaJeztah added this to the 2.4 milestone Aug 28, 2026
@thaJeztah

Copy link
Copy Markdown
Member Author

rebased @estesp @dmcgowan PTAL

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

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]>
Copilot AI review requested due to automatic review settings August 28, 2026 18:01

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.

@github-project-automation github-project-automation Bot moved this from Needs Triage to Review In Progress in Pull Request Review Aug 28, 2026
@samuelkarp
samuelkarp enabled auto-merge August 28, 2026 18:52
@samuelkarp
samuelkarp added this pull request to the merge queue Aug 28, 2026
Merged via the queue into containerd:main with commit 716cbaf Aug 28, 2026
95 of 98 checks passed
@github-project-automation github-project-automation Bot moved this from Review In Progress to Done in Pull Request Review Aug 28, 2026
@thaJeztah
thaJeztah deleted the no_spew branch August 28, 2026 19:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

5 participants