New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
update uber zap to 1.16.0 to fix a nil pointer exception #100739
Conversation
Signed-off-by: pacoxu <paco.xu@daocloud.io>
as it is indeed a log problem(json parsing) |
/test pull-kubernetes-e2e-kind-ipv6 |
Thanks catching this! Could you add a test in https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/component-base/logs/json/json_test.go#L36 to prevent future regressions? |
/remove-priority critical-urgent |
/retest |
@pacoxu: GitHub didn't allow me to assign the following users: liggit. Note that only kubernetes members, repo collaborators and people who have commented on this issue/PR can be assigned. Additionally, issues/PRs can only have 10 assignees at the same time. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
test cases were added. I add some test cases for time as well as duration. |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: BenTheElder, dims, liggitt, pacoxu The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/retest Review the full test history for this PR. Silence the bot with an |
1 similar comment
/retest Review the full test history for this PR. Silence the bot with an |
/retest |
/retest Review the full test history for this PR. Silence the bot with an |
/skip |
/retest Review the full test history for this PR. Silence the bot with an |
1 similar comment
/retest Review the full test history for this PR. Silence the bot with an |
/hold |
/hold cancel |
/retest Review the full test history for this PR. Silence the bot with an |
1 similar comment
/retest Review the full test history for this PR. Silence the bot with an |
/retest |
/retest Review the full test history for this PR. Silence the bot with an |
1 similar comment
/retest Review the full test history for this PR. Silence the bot with an |
What type of PR is this?
/kind bug
What this PR does / why we need it:
I ran into a nil point in kubelet log, and after investigation, it was a problem of zap which was fixed.
Which issue(s) this PR fixes:
From k/k side, the message is from https://github.com/kubernetes/kubernetes/blob/v1.20.5/staging/src/k8s.io/apiserver/pkg/server/httplog/httplog.go#L89
It uses arg
latency
which is duration:https://github.com/kubernetes/kubernetes/blob/v1.20.5/staging/src/k8s.io/apiserver/pkg/server/httplog/httplog.go#L158-L186
The error is the same with uber-go/zap#784
uber-go/zap#835 fixed it.
Another easy fix is to make sure the latency here is not nil. I opened #100742 to just fix the error message here.
https://github.com/kubernetes/kubernetes/pull/100742/files
The problem test case is like the above.
Special notes for your reviewer:
Does this PR introduce a user-facing change?