-
Notifications
You must be signed in to change notification settings - Fork 39.9k
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
client-go auth: contextual logging #129336
base: master
Are you sure you want to change the base?
Conversation
No API changes are needed. In one case, a context is passed in via the http.Request. In others there is simply no need to change the calls.
This issue is currently awaiting triage. If a SIG or subproject determines this is a relevant issue, they will accept it by applying the The 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-sigs/prow repository. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: pohly The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
//nolint:logcheck // This looks like debug output which shouldn't occur in practice. | ||
klog.V(2).InfoS("unexpected exec plugin return error type", "type", reflect.TypeOf(err).String(), "err", err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't we update this instead of ignoring?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can update to structured logging, but doing contextual logging didn't seem worth the chain of API changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wait, it is already using structured logging. The suppression is for the "contextual logging" aspect.
I can rewrite as klog.Background().V(2).Info
instead of suppressing the linter, but proper conversion (= avoiding the global logger) probably isn't worth it.
//nolint:logcheck // Should not happen. | ||
klog.V(2).Infof("%s auth provider field depricated, refresh request don't send scopes", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can totally happen so we should update it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But only if used incorrectly, right?
Do you prefer structured logging here?
/test pull-kubernetes-e2e-gce "failed to create fsnotify watcher: too many open files" |
@pohly: The following tests failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. 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-sigs/prow repository. I understand the commands that are listed here. |
What type of PR is this?
/kind cleanup
What this PR does / why we need it:
Part of #129125
Special notes for your reviewer:
No API changes are needed. In one case, a context is passed in via the http.Request. In others there is simply no need to change the calls.
Does this PR introduce a user-facing change?
/wg structured-logging