fix: opt into fixed klog stderrthreshold behavior#3944
fix: opt into fixed klog stderrthreshold behavior#3944pierluigilenoci wants to merge 2 commits intokcp-dev:mainfrom
Conversation
|
Hi @pierluigilenoci. Thanks for your PR. I'm waiting for a kcp-dev member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions 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. |
|
/retest That's odd. Might be the infra flaking. |
|
/retest |
|
/kind bug |
|
I would want to wait until the same version of klog lands here via rebase. Now this unaligns us from upstream |
|
@mjudeikis Thanks for the review and the context — that makes sense. You're right that this PR bumps Happy to keep this on hold until klog v2.140.0 (or newer) lands via upstream rebase. Once it does, the go.mod changes can be dropped and only the |
|
Hi @mjudeikis — just a heads-up: klog v2.140.0 was released on March 6, 2026 (https://github.com/kubernetes/klog/releases/tag/v2.140.0), so the upstream dependency is now available. I notice this PR also has a merge conflict that needs resolving. Would you like me to rebase and update the PR to align with the current main branch? Once rebased, the Let me know how you'd like to proceed. Thank you! |
a7eca18 to
c3238ca
Compare
|
Hey, we are waiting to rebase our kubernetes fork on a kubernetes version, which will likely be released at the end of this month. When that is released we'll rebase our fork and kcp and then this pr can be rebased. |
CI fix pushedRoot cause: The
Fix: bumped Regarding |
|
/retest |
|
Hi @ntnn @mjudeikis — I noticed the K8s fork bump landed on Apr 20 (24a0254), but klog remains at v2.130.1 in main. Since klog v2.140.0 didn't come through the rebase, would it make sense to lift the /hold and bump klog separately in this PR? Happy to rebase and adjust as needed. Thanks! |
|
Hi; that was just a bump of the old rebase to handle an unrelated ticket - namely making the upstream kubernetes garbage collector cluster-aware. |
62ee75f to
c187e3a
Compare
klog v2 defaults -logtostderr to true. When this flag is active, the -stderrthreshold flag is silently ignored — all log messages are unconditionally written to stderr regardless of severity. Bump klog from v2.130.1 to v2.140.0 in both staging modules (cli, code-generator) and opt into the fixed behavior in all 6 binaries (kubectl-kcp, kubectl-ws, kubectl-create-workspace, cluster-client-gen, cluster-informer-gen, cluster-lister-gen). The default stderrthreshold remains INFO so the observable behavior is unchanged. Ref: kubernetes/klog#212, kubernetes/klog#432 Signed-off-by: Pierluigi Lenoci <pierluigilenoci@gmail.com>
c187e3a to
be2a86b
Compare
Align all go.mod files in staging/ to use the same klog version as the root module, fixing verify-go-modules CI check. Signed-off-by: Pierluigi Lenoci <pierluigilenoci@gmail.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
@pierluigilenoci: The following tests failed, say
DetailsInstructions 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. |
Problem
klog v2 defaults
-logtostderrtotrue. When this flag is active, the-stderrthresholdflag is silently ignored — all log messages of every severity (INFO, WARNING, ERROR, FATAL) are unconditionally written to stderr.This has been an open issue since 2020: kubernetes/klog#212
Fix
Bump klog from v2.130.1 to v2.140.0 in both staging modules (
cli,code-generator) and opt into the fixed behavior in all 6 binaries:kubectl-kcp,kubectl-ws,kubectl-create-workspacecluster-client-gen,cluster-informer-gen,cluster-lister-genThe default
stderrthresholdremainsINFOso the observable behavior is unchanged.References