Skip to content

Commit da64cf9

Browse files
committed
s/valid/valid Prometheus; separate import grouping between github.com and k8s.io
1 parent e81f423 commit da64cf9

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

vertical-pod-autoscaler/pkg/recommender/input/history/history_provider.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ import (
2424
"time"
2525

2626
promapi "github.com/prometheus/client_golang/api"
27-
2827
prometheusv1 "github.com/prometheus/client_golang/api/prometheus/v1"
2928
prommodel "github.com/prometheus/common/model"
29+
3030
"k8s.io/autoscaler/vertical-pod-autoscaler/pkg/recommender/model"
3131
)
3232

@@ -83,12 +83,12 @@ func NewPrometheusHistoryProvider(config PrometheusHistoryProviderConfig) (Histo
8383
// Use Prometheus's model.Duration; this can additionally parse durations in days, weeks and years (as well as seconds, minutes, hours etc)
8484
historyDuration, err := prommodel.ParseDuration(config.HistoryLength)
8585
if err != nil {
86-
return &prometheusHistoryProvider{}, fmt.Errorf("history length %s is not a valid duration: %v", config.HistoryLength, err)
86+
return &prometheusHistoryProvider{}, fmt.Errorf("history length %s is not a valid Prometheus duration: %v", config.HistoryLength, err)
8787
}
8888

8989
historyResolution, err := prommodel.ParseDuration(config.HistoryResolution)
9090
if err != nil {
91-
return &prometheusHistoryProvider{}, fmt.Errorf("history resolution %s is not a valid duration: %v", config.HistoryResolution, err)
91+
return &prometheusHistoryProvider{}, fmt.Errorf("history resolution %s is not a valid Prometheus duration: %v", config.HistoryResolution, err)
9292
}
9393

9494
return &prometheusHistoryProvider{

vertical-pod-autoscaler/pkg/recommender/input/history/history_provider_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ import (
2626
prommodel "github.com/prometheus/common/model"
2727
"github.com/stretchr/testify/assert"
2828
"github.com/stretchr/testify/mock"
29+
2930
"k8s.io/autoscaler/vertical-pod-autoscaler/pkg/recommender/model"
3031
)
3132

0 commit comments

Comments
 (0)