Honor stderrthreshold when logtostderr is enabled#428
Honor stderrthreshold when logtostderr is enabled#428k8s-ci-robot merged 3 commits intokubernetes-sigs:masterfrom
Conversation
Bump k8s.io/klog/v2 to v2.140.0 and opt out of the legacy stderr threshold behavior so that -stderrthreshold is respected even when -logtostderr=true (the default). Set stderrthreshold=INFO to preserve current behavior; users can now override it on the command line. Ref: kubernetes/klog#212, kubernetes/klog#432 Signed-off-by: Pierluigi Lenoci <pierluigilenoci@gmail.com>
The kubernetes-sigs org now requires all actions to be pinned to full-length commit SHAs. Update actions/checkout from v1/v2 tags to v4.2.2 (11bd719) and actions/setup-go from v5 tag to v5.3.0 (f111f33), matching the pattern already used in tag-release.yaml. This fixes the CI failures: "The actions actions/checkout@v2 and actions/setup-go@v5 are not allowed because all actions must be pinned to a full-length commit SHA." Signed-off-by: Pierluigi Lenoci <pierluigilenoci@gmail.com>
|
All three CI failures (verify-goimports, verify-gomod, Kind cluster test) were caused by the same root issue: the Fixed by pinning all actions in
This matches the pinning pattern already used in Note: this is a repo-wide issue — other open PRs (#424, #427) have the same CI failures. |
Run goimports to fix whitespace alignment in hack/smoketest.go and go work sync + go mod tidy to update module dependencies. Signed-off-by: Pierluigi Lenoci <pierluigilenoci@gmail.com>
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: pierluigilenoci, tomasaschan 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 |
What
Bump
k8s.io/klog/v2to v2.140.0 and opt out of the legacy stderr threshold behavior so that-stderrthresholdis respected even when-logtostderr=true(the klog v2 default).Why
klog v2 defaults
-logtostderrtotrue, which silently ignores-stderrthreshold. All log levels are unconditionally sent to stderr, making severity-based filtering impossible for log aggregation systems.This was reported in kubernetes/klog#212 and fixed upstream in kubernetes/klog#432.
How
legacy_stderr_threshold_behavior=falseafterflag.Set("logtostderr", ...)inhack/smoketest.goto opt into the corrected behaviorstderrthreshold=INFOas default to preserve current behavior (all logs still go to stderr)-stderrthreshold=WARNINGor-stderrthreshold=ERROR