mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-10-22 03:42:32 +00:00
fix(prom): align remote read label matcher semantics (#9633)
* fix(prom): align remote read label matcher semantics Signed-off-by: fys <fengys1996@gmail.com> * chore: optimize comment of validate_matchers * fix(prom): preserve existing binary label regex handling Signed-off-by: fys <fengys1996@gmail.com> * refactor: condition * test(prom): simplify remote read matcher tests and clarify comments * fix(prom): return binary remote read labels as UTF-8 * fix(prom): reject binary labels in remote read * refactor(prom): align remote read null label handling with PromQL Signed-off-by: fys <fengys1996@gmail.com> * refactor(prom): simplify null handling in label matcher branches Signed-off-by: fys <fengys1996@gmail.com> * fix(prom): restrict remote read labels to string types Signed-off-by: fys <fengys1996@gmail.com> * test(prom): use string label in default value column test Signed-off-by: fys <fengys1996@gmail.com> * fix: code review --------- Signed-off-by: fys <fengys1996@gmail.com>
This commit is contained in:
@@ -708,6 +708,12 @@ mod tests {
|
||||
(MatcherType::Neq as i32, "[", 200),
|
||||
(MatcherType::Re as i32, "spark", 200),
|
||||
(MatcherType::Nre as i32, "api.*", 200),
|
||||
(MatcherType::Re as i32, "(?x) spark", 200),
|
||||
(MatcherType::Nre as i32, "(?x) spark", 200),
|
||||
(MatcherType::Re as i32, "(?x) spark # comment", 400),
|
||||
(MatcherType::Nre as i32, "(?x) spark # comment", 400),
|
||||
(MatcherType::Re as i32, "a)|(?:b", 400),
|
||||
(MatcherType::Nre as i32, "a)|(?:b", 400),
|
||||
] {
|
||||
let mut query = remote_query(metric);
|
||||
query.matchers.push(LabelMatcher {
|
||||
|
||||
Reference in New Issue
Block a user