prometheus/promql/parser
Oleg Zaytsev 4b7a44c7a0
Fix parser.VectorSelector.String() with empty name matcher (#14015)
The check fell into "this matcher equals vector selector's name" case when vector selector doesn't have a name and the matcher is an explicit matcher for an empty __name__ label.

To provide some context about why this is important: some downstream projects use the promql.Parse(expr.String()) to clone an expression's AST, and with this bug that matcher disappears in the cloning.

Signed-off-by: Oleg Zaytsev <mail@olegzaytsev.com>
2024-05-06 11:51:08 +02:00
..
posrange Add warnings (and annotations) to PromQL query results (#12152) 2023-09-14 18:57:31 +02:00
ast.go ci(lint): enable nolintlint and remove redundant comments (#12926) 2023-10-31 12:35:13 +01:00
functions.go promql: add histogram_avg function (#13467) 2024-02-01 18:28:42 +01:00
generated_parser.y UTF-8: Add support for parsing UTF8 metric and label names 2024-02-15 14:34:37 -05:00
generated_parser.y.go parser: remake generated_parser output (#13923) 2024-04-13 12:59:54 +02:00
lex_test.go Adds Inf and NaN as Numbers to Histogram in Promql Testing Framework (#13916) 2024-04-11 12:53:28 +02:00
lex.go Adds Inf and NaN as Numbers to Histogram in Promql Testing Framework (#13916) 2024-04-11 12:53:28 +02:00
parse_test.go [TESTS] Truncate some long test names, for readability 2024-04-03 10:10:39 +01:00
parse.go golangci-lint: enable whitespace linter (#13905) 2024-04-11 09:27:54 +01:00
prettier_rules.md Adds support for prettifying PromQL expression (#10544) 2022-07-07 18:13:36 +05:30
prettier_test.go Prettifier: Add spaces with non-callable keywords (#11005) 2022-07-15 00:09:56 +02:00
prettier.go Adds support for prettifying PromQL expression (#10544) 2022-07-07 18:13:36 +05:30
printer_test.go Fix parser.VectorSelector.String() with empty name matcher (#14015) 2024-05-06 11:51:08 +02:00
printer.go Fix parser.VectorSelector.String() with empty name matcher (#14015) 2024-05-06 11:51:08 +02:00
value.go