prometheus/promql/parser
Simon Pasquier 71217a6e43
fix: prevent invalid array access in aggregate expression
This commit fixes the evaluation of invalid expressions like
`sum(rate(`. Before that, it would trigger a panic in the PromQL engine
because it tried to access an index which is out of range.

The bug was probably introduced by 06d0b063ea.

Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2025-06-19 15:11:38 +02:00
..
posrange Add warnings (and annotations) to PromQL query results (#12152) 2023-09-14 18:57:31 +02:00
ast.go Move calculation to the engine 2025-04-03 10:56:02 +02:00
functions.go promql: add ts_of_(max,min,last)_over_time functions 2025-06-12 15:03:28 +00:00
generated_parser.y promql: Fix unary operator precedence in duration expressions 2025-06-13 13:40:50 +02:00
generated_parser.y.go promql: Fix unary operator precedence in duration expressions 2025-06-13 13:40:50 +02:00
lex.go Fix linting issues found by golangci-lint v2.0.2 (#16368) 2025-05-03 19:05:13 +02:00
lex_test.go Merge pull request #16249 from roidelapluie/arythmetics 2025-04-22 10:17:41 +02:00
parse.go fix: prevent invalid array access in aggregate expression 2025-06-19 15:11:38 +02:00
parse_test.go fix: prevent invalid array access in aggregate expression 2025-06-19 15:11:38 +02:00
prettier.go Move calculation to the engine 2025-04-03 10:56:02 +02:00
prettier_rules.md Adds support for prettifying PromQL expression (#10544) 2022-07-07 18:13:36 +05:30
prettier_test.go Move calculation to the engine 2025-04-03 10:56:02 +02:00
printer.go Move calculation to the engine 2025-04-03 10:56:02 +02:00
printer_test.go utf8: Remove support for legacy global validation setting 2025-03-13 10:47:24 -04:00
value.go promql: use explicit type declare instead of string. (#7716) 2020-08-02 09:57:38 +01:00