logcheck: detect logger.V().Error#32
Conversation
|
This issue is currently awaiting triage. If logtools contributors determine this is a relevant issue, they will accept it by applying the The 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. |
|
/hold Needs to be checked in Kubernetes. |
|
/hold cancel Works as intended: |
This might be the result of a literal `klog.V().ErrorS` migration. But the semantic is different, which is worth calling out in the linter because it's not a compile error.
…ogging The go-logr package ignores verbosity levels for Error() calls, causing logs to always print regardless of -v flag settings. This change converts V().Error() calls to V().Info() with the error as a key-value pair, ensuring verbosity settings are respected. Affected components: - prober/prober_manager.go (3 instances) - V(8).Error(nil, ...) - prober/prober.go (1 instance) - V(1).Error(err, ...) - lifecycle/handlers.go (4 instances) - V(1).Error(err, ...) - kuberuntime/kuberuntime_container_linux.go (2 instances) - V(5).Error(...) - pleg/generic.go (1 instance) - V(4).Error(err, ...) - allocation/allocation_manager.go (1 instance) - V(3).Error(err, ...) - stats/helper.go (2 instances) - V(6).Error(err, ...) - stats/cri_stats_provider.go (1 instance) - V(5).Error(err, ...) - cm/devicemanager/plugin/v1beta1/client.go (1 instance) - V(2).Error(err, ...) - cm/dra/plugin/dra_plugin_manager.go (1 instance) - V(3).Error(err, ...) - metrics/collectors/cri_metrics.go (1 instance) - V(5).Error(err, ...) This addresses the kubelet portion of the V().Error() misuse. Changes to pkg/kubelet/volumemanager/ are submitted separately due to different OWNERS (sig-storage). Fixes kubernetes#135996 Ref kubernetes#136027 Ref kubernetes-sigs/logtools#32 Signed-off-by: thc1006 <84045975+thc1006@users.noreply.github.com>
|
/assign @thockin |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: pohly, thockin 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 |
This might be the result of a literal
klog.V().ErrorSmigration. But the semantic is different, which is worth calling out in the linter because it's not a compile error.