From 974cd3fcf5e67ca1609175283bd511853c86d0c9 Mon Sep 17 00:00:00 2001 From: Thor <8681572+thorfour@users.noreply.github.com> Date: Wed, 23 Sep 2026 16:03:24 -0500 Subject: [PATCH 1/2] Fix relable configs validation scheme not being set. (#6408) Add regression test. --- pkg/config/config.go | 3 +++ pkg/config/config_test.go | 30 ++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+) diff --git a/pkg/config/config.go b/pkg/config/config.go index ed2753e0241..1e924f470d0 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -253,6 +253,9 @@ func (c *ScrapeConfig) UnmarshalYAML(unmarshal func(interface{}) error) error { if rlcfg == nil { return errors.New("empty or null target relabeling rule in scrape config") } + if err := rlcfg.Validate(model.UTF8Validation); err != nil { + return err + } } // Validate the scrape and timeout internal configuration. When /debug/pprof/profile scraping diff --git a/pkg/config/config_test.go b/pkg/config/config_test.go index 06c41ea45b8..2568a125226 100644 --- a/pkg/config/config_test.go +++ b/pkg/config/config_test.go @@ -19,6 +19,8 @@ import ( "github.com/prometheus/common/model" "github.com/prometheus/prometheus/discovery" + "github.com/prometheus/prometheus/model/labels" + "github.com/prometheus/prometheus/model/relabel" "github.com/stretchr/testify/require" "github.com/thanos-io/objstore/client" ) @@ -35,6 +37,34 @@ func TestLoad(t *testing.T) { } } +// TestLoadRelabelConfigNameValidationScheme is a regression test for a panic +// ("Invalid name validation scheme requested: unset") that occurred because +// parsed relabel configs never had their NameValidationScheme populated, +// leaving it at the zero value (model.UnsetValidation). +func TestLoadRelabelConfigNameValidationScheme(t *testing.T) { + t.Parallel() + + cfg, err := Load(`scrape_configs: +- job_name: 'test' + static_configs: + - targets: ['localhost:8080'] + relabel_configs: + - source_labels: ['__meta_foo'] + regex: '(.+)' + target_label: '__meta_${1}' + replacement: 'bar' + action: replace`) + require.NoError(t, err) + require.Len(t, cfg.ScrapeConfigs, 1) + require.Len(t, cfg.ScrapeConfigs[0].RelabelConfigs, 1) + require.Equal(t, model.UTF8Validation, cfg.ScrapeConfigs[0].RelabelConfigs[0].NameValidationScheme) + + lb := labels.NewBuilder(labels.FromStrings("__meta_foo", "extra")) + require.NotPanics(t, func() { + relabel.ProcessBuilder(lb, cfg.ScrapeConfigs[0].RelabelConfigs...) + }) +} + func TestLoadComplex(t *testing.T) { t.Parallel() From cf1c7826afed6e4ab90cf06ad759d04cb876eed3 Mon Sep 17 00:00:00 2001 From: Thor <8681572+thorfour@users.noreply.github.com> Date: Mon, 28 Sep 2026 08:51:23 -0500 Subject: [PATCH 2/2] Bump grpc health probe version -> v0.4.57 (#6411) --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 0153db6c323..23210e5d439 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,7 +8,7 @@ ARG TARGETARCH=amd64 ARG TARGETVARIANT=v1 # renovate: datasource=github-releases depName=grpc-ecosystem/grpc-health-probe -ARG GRPC_HEALTH_PROBE_VERSION=v0.4.47 +ARG GRPC_HEALTH_PROBE_VERSION=v0.4.57 # Downloading grpc_health_probe from github releases with retry as we have seen it fail a lot on ci. RUN for i in $(seq 1 50); do \ wget -qO/bin/grpc_health_probe "https://github.com/grpc-ecosystem/grpc-health-probe/releases/download/${GRPC_HEALTH_PROBE_VERSION}/grpc_health_probe-${TARGETOS}-${TARGETARCH}" && \