Skip to content

Commit

Permalink
Merge pull request #868 from marquiz/fixes/klog-errorf
Browse files Browse the repository at this point in the history
logging: do not use %w with klog.Errorf
  • Loading branch information
k8s-ci-robot authored Aug 23, 2022
2 parents da3eed5 + 2c92e1d commit 6842ec3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions pkg/nfd-master/nfd-master.go
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,7 @@ func (m *nfdMaster) UpdateNodeTopology(c context.Context, r *topologypb.NodeTopo
if !m.args.NoPublish {
err := m.updateCR(r.NodeName, r.TopologyPolicies, r.Zones)
if err != nil {
klog.Errorf("failed to advertise NodeResourceTopology: %w", err)
klog.Errorf("failed to advertise NodeResourceTopology: %v", err)
return &topologypb.NodeTopologyResponse{}, err
}
}
Expand All @@ -509,7 +509,7 @@ func (m *nfdMaster) crLabels(r *pb.SetLabelsRequest) map[string]string {
})

if err != nil {
klog.Errorf("failed to list NodeFeatureRule resources: %w", err)
klog.Errorf("failed to list NodeFeatureRule resources: %v", err)
return nil
}

Expand All @@ -525,7 +525,7 @@ func (m *nfdMaster) crLabels(r *pb.SetLabelsRequest) map[string]string {
for _, rule := range spec.Spec.Rules {
ruleOut, err := rule.Execute(r.Features)
if err != nil {
klog.Errorf("failed to process Rule %q: %w", rule.Name, err)
klog.Errorf("failed to process Rule %q: %v", rule.Name, err)
continue
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/resourcemonitor/noderesourcesaggregator.go
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ func (noderesourceData *nodeResources) updateMemoryAvailable(numaData map[int]ma

requestedSize, err := strconv.ParseInt(ri.Data[0], 10, 64)
if err != nil {
klog.Errorf("failed to parse resource requested size: %w", err)
klog.Errorf("failed to parse resource requested size: %v", err)
return
}

Expand Down

0 comments on commit 6842ec3

Please sign in to comment.