Skip to content

Commit

Permalink
fix(controller): change fmt error format
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielcorado committed Sep 8, 2020
1 parent 3fcff20 commit fd366f7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion controller/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ func ScaleUp(

shouldNotProceedErr, err := shouldScaleUpProceed(l, redisClient, scheduler.Name, mr)
if err != nil {
return fmt.Errorf("failed to check whether scale up should proceed: %w", err)
return fmt.Errorf("failed to check whether scale up should proceed: %s", err)
}

if shouldNotProceedErr != nil {
Expand Down
2 changes: 1 addition & 1 deletion controller/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -849,7 +849,7 @@ func shouldScaleUpProceed(
}

if err := podsInInvalidWaitingState(logger, redisClient, namespace, pods); err != nil {
return fmt.Errorf("invalid pod waiting state: %w", err), nil
return fmt.Errorf("invalid pod waiting state: %s", err), nil
}

// Everything is fine, scale up can proceed.
Expand Down
2 changes: 1 addition & 1 deletion models/pod.go
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ func ValidatePodWaitingState(pod *Pod) error {
for _, invalidState := range InvalidPodWaitingStates {
status := &pod.Status
if checkWaitingReason(status, invalidState) {
return fmt.Errorf("%w: one or more containers in pod are in %s", InvalidPodWaitingStateErr, invalidState)
return fmt.Errorf("%s: one or more containers in pod are in %s", InvalidPodWaitingStateErr, invalidState)
}
}
return nil
Expand Down

0 comments on commit fd366f7

Please sign in to comment.