Repository navigation
vendor: github.com/containerd/log main, use log.Level consts for log-levels - #14019
Conversation
thaJeztah
commented
Aug 23, 2026
- testing log: allow SetLevel to accept Level values log#22
There was a problem hiding this comment.
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/logand update log level/format syncing. - Update
log.SetLevel(...)call sites to use typed level constants (e.g.,log.DebugLevel) and modernize octal file modes to0o.... - Temporarily
replacegithub.com/containerd/logto 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.
8b8953a to
02321ba
Compare
There was a problem hiding this comment.
🟡 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
65ff2a7 to
225e4a5
Compare
|
@dmcgowan this one should be ready to go now |
There was a problem hiding this comment.
🟡 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
It's not called in containerd currently, so doesn't have an impact |
no diff: same code, but tagged Signed-off-by: Sebastiaan van Stijn <[email protected]>
full diff: containerd/log@v0.1.0...v0.2.0 Signed-off-by: Sebastiaan van Stijn <[email protected]>
Signed-off-by: Sebastiaan van Stijn <[email protected]>
225e4a5 to
b178103
Compare
There was a problem hiding this comment.
🟢 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