Skip to content

vendor: github.com/containerd/log main, use log.Level consts for log-levels - #14019

Merged
fuweid merged 3 commits into
containerd:mainfrom
thaJeztah:update_log
Sep 9, 2026
Merged

fuweid merged 3 commits into
containerd:mainfrom
thaJeztah:update_log

Conversation

@thaJeztah

Copy link
Copy Markdown
Member

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

This PR vendors a modified github.com/containerd/log (via a temporary module replace) to test upstream changes (containerd/log#22), including a new slog bridging implementation and a SetLevel API update, and adjusts containerd call sites accordingly.

Changes:

  • Add slog forwarding support to the vendored github.com/containerd/log and update log level/format syncing.
  • Update log.SetLevel(...) call sites to use typed level constants (e.g., log.DebugLevel) and modernize octal file modes to 0o....
  • Temporarily replace github.com/containerd/log to a fork/pseudo-version and refresh vendor metadata (vendor/modules.txt, go.sum).

Reviewed changes

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

Show a summary per file
File Description
vendor/modules.txt Records module replacement of github.com/containerd/log to the forked pseudo-version.
vendor/github.com/containerd/log/slog.go Adds slog hook + forwarding implementation for vendored log package.
vendor/github.com/containerd/log/context.go Updates SetLevel to accept string or Level; syncs slog level/handler on config changes.
vendor/github.com/containerd/log/.golangci.yml Updates vendored linter config (upstream change).
vendor/github.com/containerd/log/.gitattributes Adds vendored git attributes file (upstream change).
plugins/snapshots/devmapper/snapshotter_test.go Updates SetLevel usage and octal literals.
plugins/snapshots/devmapper/pool_device_test.go Updates SetLevel usage and octal literals.
pkg/shim/shim.go Updates debug SetLevel call to use log.DebugLevel.
go.sum Drops old github.com/containerd/log sums and adds forked module sums.
go.mod Adds temporary replace to forked github.com/containerd/log.
core/snapshots/benchsuite/benchmark_test.go Updates SetLevel usage and octal literals.
cmd/ctr/app/main.go Updates debug SetLevel call to use log.DebugLevel.
cmd/containerd-stress/main.go Updates SetLevel calls to use log.WarnLevel / log.DebugLevel.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread go.mod Resolved

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 7 out of 13 changed files in this pull request and generated 1 comment.

Comment thread go.mod Resolved
Copilot AI review requested due to automatic review settings August 27, 2026 20:19
@kubernetes-prow kubernetes-prow Bot added size/XL and removed size/L labels Aug 27, 2026
@thaJeztah thaJeztah changed the title vendor: github.com/containerd/log main, with SetLevel vendor: github.com/containerd/log main, use log.Level consts for log-levels Aug 27, 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.

Pull request overview

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

Copilot AI review requested due to automatic review settings August 28, 2026 19:58

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 7 out of 16 changed files in this pull request and generated no new comments.

Copilot AI review requested due to automatic review settings September 5, 2026 01:01
@thaJeztah
thaJeztah marked this pull request as ready for review September 5, 2026 01:01
@thaJeztah thaJeztah added this to the 2.4 milestone Sep 5, 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.

🟡 Changes recommended

The new vendored UseSlog implementation disables Logrus locking and allocates a new slog hook per log entry, introducing avoidable concurrency risk and performance overhead.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review details
  • Files reviewed: 7/16 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

Comment thread go.mod Resolved
Copilot AI review requested due to automatic review settings September 8, 2026 17:18
@thaJeztah

Copy link
Copy Markdown
Member Author

@dmcgowan this one should be ready to go now

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.

🟡 Changes recommended

UseSlog() disables Logrus locking via SetNoLock(), which can introduce data races when logging and logger configuration happen concurrently.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review details
  • Files reviewed: 7/16 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

@thaJeztah

Copy link
Copy Markdown
Member Author

UseSlog() disables Logrus locking via SetNoLock(), which can introduce data races when logging and logger configuration happen concurrently.

It's not called in containerd currently, so doesn't have an impact

@dmcgowan dmcgowan moved this from Needs Triage to Needs Reviewers in Pull Request Review Sep 9, 2026
no diff: same code, but tagged

Signed-off-by: Sebastiaan van Stijn <[email protected]>
Signed-off-by: Sebastiaan van Stijn <[email protected]>
Copilot AI review requested due to automatic review settings September 9, 2026 06:48

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.

🟢 Approval recommended

The changes are a straightforward dependency bump with consistent call-site updates and no verified functional issues found in the updated logging integration.

Review details
  • Files reviewed: 7/16 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

@github-project-automation github-project-automation Bot moved this from Needs Reviewers to Review In Progress in Pull Request Review Sep 9, 2026
@fuweid
fuweid added this pull request to the merge queue Sep 9, 2026
Merged via the queue into containerd:main with commit 1380d3f Sep 9, 2026
96 of 98 checks passed
@github-project-automation github-project-automation Bot moved this from Review In Progress to Done in Pull Request Review Sep 9, 2026
@thaJeztah
thaJeztah deleted the update_log branch September 14, 2026 07:53
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.

4 participants