Conversation
|
/kind bug |
|
@mtaufen: GitHub didn't allow me to request PR reviews from the following users: shsjshentao. Note that only kubernetes members and repo collaborators can review this PR, and authors cannot review their own PRs. DetailsIn 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. |
|
if we consider klog usage as GA and user facing -> |
|
@mtaufen we already default to logtostderr in k/k proper and anything that pulls in k/apiserver (which is a lot of stuff, by accident) in previous versions, and now anything that pulls in k/component-base (https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/component-base/logs/logs.go#L37) |
|
#31 I've seen actively confuse plenty of people before, so it's not clear to me that people were actually expecting it to work as it did before #31 merged (which is not the best reason for breaking compatibility, but it's some justification). Practically, it's not clear to me that #42 actually has any impact on anyone's logging. We explicitly state that info log level That being said, I'm not super-against reverting #31 and #42 until we can have a later discussion. |
|
The main reason behind the changes proposed in #39 and #41 is to clarify the development experience and the true default for users. The |
|
We talked about this on the component-wg meeting. The upshot is that #39 is fine to deep (since it's defaulted across k/k and k/component-base anyway), but #42 could cause you to receive extra INFO-level logs on stderr if you're trying to just use files and don't expect much to be going to stderr (since Lines 741 to 748 in ad78c01 SInce #42 and #31 are tied together, it's probably best to revert them together to avoid behavior changes. As a broader effort, we should figure out the semantics that we want for a logging library around things like verbosity, etc, and propose that, figuring out specific deprecation paths for the older stuff. Doing this piecemeal is probably going to be harder. |
d247a75 to
af1d50a
Compare
|
Thanks everyone! |
|
/lgtm We seem to have some amount of concensus among maintainers here (+1 from me, vincepri) and lack of anyone vociferously complaining. I'll give it till tomorrow morning, and then give the approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: DirectXMan12, mtaufen The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Update README file to Markdown 📃
What this PR does / why we need it:
Reverts recent, potentially breaking changes to flag defaults. These block vendoring the latest version of klog into upstream Kubernetes, because they could break user deployments of core Kubernetes components. If these changes are eventually included, they need to be included in a way that respects the upstream deprecation policy (see below).
This PR reverts three other PRs:
Default logtostderr to true #39, which changes the logtostderr default to trueThis, especially, could break existing logging configurations because when set, it disables logs from being sent to files, even if --log_file is set.EDIT: See below conversation, we decided to keep Default logtostderr to true #39 due to pre-existing overrides in k/k, but still revert the other two.Adding these changes back in can be revisited and discussed during code slush, but I would like to back them out in order to get the O_APPEND fix into Kubernetes 1.14.
If we decide to include these changes in upstream Kubernetes, we need to follow the official policy of announcing deprecation of old defaults and waiting the appropriate amount of time before changing them: https://kubernetes.io/docs/reference/using-api/deprecation-policy/. In the future, we need to figure out how to more carefully coordinate changes to defaults in this repo with deprecation policies of other Kubernetes projects.
Release note: