fix: clean up malformed CNI error output#762
Open
immanuwell wants to merge 1 commit into
Open
Conversation
raykroeker
requested changes
Jun 23, 2026
raykroeker
left a comment
Contributor
There was a problem hiding this comment.
Thanks @immanuwell for the PR. Instead of using format strings, please use the structured error field on the logger.
Signed-off-by: immanuwell <pchpr.00@list.ru>
78f82d6 to
3c7b884
Compare
Author
|
@raykroeker done, addressed all the requested changes, PTAL |
alpeb
reviewed
Jul 1, 2026
alpeb
left a comment
Member
There was a problem hiding this comment.
Thanks @immanuwell , the main change looks good. I don't think you should add a unit test for logging though; it tests the logging framework not our behavior and I can see this sort of thing can become a burden to maintain when the framework changes.
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.
This fixes a small but real logging bug in
cni-plugin.Some CNI error paths use
%eforerror, so Go prints%!e(...)junk instead of the actual message. That shows up on normal failures like bad CNI JSON, bad kube config, or missing integration mounts. Kinda noisy, and it hides the real problem.What changed
%vor%sproxy-gidmismatch message in the integration test helperRepro
main, rungo test ./cni-plugin/integration/tests/flannel -run TestLinkerdIsLastCNIPlugin -v%!e(...)Checks
go test ./cni-plugin ./proxy-init/... ./pkg/...