Skip to content

Commit

Permalink
Adding "vet" target to Makefile.
Browse files Browse the repository at this point in the history
Added "vet" target to Makefile and fixed vet-reported issue.
  • Loading branch information
jmencak committed Jan 28, 2020
1 parent d05a19c commit d585821
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@ else
@exit 1
endif

vet:
$(GO) vet ./...

test:
$(GO) test ./cmd/... ./pkg/... -coverprofile cover.out

Expand Down
1 change: 0 additions & 1 deletion pkg/operator/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,6 @@ func (c *Controller) syncProfile(tuned *tunedv1.Tuned, nodeName string) error {
if err != nil {
return fmt.Errorf("failed to update Profile: %v", err)
}
return nil
}

return nil
Expand Down
2 changes: 1 addition & 1 deletion pkg/operator/profilecalculator.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ func (pc *ProfileCalculator) podChangeHandler(podNamespace string, podName strin
podLabels := pc.state.podLabels[nodeName]

if !mapOfStringsEqual(podLabelsNew, podLabels[podNamespaceName]) {
// Node labels for nodeName changed
// Pod podName labels on nodeName changed
klog.V(3).Infof("Pod %q labels on Node %q changed: %v", podName, nodeName, true)
changeNodeWide := podLabelsNodeWideChange(podLabels, podNamespaceName, podLabelsNew)
podLabels[podNamespaceName] = podLabelsNew
Expand Down
2 changes: 1 addition & 1 deletion pkg/operator/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ func (c *Controller) computeStatusConditions(conditions []configv1.ClusterOperat
klog.V(3).Infof("operator unavailable for longer than %d seconds, setting Degraded status.", maxTunedUnavailable)
degradedCondition.Status = configv1.ConditionTrue
degradedCondition.Reason = "TunedUnavailable"
degradedCondition.Message = fmt.Sprintf("DaemonSet %q unavailable for more than %d seconds.", maxTunedUnavailable)
degradedCondition.Message = fmt.Sprintf("DaemonSet %q unavailable for more than %d seconds.", dsName, maxTunedUnavailable)
}
}
conditions = clusteroperator.SetStatusCondition(conditions, &degradedCondition)
Expand Down
2 changes: 0 additions & 2 deletions pkg/tuned/tuned.go
Original file line number Diff line number Diff line change
Expand Up @@ -661,8 +661,6 @@ func changeWatcher() (err error) {
}
}
}

return nil
}

func retryLoop() (err error) {
Expand Down

0 comments on commit d585821

Please sign in to comment.