From 9ec4026ed3997cea8b2e18a9acd5fe667989da7a Mon Sep 17 00:00:00 2001 From: Owen Williams Date: Thu, 8 Feb 2024 14:38:26 -0500 Subject: [PATCH] Restore previous behavior where spaces between label terms are acceptable in Promparse Signed-off-by: Owen Williams --- model/textparse/promparse.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/model/textparse/promparse.go b/model/textparse/promparse.go index f306c03a2..5aa3bfc1f 100644 --- a/model/textparse/promparse.go +++ b/model/textparse/promparse.go @@ -446,11 +446,8 @@ func (p *PromParser) parseLVals() error { // Free trailing commas are allowed. NOTE: this allows spaces between label // names, unlike in OpenMetrics. It is not clear if this is intended or an // accidental bug. - t = p.nextToken() - if t == tComma { + if t = p.nextToken(); t == tComma { t = p.nextToken() - } else if t != tBraceClose { - return p.parseError("expected comma or brace close", t) } } }