-
Notifications
You must be signed in to change notification settings - Fork 38.6k
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 prints a klog warning by default in library code which is not allowed #94428
Comments
/sig cli |
/good-first-issue |
@dims: Please ensure the request meets the requirements listed here. If this request no longer meets these requirements, the label can be removed 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. |
Hi @soltysh are you working on this issue already? If not I'd like to tackle this issue :) |
/assign |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
/assign |
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-contributor-experience at kubernetes/community. |
/assign |
This is now documented by kubernetes/community#5492 /close |
@ehashman: Closing this issue. 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. |
/reopen strictly speaking kubernetes/community#5492 only documented the convention in general, but the specific problem raised here isn't addressed yet - #95517 and #99033 are 2 PRs open about it. |
@ehashman: Reopened this issue. 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. |
/remove-lifecycle rotten |
/triage accepted |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-contributor-experience at kubernetes/community. |
/remove-lifecycle stale |
/lifecycle frozen |
/assign |
Hey is this issue still open to work with ? |
Hello Team Kubernetes, I am a beginner and would like to contribute to this repository. May I begin with this issue if possible? Thank You |
/assign |
What happened:
A code change was merged that used
klog.Warningf
in library code by default (NewDefaultClientLoadingRules
changed in a way that impacted all code in the world which uses that default, which is pretty common), which is not allowed by convention in Kube because client libraries may be used in UIs that wish to control output (klog is not consistent with other output). The code change should have had a callback that allowed clients to optionally decide to print, not print to Warningf by default.#78185 (comment)
We should also document the convention for other reviewers that logging by default in client libraries is disallowed.
For instance, a callback would have allowed kubectl to print a human readable message
warning: KUBECONFIG does not exist
in general, and in specific cases (likekubectl config
or login flows where KUBECONFIG not existing is totally reasonable) not print a message.Anything else we need to know?:
Environment:
kubectl version
):cat /etc/os-release
):uname -a
):The text was updated successfully, but these errors were encountered: