Skip to content

Commit

Permalink
Remove hardcoding for middleware checking for access to PromQL experi…
Browse files Browse the repository at this point in the history
…mental functions (#10183)
  • Loading branch information
zenador authored Dec 9, 2024
1 parent 4ecfd4c commit d4b0e75
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions pkg/frontend/querymiddleware/experimental_functions.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,7 @@ func containedExperimentalFunctions(expr parser.Expr) map[string]struct{} {
}
agg, ok := node.(*parser.AggregateExpr)
if ok {
// Note that unlike most PromQL functions, the experimental nature of the aggregation functions are manually
// defined and enforced, so they have to be hardcoded here and updated along with changes in Prometheus.
switch agg.Op {
case parser.LIMITK, parser.LIMIT_RATIO:
if agg.Op.IsExperimentalAggregator() {
expFuncNames[agg.Op.String()] = struct{}{}
}
}
Expand Down

0 comments on commit d4b0e75

Please sign in to comment.