mirror of
https://github.com/prometheus/prometheus.git
synced 2025-03-05 20:59:13 -08:00
Run lint
Signed-off-by: Filip Petkovski <filip.petkovsky@gmail.com>
This commit is contained in:
parent
2ccea83913
commit
355a84ad4c
|
@ -16,7 +16,6 @@ package config
|
|||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"github.com/prometheus/prometheus/promql/parser"
|
||||
"log/slog"
|
||||
"mime"
|
||||
"net/url"
|
||||
|
@ -37,6 +36,7 @@ import (
|
|||
"github.com/prometheus/prometheus/discovery"
|
||||
"github.com/prometheus/prometheus/model/labels"
|
||||
"github.com/prometheus/prometheus/model/relabel"
|
||||
"github.com/prometheus/prometheus/promql/parser"
|
||||
"github.com/prometheus/prometheus/storage/remote/azuread"
|
||||
"github.com/prometheus/prometheus/storage/remote/googleiam"
|
||||
)
|
||||
|
@ -882,7 +882,7 @@ func (a *ScrapeRuleConfig) Validate() error {
|
|||
return fmt.Errorf("invalid scrape rule expression: %w", err)
|
||||
}
|
||||
|
||||
parser.Inspect(expr, func(node parser.Node, nodes []parser.Node) error {
|
||||
parser.Inspect(expr, func(node parser.Node, _ []parser.Node) error {
|
||||
if _, ok := node.(*parser.MatrixSelector); ok {
|
||||
err = errors.New("matrix selectors are not allowed in scrape rule expressions")
|
||||
return err
|
||||
|
|
|
@ -2603,4 +2603,4 @@ func TestScrapeRuleConfigs(t *testing.T) {
|
|||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -189,12 +189,12 @@ func (s *seriesSet) At() storage.Series {
|
|||
Metric: sample.metric,
|
||||
Histograms: []promql.HPoint{{T: sample.t, H: sample.fh}},
|
||||
})
|
||||
} else {
|
||||
return promql.NewStorageSeries(promql.Series{
|
||||
Metric: sample.metric,
|
||||
Floats: []promql.FPoint{{T: sample.t, F: sample.f}},
|
||||
})
|
||||
}
|
||||
|
||||
return promql.NewStorageSeries(promql.Series{
|
||||
Metric: sample.metric,
|
||||
Floats: []promql.FPoint{{T: sample.t, F: sample.f}},
|
||||
})
|
||||
}
|
||||
|
||||
func (s *seriesSet) Err() error { return nil }
|
||||
|
|
Loading…
Reference in a new issue