From 543dc0dccfa585110944a171777cf7c7324d0a19 Mon Sep 17 00:00:00 2001 From: Marc Sanmiquel Date: Wed, 27 Nov 2024 12:59:19 +0100 Subject: [PATCH] fix(flameql): allow slashes in tag name --- pkg/og/flameql/flameql.go | 2 +- pkg/og/flameql/flameql_test.go | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/og/flameql/flameql.go b/pkg/og/flameql/flameql.go index bca663025e..3f9ba29bb2 100644 --- a/pkg/og/flameql/flameql.go +++ b/pkg/og/flameql/flameql.go @@ -97,7 +97,7 @@ func ValidateAppName(n string) error { } func IsTagKeyRuneAllowed(r rune) bool { - return (r >= 'a' && r <= 'z') || (r >= 'A' && r <= 'Z') || (r >= '0' && r <= '9') || r == '_' || r == '.' + return (r >= 'a' && r <= 'z') || (r >= 'A' && r <= 'Z') || (r >= '0' && r <= '9') || r == '_' || r == '.' || r == '/' } func IsAppNameRuneAllowed(r rune) bool { diff --git a/pkg/og/flameql/flameql_test.go b/pkg/og/flameql/flameql_test.go index f6baea64e1..04ab9f722d 100644 --- a/pkg/og/flameql/flameql_test.go +++ b/pkg/og/flameql/flameql_test.go @@ -44,6 +44,7 @@ var _ = Describe("ValidateTagKey", func() { testCases := []testCase{ {"foo_BAR_12_baz_qux", nil}, {"service.namespace", nil}, + {"namespace/service", nil}, {ReservedTagKeyName, ErrTagKeyReserved}, {"", ErrTagKeyIsRequired},