Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@
* [BUGFIX] Distributor: Fix `/distributor/all_user_stats` api to work during rolling updates on ingesters. #7026
* [BUGFIX] Runtime-config: Fix panic when the runtime config is `null`. #7062
* [BUGFIX] Scheduler: Avoid all queriers reserved for prioritized requests. #7057
* [BUGFIX] Fix bug where validating metric names uses the wrong validation logic. #7086

## 1.19.1 2025-09-20

Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.20.0-rc.0
1.20.0-rc.1
2 changes: 1 addition & 1 deletion pkg/util/validation/validate.go
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ func ValidateLabels(validateMetrics *ValidateMetrics, limits *Limits, userID str
return newNoMetricNameError()
}

if !nameValidationScheme.IsValidLabelName(unsafeMetricName) {
if !nameValidationScheme.IsValidMetricName(unsafeMetricName) {
validateMetrics.DiscardedSamples.WithLabelValues(invalidMetricName, userID).Inc()
return newInvalidMetricNameError(unsafeMetricName)
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/util/validation/validate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ func TestValidateLabels(t *testing.T) {
}, "foo "),
},
{
map[model.LabelName]model.LabelValue{model.MetricNameLabel: "valid"},
map[model.LabelName]model.LabelValue{model.MetricNameLabel: "valid:name"},
false,
nil,
},
Expand Down Expand Up @@ -201,7 +201,7 @@ func TestValidateLabels(t *testing.T) {
# HELP cortex_label_size_bytes The combined size in bytes of all labels and label values for a time series.
# TYPE cortex_label_size_bytes histogram
cortex_label_size_bytes_bucket{user="testUser",le="+Inf"} 3
cortex_label_size_bytes_sum{user="testUser"} 148
cortex_label_size_bytes_sum{user="testUser"} 153
cortex_label_size_bytes_count{user="testUser"} 3
`), "cortex_label_size_bytes"))

Expand Down
Loading