Skip to content

Commit

Permalink
Update error message when using disabled PromQL experimental aggregat…
Browse files Browse the repository at this point in the history
…ion function

Signed-off-by: Jeanette Tan <[email protected]>
  • Loading branch information
zenador committed Dec 9, 2024
1 parent aa96f2e commit 07d9305
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion promql/parser/parse.go
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ func (p *parser) newAggregateExpr(op Item, modifier, args Node) (ret *AggregateE
if !EnableExperimentalFunctions && ret.Op.IsExperimentalAggregator() {
// In mimir we return a custom message which doesn't mention the CLI flag that should be used to enable
// experimental functions, given it's different (and in SaaS customers don't even have access to it).
p.addParseErrf(ret.PositionRange(), "limitk() and limit_ratio() functions are not enabled")
p.addParseErrf(ret.PositionRange(), `function "%s" is not enabled`, ret.Op)
return
}
desiredArgs = 2
Expand Down

0 comments on commit 07d9305

Please sign in to comment.